-
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
[Requirement] Masking tools #50
Comments
So masking should be part of a workflow. Would you have a set of parameters at the top of your notebook like a list of wavelength or two_theta ranges that would defined what to mask, or do you need to have an interactive tool where you can draw masks? The former could be something like (API to be discussed): params[TwothetaMasks] = [sc.array(dims=['two_theta'], values=[53, 55], units='deg),
sc.array(dims=['two_theta'], values=[80, 84], units='deg)]
params[WavelengthMasks] = [sc.array(dims=['wavelength'], values=[3.2, 3.7], units='angstrom)] An interactive tool could be used to save masks to file, and then we could load them like we do with the SANS workflows (we don't have to use xml format, we can use something else). |
Another question: the lines in the two_theta plots are curved. Will there be some curved lines that we also want to mask or will the unwanted signal not be curved? |
About the 2nd question: In principle, the ranges of two theta to mask could be linear or curved. For this first implementation, we could focus on linear masking only and split this requirement into 2 parts with the mask in 2theta to be implemented later. Let me know what you think. About the 1st question, "Would you expect the masks to be different for each run/sample during an experiment or can you use a mask that was saved to a file?"
|
Looking at the workflow in https://scipp.github.io/essdiffraction/examples/POWGEN_data_reduction.html#Compute-final-result, we are converting the raw data directly to d-spacing. Since you would like to have masks for detector pixels, wavelength ranges, and 2theta ranges, is it correct that we should add intermediate steps in the workflow that converts the data to the relevant coordinates? What I mean is we could:
Does that sounds like a good plan? Question: would you also need to mask in d-spacing? i.e. add a |
@nvaytet Your plan is good. Here are a few comments The conversion to For the workflow of POWGEN
A mask in d-spacing would also be required. But it can be left out of this first implementation after having tested the other types of masks. |
Thanks for the reply. |
Alternatively, is the 'spectrum' dim in those pictures a stand-in for another dim? E.g., phi (azimuthal angle) or y? |
@nvaytet I think the 2D mask should be implemented since users will first look at 2D data and decide to create mask at this stage. Visualising data in 1D comes at a later stage in the pipeline after a bit of clean up. @jl-wynen the vertical axis has been renamed as 'spectrum' when reshaping the initial NeXus file, so this axis could be associated to other physical quantities. |
@celinedurniak when you find the time could you look at #55 and scipp/scippneutron#521 to see if those combined satisfy your needs? Both are currently unreleased so you have to get |
@nvaytet I had a look at 2 notebooks Here are a few additional comments / questions:
The comments above do not prevent this requirement to be closed |
Executive summary
Provide masks for different physical quantities: wavelength, 2 theta, intensity and detectors
Context and background knowledge
These masks are first to be used in the Powder Diffraction workflow for DREAM.
Different physical parameters could be used in order to mask:
Follow-up:
Inputs
For masks in 2 theta, wavelength: DataArray containing the quantity to be masked as coordinate
For masks of detectors: metadata about detectors should be stored (positions, other characteristics like sumo, segment, sector…)
Methodology
Outputs
Data array with the same structure as input and with added mask.
Which interfaces are required?
Integrated into reduction workflow, Python module / function
Test cases
Examples:
Comments
Note: The file from D16 can be used in the online documentation.
The text was updated successfully, but these errors were encountered: