Ticket #2954 (closed: fixed)

Opened 9 years ago

Last modified 5 years ago

Integrate Peaks using Normal Fitting

Reported by: Ruth Mikkelson Owned by: Ruth Mikkelson
Priority: major Milestone: Iteration 30
Component: Mantid Keywords:
Cc: Blocked By:
Blocking: Tester: Vickie Lynch

Description

The peak data for a time slice is fit to a background +Intensity*bivariate normal distribution. This integration is the FitPeaks method used by ISAW.

Change History

comment:1 Changed 9 years ago by Ruth Mikkelson

(In [11323]) The IFitFunction for BivariateNormal fit to a peak in a time slice. Refs #2954

comment:2 Changed 9 years ago by Ruth Mikkelson

(In [11326]) Removed BivariateNormalTest.h dependency until I can check it in. Refs #2954

comment:3 Changed 9 years ago by Ruth Mikkelson

(In [12350]) Inheritance changed to inherit from IFunctionMW. Added parameter support. Refs #2954

comment:4 Changed 9 years ago by Ruth Mikkelson

(In [12369]) Algorithm to integrate one peak by integrating time slices. Refs #2954

comment:5 Changed 9 years ago by Ruth Mikkelson

(In [12370]) Test program for BivariateNormal routines.Refs #2954

comment:6 Changed 9 years ago by Ruth Mikkelson

(In [12373]) refs #2954. Removed test from list. Removed unused include from BivariateNormal.h

comment:7 Changed 9 years ago by Ruth Mikkelson

(In [12374]) refs #2954. Fixed files to use

comment:8 Changed 9 years ago by Dennis Mikkelson

(In [12398]) Index now correctly defaults to 0, if negative. Fixes problem encountered while working on test for integrating peaks with normal fitting. refs #2954

comment:9 Changed 9 years ago by Ruth Mikkelson

(In [12400]) Eliminated an "array out of bounds" crash for the test program in linux. Eliminated some variable not used warnings. Refs #2954

comment:10 Changed 9 years ago by Ruth Mikkelson

(In [12676]) Refs #2954

Fixed namespaces and added DECLARE_FUNCTION.

comment:11 Changed 9 years ago by Ruth Mikkelson

(In [12678]) #Refs #2954. Added a sample program in test directory and

updated IntegratePeakTimeSlices.* so test program will work.

comment:12 Changed 9 years ago by Ruth Mikkelson

(In [12680]) Refs #2954 Removed Bivariate normal test program from list

comment:13 Changed 9 years ago by Ruth Mikkelson

(In [12728]) Refs #2954, Removed setParameter methods.

All common information is now calculated before calculating the values in function. Caught NaN's and turned them into 10000.

comment:14 Changed 9 years ago by Ruth Mikkelson

(In [12729]) Refs #2954. Made Minor Fixes brought up while testing.

Finished up code from later stages of the optimization.

comment:15 Changed 9 years ago by Ruth Mikkelson

(In [12770]) Refs #2954. Fixed errors, updated some heuristics. Checks for out of bounds

comment:16 Changed 9 years ago by Ruth Mikkelson

(In [12773]) Refs #2954. Updated the Good fit method so more slices are good

Fixed namespaces Filled out the output table Tweaked methds to determine row span and time channel span to

got larger row spans and time channel spans.

comment:17 Changed 9 years ago by Ruth Mikkelson

(In [12837]) Refs #2954. Added tests to the test program to ensure that the derivatives gave correct answers/

comment:18 Changed 9 years ago by Ruth Mikkelson

(In [12838]) Refs #2954 Caught bad data( all zeroes) at the start

Returned time , start and end rows and colums used in the output Tweaked some heuristics Improved success at returning outputs nicely.

comment:19 Changed 9 years ago by Ruth Mikkelson

  • Status changed from new to accepted
  • Milestone changed from Iteration 29 to Iteration 30

comment:20 Changed 9 years ago by Ruth Mikkelson

(In [12955]) Introduced some debug logging in the BivariateNormal class. Added a test program and sample program for IntegratePeakTimeSlices Tweaked some heuristics to better match the implementation in ISAW. Added two output properties and added some input verification with error reporting to the Logger Added the time, channel, start/end rows/columns in the table output for IntegratePeakTimeSlices

Refs #2954

