Distribution
- class nexus.Distribution(points=101, id='')
Abstract class for
Distribution
acting onHyperfine
parameters. Do not use this class directly. A Distribution must be derived from this class in Python the following way.# definition of the derived class class DistributionDefinedInPython(nx.Distribution): def __init__(self, points, ...): super().__init__(points, "user defined distribution") ... followed by your code if needed ... # implementation of the actual distribution function def DistributionFunction(self): # here goes your implementation ..... # set the deltax values to a reasonable range x = np.array(self.SetRange(...)) ... # calculate the weight weight = a function of x most probably # set the weight values self.SetWeight(weight)
A lot of distribution are predefined in the library
distribution
.- Parameters:
points (int) – Number of distribution points.
id (string) – User identifier.
- points
Number of distribution points.
- Type:
int
- delta
The delta values of the distribution.
- Type:
list
- weight
Relative weight of the delta values.
- Type:
list
- id
User identifier.
- Type:
string
- fit_variables
List of
nx.Var
objects.- Type:
list
- DistributionFunction()
Call of the distribution function implementation from python.
Examples can be found in the Tutorial section.