-
Notifications
You must be signed in to change notification settings - Fork 1
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
Ewm7121 refactor art norm #487
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## next #487 +/- ##
===========================================
+ Coverage 55.65% 96.35% +40.69%
===========================================
Files 64 64
Lines 4713 4744 +31
===========================================
+ Hits 2623 4571 +1948
+ Misses 2090 173 -1917 ☔ View full report in Codecov by Sentry. |
When attempting to proceed with neither normalization nor calibration and an uninitialized state I get an error |
Attempting to proceed with an a freshly initialized state nets the following error I will perform a calibration and proceed again, but the above needs fixing |
I forgot to note in my last comment that I did get an error message specifying that diffcal and norm was missing but it said the data would not be normalized, is that correct? I though we would apply an artificial norm. |
Even with diffcal created it seems to be erroring out? |
calVersion = None | ||
calVersion = self.dataFactoryService.getThisOrLatestCalibrationVersion(request.runNumber, request.useLiteMode) | ||
calRecord = self.dataFactoryService.getCalibrationRecord(request.runNumber, request.useLiteMode, calVersion) | ||
filePath = self.dataFactoryService.getCalibrationDataPath(request.runNumber, request.useLiteMode, calVersion) | ||
diffCalOutput = calRecord.workspaces[wngt.DIFFCAL_OUTPUT][0] | ||
diffcalOutputFilePath = str(filePath) + "/" + str(diffCalOutput) + ".nxs.h5" | ||
|
||
groceries = self.groceryService.fetchWorkspace(diffcalOutputFilePath, "diffractionWorkspace") |
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.
Could you move this logic to a method on groceryService instead? I can imagine it would be very useful elsewhere to be able to read a calibration's run data with a simple (runnumber, litemode, calversion).
It would also be more in line with the rest of the architecture.
|
Description of work
The purpose for this PR is the implement the previously created artificial normalization within the
Reduction
workflow. The changes ensure the workflow can handle missing normalization data by applying artificial normalization and introduce enhancements to the user interface, logging, and data handling processes.Explanation of work
Key updates include:
ArtificialNormalizationRecipe
toGenericRecipe
that uses theCreateArtificialNormalizationAlgo
to handle cases when normalization data is missing.Reduction
workflow can now dynamically adjust for missing calibration or normalization data, applying artificial normalization when necessary.ReductionService
to handle normalization and calibration more flexibly.To test
Insure all pytests pass. Please launch SNAPRed UI with a fresh (no states initialized) local copy of
Calibration_next
specified withinapplication.yml
.First
run the Diffraction Calibration with the following inputs:Create a new state when prompted. Then continue on through workflow through successful completion.
Now moving onto the Reduction tab, notice there is a new tab called "Artificial Normalization". Press the
Continue
button and notice the UI handling for no inputs:Finally,
without
running a normalization, run theReduction
workflow with the following inputs:Continue the workflow to notice the following message pop-up:
Continue Past the possible warning for permissions check but clicking
Yes
. Find that the workflow completes successfully.Finally
, re-run this but with a normalization this time and see that theArtificial Normalization
flow is not used in this case.Dev testing
Insure all pytests pass
CIS testing
See above.
Link to EWM item
EWM # 7123
&
EWM # 7121
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.