ADR Suggestion The Measurement Object
#1
Replies: 5 comments 12 replies
-
|
As mentioned earlier, my issue with this is that Maybe the idea is to have the dataset (profile, spectrum) a separate object, which can be prepared before sending off to Analysis, and have instrumental parameters a different object? |
Beta Was this translation helpful? Give feedback.
-
|
Slight nitpick here, but surely the forward scattering is also sample dependent? In this case, I'm not sure where it belongs, but it's not purely |
Beta Was this translation helpful? Give feedback.
-
|
Based on the discussion here and my own experience developing the Minimal Working Product of the "Measurement" page in the EasyImaging GUI, I am leaning towards having an extra primary object as proposed above. So in Imaging, the primary objects would be: New Proposed ImplementationThe Creating the
|
Beta Was this translation helpful? Give feedback.
-
|
Have you considered how the calculated data should be stored and linked to the |
Beta Was this translation helpful? Give feedback.
-
|
This is a library-related discussion, but since you mentioned the GUI, my question is about the GUI pages. By suggesting the primary objects - |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
General
Following the discussion of the Top-level API in https://github.com/orgs/easyscience/discussions/29, the
Experimentobject is one of the 5 main objects in the API which the user will interact with.The
Experimentobject is responsible for handling both the measured data and the instrument model of an experiment. I.e. everything directly related to the experiment.Current Implementation
The
Experimentobject has not currently been implementedProposed Implementation
The
Experimentobject will contain two objects itself, theInstrumentModelobject, and theMeasurementobject, as well as a number of utility functions.The
InstrumentModelObjectThe
InstrumentModelobject will contain any physics which is related to the specific experimental setup used. It is added on top of the idealizedSampleModelwhen fitting, to account for experimental features in order to produce a more realistic model that can be fit to the experimental data.A list of pre-defined
InstrumentModels will be provided for common instruments and setups, such as the main experimental setup for the imaging beamline ODIN at ESS, but customInstrumentModels can also be defined and saved for future use.The
InstrumentModelwill include the following experimental physics:The
MeasurementObjectThe
Measurementobject will contain the measured data in the form of a Scipp Data Group, together with a list of Region Of Interests (ROIs).The
MeasurementObject is responsible for converting calls to Scipp syntax in order to interface with the Scipp Data Group and to interface with various data loaders.The
RoiSpectrumObjectThe
Experimentobject will include the very critical method:Which will return a
RoiSpectrumObject by applying the given ROI.The
RoiSpectrumobject will also inherit fromBaseExperimentand contain similar fields to theExperimentobject defined here.The
InstrumentModelwill be inherited from theExperimentobject, but theMeasurementobject will contain the 1D spectrum of the used ROI region rather than the full data stack.The
RoiSpectrumwill additionally contain the ROI used to define it and a reference to its parentExperimentobject.Utility methods
The
Experimentobject will additionally provide a number of utility methods for user usage:.load_scitiffwill load a scitiff file and create a newInstrumentModelif the scitiff contains anyInstrumentModelfields..load_tiffwill load a basic tiff file. Will require a timestep or a list of times to define ToF for each frame..load_instrument_modelwill load a previously savedInstrumentModel.set_instrument_modelwill set anInstrumentModel, either user-defined or from the pre-defined list..plotwill plot the spectrum of the (default first) ROI in the ROI list, if any, otherwise will assume the whole image as ROI..plot_model(sample_model=SampleModel)will call the class method of theAnalysisobject to plot the theoretical spectrum with the providedSampleModeland theInstrumentModelapplied, according to https://github.com/orgs/easyscience/discussions/29.calculate_model(sample_model=SampleModel)will call the class method of theAnalysisobject to calculate the theoretical spectrum with the providedSampleModeland theInstrumentModelapplied, according to https://github.com/orgs/easyscience/discussions/29.viewwill show the time-averaged image if no time is defined, otherwise will show image at that time frame..ROI_listwill print the list of ROI's.add_ROIwill add a new ROI to the list of ROIs.ROI_selectorwill open up the image and allow the user to define a ROI using the mouse.Beta Was this translation helpful? Give feedback.
All reactions