-
Notifications
You must be signed in to change notification settings - Fork 3
New 3D data support, improved temp data loader #181
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
…nd rebin to an N dimensional regular grid
…to the temporary hdf5 reader
…ved NDrebin local testing
…ved NDrebin local testing
…andards (now looks directly at canSAS_class instead of the group name. This is because the group name is allowed to be anything, but the canSAS_class is fixed. also allowed raw to be none in metadata because raw is not a part of the NXcanSAS standard. also ran ruff which cleaned up the rpm in units and accessors and si.
… raw data loading if present
|
Are these full 3D volumes? Or are they 2D detector surfaces in a 3D volume? Regardless, please add issues to the sasmodels project saying what updates are needed to resolution2D. |
Currently I am just generalizing the dataset object to also support holding the Qz of each detector pixel (or whatever the equivalent in TOF data would be, which does measure a 3D volume). So for a CW SANS instrument this will be 2D detector surfaces with 3D coordinates. Ultimately, we will be able to combine many 2D detector surfaces (or TOF 3D volumes) into one 3D volume using the NDrebinner on pull request #178 also optionally taking into account the transformations from the lab reference frame to the sample reference frame. We will want to generalize the resolution function to 3D for this as well. Pederson and Harris originally developed this: Note that the ideal way to model 3D data is to fit directly to measured datapoints in 3D where the model is convolved with a 3D resolution function approximation. For visualization both can be rebinned in the same way for plotting in 1D, 2D, or 3D. |
krzywon
left a comment
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 seems to have work from two other branches included in it, which can make resolving review comments difficult. You might want to set the base branch for this PR to the NDrebin branch to make this a bit easier, not only for resolving differences, but also rebasing, and reviewing purposes.
Overall, this looks pretty good, but see my comments.
I tried to make the NDrebin branch very separate. I don't think they conflict? Maybe I am missing something? I admit that the rpm changes are confusing, but I don't know how to roll back just the changes to the quantities directory in my branch. edit: I see, I left NDrebin in this branch. That doesn't need to be in this branch. I will remove it from this branch. |
krzywon
left a comment
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.
Two more suggestions that should help with the code scene analysis. Otherwise, this is getting close.
…examplefile.h5. Also added support for when the NX_class attribute has a canSAS_class name. Also fixed bug when no instrument, sample etc are given in the file.
…multisasentry_multisasdata.h5, nxcansas_1Dand2D_multisasdata.h5, and nxcansas_1Dand2D_multisasentry.h5 test data files
|
Fixed the unit tests. Details of fixes below:
|
DrPaulSharp
left a comment
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.
A few comments from me here.
|
I think once the comments by @DrPaulSharp are fixed, this might be ready to merge. |
…ged name of parse_float_first to parse_float
…ta and nxcansas_1Dand2D_multisasentry where the detector distance was read wrong because of the difference between node.astype(float)[0] and float(node[0].astype(str))
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.
Gates Passed
3 Quality Gates Passed
See analysis details in CodeScene
Quality Gate Profile: The Bare Minimum
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.
krzywon
left a comment
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 think this is ready.
Changes:
QzanddQzas optional value in 2D datathree_dimdataset type and testdeduce_qztopostprocess.pyto create the Qz data in a dataset if wavelength, Qx, and Qy are provided.temp_hdf5_reader.pyto be more compliant with NXcanSAS standard. Now imports bycanSAS_classinstead of group name in hdf5 file.Still to do: