Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of work
This adds support to use ultralite data.
Explanation of work
The main change to snapred was to make reading of certain logs configurable, since saved nxs data would result in different log locations, compared to normal run data.
To test
Dev testing
To set SNAPRed up, first look at application.yml. In instrument.config, there are commented out fields. Uncomment these and comment out the corresponding fields above them. In the constants section, swap the logsLocation field.
Using workbench on analysis, load up the create_ultralite_data script. In the script, there are 2 places to look and change so it points to your specified location. The variable liteInstrumentFile towards the top and the FileName for the call to LoadDiffCal towards the middle of the script. LoadDiffCal needs to point to a normal(non ultralite) diffcal file. You are now ready to run the script. You can use the default run of 58882 or select multiple runs. Runs to reduce is defined on line 62. The ultralite versions will be saved in a folder called ultralite in your Documents folder.
To run the ultralite version, copy the run to your custom calibration location and make sure the run is renamed to "SNAP_runNumber". Please generate a new state folder.
THIS IS VERY IMPORTANT: modify the default grouping map (labeled as groupingMap.json) in the state folder so there are no lite versions. We currently do not support lite mode with ultralite data. Do not delete liteFocusGroups field entirely, just make sure it has no entries. In the native section, replace all native entries with just one entry named CRACKLE, and make it point to the CRACKLEFocGroup_Column.xml file.
For Diffraction Calibration, make ultralite runs for 46680 and 58882. In the ultralite data script, make sure eventMode is set to True. For the samples, use diamond for 46680 and Si for 58882. Be sure to turn off lite mode and select CRACKLE for the grouping. When you get to the tweak peaks tab, make FWHM Left = 1.0 and Max Chi Sq = 1000 and you should be able to complete.
For Normalization, convert runs 58810 and 58813 to ultralite and set eventMode to false. 58813 is the background run and use Vanadium as the sample. Remember to turn off lite mode!
For Reduction, just use 58882. Make sure lite mode is off.
CIS testing
See dev testing.
Link to EWM item
EWM#7792
Verification
Acceptance Criteria
This list is for ease of reference, and does not replace reading the EWM story as part of the review. Verify this list matches the EWM story before reviewing.