-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update ultralite data #504
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## next #504 +/- ##
========================================
Coverage 96.54% 96.55%
========================================
Files 64 66 +2
Lines 4836 4960 +124
========================================
+ Hits 4669 4789 +120
- Misses 167 171 +4 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and functional. :)
* Initial commit, trying things to get ultralite data working * Cleaned up application.yml, added script and required files to run ultralite data * Undo changes and remove prints * Make unit tests pass * Added use of RemoveLogs to make run even smaller
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.