-
Notifications
You must be signed in to change notification settings - Fork 2
Subtract sample run by empty can #144
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
Conversation
|
I got a new vanadium simulation that doesn't result in negative counts. I am going to switch to that after #145 is merged to avoid conflicts. |
9e79e0a to
cdf78d5
Compare
|
This is now based on #160 and needs to wait until that is merged. |
cdf78d5 to
e144fad
Compare
|
Rebased onto main |
| def subtract_background( | ||
| data: FocussedDataDspacing[SampleRun], | ||
| background: FocussedDataDspacing[BackgroundRun], | ||
| ) -> BackgroundSubtractedData[SampleRun]: | ||
| return BackgroundSubtractedData[SampleRun](data.bins.concatenate(-background)) |
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.
Will we need the background subtraction to work also for histogrammed data?
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.
I don't know. For now, I have not seen histogrammed data at this point in the workflow.
| return get_path(f"DREAM_simple_pwd_workflow/{prefix}data_dream_vanadium.csv.zip") | ||
| return get_path( | ||
| f"DREAM_simple_pwd_workflow/{prefix}data_dream_vanadium_inc_coh.csv.zip" | ||
| ) |
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.
This used to incorrectly use the file without coherent scattering.
| "workflow = powder.with_pixel_mask_filenames(workflow, [])\n", | ||
| "\n", | ||
| "# Enable subtraction by an empty can measurement:\n", | ||
| "powder.correction.add_empty_can_subtraction(workflow)" |
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.
I don't like this mechanism. I think a dedicated class for powder workflows would help here.
Fixes #141
This results in a lot of negative counts. Checking with IDS...
This still needs a way to disable background subtraction.