comment:21 Changed 9 years ago by Ruth Mikkelson

(In [12956]) Refs #2954. Removed test program for IntegratePeakTimeSlices because windows system may not have been able to register the Fit algorithm, maybe

comment:22 Changed 9 years ago by Janik Zikovsky

In [13234]:

Refs #2954: Fixed memory leak in IntegratePeakTimeSlices; sped up by sharing a map.

comment:23 Changed 9 years ago by Ruth Mikkelson

In [13365]:

refs #2954. Fixed an infinite loop case

comment:24 Changed 9 years ago by Ruth Mikkelson

In [13368]:

Refs #2954. Removed a check for data on a line in EnoughData method, for now

comment:25 Changed 9 years ago by Ruth Mikkelson

In [13489]:

Refs #2954. Eliminated the PeaksWorkspace output property. Added the double
properties, Intensity and SigmaIntensity.
Incorporated const's and static's where needed.
Added class variables RectWidth and RectHeight, for later tweaking for weak peaks and/or weak time slices.

comment:26 Changed 9 years ago by Ruth Mikkelson

In [13490]:

Refs #2954. Eliminated the PeaksWorkspace output property. Added the double
properties, Intensity and SigmaIntensity.
Incorporated const's and static's where needed.
Added class variables RectWidth and RectHeight, for later tweaking for weak peaks and/or weak time slices.

comment:27 Changed 9 years ago by Ruth Mikkelson

In [13491]:

Refs #2954. Eliminated the PeaksWorkspace output property. Added the double
properties, Intensity and SigmaIntensity.
Incorporated const's and static's where needed.
Added class variables RectWidth and RectHeight, for later tweaking for weak peaks and/or weak time slices.

comment:28 Changed 9 years ago by Mathieu Doucet

In [13496]:

Removing warning. This class needs a cleanup. Re #2954

comment:29 Changed 9 years ago by Russell Taylor

There are a number of changes that would make this class tidier and more C++-like:

  • The static functions and variables should become private members of the IntegratePeakTimeSlices class.
  • The #define should be replaced with enums.
  • As AttrNames & ParamNames appear to be fixed size - consider using C arrays which can be initialized at construction. It's possible these could also become enums as well (depends how they're used).
  • Avoid std::vector::push_back where possible. At a minimum try to pre-size the vector. Not so important for small arrays, but good practice.

comment:30 Changed 9 years ago by Ruth Mikkelson

In [13680]:

Refs #2954. Moved file scope methods to class level methods.

Moved variables storing attribute and parameter information to class level variables.
Added the test program to CMakeLists.txt

comment:31 Changed 9 years ago by Ruth Mikkelson

In [13681]:

Refs #2954. Removed test programs until fix problem

comment:32 Changed 9 years ago by Ruth Mikkelson

In [13684]:

Refs #2954. Added a header file so windows 7 can find the Fit routine

Added the test programs to CMakeLists.txt
Fixed the line of code that caused the failure on some systems.

comment:33 Changed 9 years ago by Ruth Mikkelson

In [13690]:

Refs #2954. Reformatted and fixed up Code.

comment:34 Changed 9 years ago by Ruth Mikkelson

In [13851]:

Refs #2954. Recalculated rectangle areas to agree with ISAW rectangular areas.
Updated the values for the test programs.
Moved one file level method to a class method.

comment:35 Changed 9 years ago by Ruth Mikkelson

In [13854]:

Refs #2954. Eliminated file level constant variables.
Checked if the variances and covariance were already tied.

comment:36 Changed 9 years ago by Ruth Mikkelson

In [13985]:

Refs #2954 Added InitDocs to IntegratePeakTimeSlices.
Refs #3563 Added test program for SaveIsawUB to list

Reduced the size of strings in SaveIsawUB

comment:37 Changed 9 years ago by Ruth Mikkelson

  • Status changed from accepted to verify
  • Resolution set to fixed

comment:38 Changed 9 years ago by Vickie Lynch

  • Status changed from verify to verifying
  • Tester set to Vickie Lynch

comment:39 Changed 9 years ago by Vickie Lynch

  • Status changed from verifying to closed

Works for single peak and also when called by PeakIntegration for all peaks.

comment:40 Changed 5 years ago by Stuart Campbell

This ticket has been transferred to github issue 3801

Note: See TracTickets for help on using tickets.