ADR Suggestion The SampleModel object
#7
damskii9992
started this conversation in
Ideas
Replies: 1 comment 1 reply
-
|
I assume .calculate should calculate the theoretical spectrum and not plot it. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
SampleModelobject is one of the 5 main objects in the API which the user will interact with.The
SampleModelobject is responsible for defining the theoretical idealized sample to compare the data to.Current Implementation
The
SampleModelobject has not currently been implementedProposed Implementation
The
SampleModelobject is the top-level model object containing both theStructureobject, explaining the structure of the sample, and thePhysicsobject, containing the parameters for the used physics model. It will additionally contain a number of utility methods.The
StructuremetaclassThe
Structureclass will be a metaclass enforcing a minimum of functionality to different structure models. Initially EasyImaging will only contain 1 type of structure model inheriting from theStructureclass, but it may get expanded in the future.The
CrystalStructureobjectThe initial structure class to be implemented, will be the
CrystalStructureclass.The
CrystalStructureclass will inherit much of its API from theSampleModelsof EasyDiffraction. It fully describes the crystal structure of the sample in terms of its atomic positions and lattice parameters.It can contain any number of
Phasesobjects (each which is a complete description of a crystal lattice) with their relative fractional weights as well as stress and strain.The
PhysicsobjectThe physics object holds the type of physics to incorporate into the idealized sample model and their parameters, such as
The contents of the
Physicsobject will depend on the functionality of the supported back-end calculators. For example, texture is not currently supported by NCrystal and will likely therefor not be supported at the time of writing.Utility methods
The
SampleModelobject will additionally provide a number of utility methods for users usage:.loadwill load a previously savedSampleModel.savewill save a customSampleModel.plotwill call the class method of theAnalysisobject to plot the theoretical spectrum with theSampleModel, according to https://github.com/orgs/easyscience/discussions/29.calculatewill call the class method of theAnalysisobject to calculate the theoretical spectrum with theSampleModel, according to https://github.com/orgs/easyscience/discussions/29Beta Was this translation helpful? Give feedback.
All reactions