Ticket #5844 (closed: fixed)
SANS: Fitting rescale and shift
Reported by: | Anders Markvardsen | Owned by: | Gesner Passos |
---|---|---|---|
Priority: | critical | Milestone: | Release 2.3 |
Component: | MantidPlot | Keywords: | |
Cc: | richard.heenan@…, stephen.king@…, gesner.passos@… | Blocked By: | |
Blocking: | Tester: | Anders Markvardsen |
Description
Following on from #2159. Here allow rescale and shift to be fitted
Change History
comment:2 Changed 8 years ago by Anders Markvardsen
sans: allow fitting rescale and shift. re #5844
Changeset: 0ad65c1e3ffa6dca0e06f299e3d3aa5cea0e0258
comment:3 Changed 8 years ago by Anders Markvardsen
- Status changed from new to accepted
- Cc gesner.passos@… added
Steve/Richard showed yesterday that I had forgot to add the code for this to work in batch mode. Do this according to:
"We have agreed that the batch processor will now append “_frontâ€, â€_rear†or â€_merged†onto output workspaces and file names to make batch processing much simpler."
Also note the sutblety:
"the SHIFT adjustment should only be made to a Sample run and not to a Can run, as it is a relative shift for the “sample-can†result for the front detector. The RESCALE adjustment needs to be applied to both Sample and Can runs. If the SHIFT and/or RESCALE are being fitted, this can be done on “sample-can†results for Front and Rear detectors, or just “sample†results if no can run is specified."
comment:4 Changed 8 years ago by Anders Markvardsen
Consisting logic for shift and rescale. re #5844
Changeset: 1b9bf07f33273cb71f1ed1d10ce300e4d7f860f9
comment:5 Changed 8 years ago by Anders Markvardsen
Added warnings when fit fail for shift and rescale. re #5844
It turns out that for LOQ reduced data can contain NaN entries. Code added to handle this case better
Changeset: 0dd19222c53863c487e3f5e195424b96ab342fc7
comment:6 Changed 8 years ago by Anders Markvardsen
- Owner changed from Anders Markvardsen to Gesner Passos
- Status changed from accepted to assigned
comment:8 Changed 8 years ago by Gesner Passos
The user King, warned that the reduction with the merging has these issues:
- In single run mode the merging is not quite doing what it should, the main det data should not be rescaled or shifted, only the HAB/Front data should be;
- The merging is not properly using the Can runs;
- In batch mode no merged data is generated (the Q range of the output data is the same as that for the main det);
- It should be possible to put DET/BOTH and DET/MERGED in a mask file to control a reduction, at the moment these have no effect.
comment:9 Changed 8 years ago by Gesner Passos
SANS Rescale and Fitting and Merging Detectors in batch mode.
isis_instrument.py:
- add variable to allow selection of BOTH and MERGED
SANSBatchMode.py:
- Extension BatchReduce function to accept a new input that informs which kind of reduction is expected and return an output of the scale and shift settings from the Fit algorithm.
ISISCommandInterface.py:
- Extension of WavRangeReduction to provide new output (the scale and shift)
- Refactoring of WavRangeReduction function for solve problem of having different paths from SingleMode and BatchMode
- Propose a new function for the calculation of the merged function considering the CAN.
SANSRunWindow.cpp:
- Correct bugs inside the loadUserFile function to correctly process the following entries: DET/[RESCALE|SHIFT]/FIT [Q1 Q2]
- Extend loadUserFile to identify the options DET/[BOTH|MERGED|REAR|FRONT|HAB]
- Correct the SingleMode Loading function to move correctly the detector - Causing different answer from batch and single mode.
- Correct the python code related to SANSBatchMode and ISISCommandInterface
- Update the shift and scale parameters at the enf of a Batch mode reduction.
re #5844
Changeset: 0ff0b453aea49e85fba4b390cfdad939b360f38d
comment:10 Changed 8 years ago by Gesner Passos
SANS Rescale and Fitting and Merging Detector
Fix the merging formula when no CAN is given (ISISCommandInterface) Implement the agrement to have _rear, _front, _merged suffix in batch mode (SANSBatchMode) re #5844
Changeset: ee41082310d595ad5b1a5aab8256993e54dd76cf
comment:11 Changed 8 years ago by Gesner Passos
SANS Rescale and Fitting and Merging Detector
Issue Warning message when the Fit Function returns a negative scale value. re #5844
Changeset: bd77e6a503606689600edc2cd3573e6fc012019e
comment:12 Changed 8 years ago by Gesner Passos
- Status changed from accepted to verify
- Resolution set to fixed
comment:13 Changed 8 years ago by Gesner Passos
- Status changed from verify to reopened
- Resolution fixed deleted
comment:14 Changed 8 years ago by Gesner Passos
Stephen reported some issues:
- NameError: name fit_settings is not defined at line 2 in <Interface>
- DET/MAIN is not being processed any more.
comment:15 Changed 8 years ago by Gesner Passos
comment:16 Changed 8 years ago by Gesner Passos
Solve fit_settings not defined variable
When reduction fails, an extra warning message appears saying that there is no fit_settings variable available. This solves this problem.
re #5844
Changeset: 329c539122bd06d3aa4d7355437047ea4682b1de
comment:18 Changed 8 years ago by Gesner Passos
- Status changed from accepted to verify
- Resolution set to fixed
comment:19 Changed 8 years ago by Anders Markvardsen
- Status changed from verify to verifying
- Tester set to Anders Markvardsen
comment:20 Changed 8 years ago by Gesner Passos
Solve extra warnings that was confusing the user
Q1D2: correct the warning message to have WorkspaceIndex.
SANSRunWindow:
- warning user that we will ignore the FLOOD file option when
the detector is the FRONT/HAB detector. A new ticket will be opened to deal with this properly.
- Skip reloading the user file for every single reduction that caused
extra warnings to appear, confusing the user.
- Accept DET/MERGE option to be passed as well as DET/MERGED.
ISISCommandInterface-> temporaly clear the FloodFile when reducting the FRONT/HAB detector.
re #5844
Changeset: 7ceaa78b4ad5d7f25cd44351e4e52e75429a1341
comment:21 Changed 8 years ago by Anders Markvardsen
- Status changed from verifying to closed
Tested this with LOQ and SANS2D data and it looks good to me
comment:22 Changed 8 years ago by Anders Markvardsen
Consisting logic for shift and rescale. re #5844
Changeset: 1b9bf07f33273cb71f1ed1d10ce300e4d7f860f9
comment:23 Changed 8 years ago by Anders Markvardsen
Added warnings when fit fail for shift and rescale. re #5844
It turns out that for LOQ reduced data can contain NaN entries. Code added to handle this case better
Changeset: 0dd19222c53863c487e3f5e195424b96ab342fc7
comment:24 Changed 8 years ago by Gesner Passos
SANS Rescale and Fitting and Merging Detectors in batch mode.
isis_instrument.py:
- add variable to allow selection of BOTH and MERGED
SANSBatchMode.py:
- Extension BatchReduce function to accept a new input that informs which kind of reduction is expected and return an output of the scale and shift settings from the Fit algorithm.
ISISCommandInterface.py:
- Extension of WavRangeReduction to provide new output (the scale and shift)
- Refactoring of WavRangeReduction function for solve problem of having different paths from SingleMode and BatchMode
- Propose a new function for the calculation of the merged function considering the CAN.
SANSRunWindow.cpp:
- Correct bugs inside the loadUserFile function to correctly process the following entries: DET/[RESCALE|SHIFT]/FIT [Q1 Q2]
- Extend loadUserFile to identify the options DET/[BOTH|MERGED|REAR|FRONT|HAB]
- Correct the SingleMode Loading function to move correctly the detector - Causing different answer from batch and single mode.
- Correct the python code related to SANSBatchMode and ISISCommandInterface
- Update the shift and scale parameters at the enf of a Batch mode reduction.
re #5844
Changeset: 0ff0b453aea49e85fba4b390cfdad939b360f38d
comment:25 Changed 8 years ago by Gesner Passos
SANS Rescale and Fitting and Merging Detector
Fix the merging formula when no CAN is given (ISISCommandInterface) Implement the agrement to have _rear, _front, _merged suffix in batch mode (SANSBatchMode) re #5844
Changeset: ee41082310d595ad5b1a5aab8256993e54dd76cf
comment:26 Changed 8 years ago by Gesner Passos
SANS Rescale and Fitting and Merging Detector
Issue Warning message when the Fit Function returns a negative scale value. re #5844
Changeset: bd77e6a503606689600edc2cd3573e6fc012019e
comment:27 Changed 8 years ago by Gesner Passos
comment:28 Changed 8 years ago by Gesner Passos
Solve fit_settings not defined variable
When reduction fails, an extra warning message appears saying that there is no fit_settings variable available. This solves this problem.
re #5844
Changeset: 329c539122bd06d3aa4d7355437047ea4682b1de
comment:29 Changed 8 years ago by Gesner Passos
Solve extra warnings that was confusing the user
Q1D2: correct the warning message to have WorkspaceIndex.
SANSRunWindow:
- warning user that we will ignore the FLOOD file option when
the detector is the FRONT/HAB detector. A new ticket will be opened to deal with this properly.
- Skip reloading the user file for every single reduction that caused
extra warnings to appear, confusing the user.
- Accept DET/MERGE option to be passed as well as DET/MERGED.
ISISCommandInterface-> temporaly clear the FloodFile when reducting the FRONT/HAB detector.
re #5844
Changeset: 7ceaa78b4ad5d7f25cd44351e4e52e75429a1341
comment:30 Changed 8 years ago by Gesner Passos
Solve extra warnings that was confusing the user
Q1D2: correct the warning message to have WorkspaceIndex.
SANSRunWindow:
- warning user that we will ignore the FLOOD file option when
the detector is the FRONT/HAB detector. A new ticket will be opened to deal with this properly.
- Skip reloading the user file for every single reduction that caused
extra warnings to appear, confusing the user.
- Accept DET/MERGE option to be passed as well as DET/MERGED.
ISISCommandInterface-> temporaly clear the FloodFile when reducting the FRONT/HAB detector.
re #5844
Changeset: 7ceaa78b4ad5d7f25cd44351e4e52e75429a1341
comment:31 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 6690
sans: allow fitting rescale and shift. re #5844