ADR: ModelComponent
#108
henrikjacobsenfys
started this conversation in
Ideas
Replies: 0 comments
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.
-
ModelComponentsThe basic building block of a model in EasyDynamcis is a
ModelComponent. The following components exist:Gaussian,Lorentzian,DeltaFunction,DampedHarmonicOscillator,Voigt,Polynomialand the base classModelComponent. Each component lives in its own class.Base class
The base class has
unit, helpers to free and fix all the parameters and a method to convert inputx(should be renamed toenergy#72 ) to the proper format.There is also a mixin to handle validation of input parameters. This will be simplified (#62 )
Components
Most components have an$\sigma$ , and the
area,centerandwidthproperty.areahas been chosen overamplitudeto facilitate easy convolution (#105 )the
widthof a Gaussian is its standard deviation,widthof a Lorentzian is its half width at half maximum.If center is not provided it will be set to 0 and fixed, as is appropriate for QENS analysis.
All components have an
evaluatemethod which calculates the component values at the inputx.ComponentCollection
The
ComponentCollectionis the basic way to describe any model and is used extensively.This is a collection of
ModelComponent. I has the following methods:ComponentCollectionwas in its inception calledSampleModel, and is discussed here: easyscience/dynamics#4Beta Was this translation helpful? Give feedback.
All reactions