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
-
General
Following the discussion of the Top-level API in https://github.com/orgs/easyscience/discussions/29, the
SampleModel
object is one of the 5 main objects in the API which the user will interact with.The
SampleModel
object is responsible for defining the theoretical idealized sample to compare the data to.Current Implementation
The
SampleModel
object has not currently been implementedProposed Implementation
The
SampleModel
object is the top-level model object containing both theStructure
object, explaining the structure of the sample, and thePhysics
object, containing the parameters for the used physics model. It will additionally contain a number of utility methods.The
Structure
metaclassThe
Structure
class 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 theStructure
class, but it may get expanded in the future.The
CrystalStructure
objectThe initial structure class to be implemented, will be the
CrystalStructure
class.The
CrystalStructure
class will inherit much of its API from theSampleModels
of 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
Phases
objects (each which is a complete description of a crystal lattice) with their relative fractional weights as well as stress and strain.The
Physics
objectThe physics object holds the type of physics to incorporate into the idealized sample model and their parameters, such as
The contents of the
Physics
object 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
SampleModel
object will additionally provide a number of utility methods for users usage:.load
will load a previously savedSampleModel
.save
will save a customSampleModel
.plot
will call the class method of theAnalysis
object to plot the theoretical spectrum with theSampleModel
, according to https://github.com/orgs/easyscience/discussions/29.calculate
will call the class method of theAnalysis
object to calculate the theoretical spectrum with theSampleModel
, according to https://github.com/orgs/easyscience/discussions/29Beta Was this translation helpful? Give feedback.
All reactions