Example #1
0
 def __init__(self, rho=0., theta=0., phi=0.):
     """
     Parameters
     ----------
     rho : float
     theta : float
     phi : float
         The polar components of the magnetic density vector
     """
     self._rho = NumericParameter('rho', rho)
     self._theta = NumericParameter('theta', theta)
     self._phi = NumericParameter('phi', phi)
Example #2
0
 def __init__(self,
              thickness=0.,
              nsld_real=0.,
              nsld_imaginary=0.,
              msld_rho=0.,
              msld_theta=0.,
              msld_phi=0.,
              roughness=0.,
              roughness_model=RoughnessModel.NONE,
              sublayers=0,
              name=''):
     """
     Create a layer with the following parameters:
     - thickness: thickness
     - nsld_real: nuclear scattering length density (real part)
     - nsld_imaginary: nuclear scattering length density (imaginary part)
     - msld_rho: magnetic scattering length density magnitude
     - msld_theta: magnetic scattering length density magnitude
     - msld_phi: magnetic scattering length density magnitude
     - roughness: roughness
     - roughess_model: model for the roughness, one of RoughnessModel types
     - sublayers: number of sublayers at the upper surface used to calculate roughness
     - name: an optional string to use as the name of the layer
     Numerical parameters have minimum/maximum values that are going
     to be used for fitting. To input just the value, just enter a single number.
     To input the value, minimum and maximum, you should enter a 
     triplet (list,set, numpy array, etc)
     """
     self._thickness = NumericParameter('thickness', thickness)
     self._nsld_real = NumericParameter('nsld_real', nsld_real)
     self._nsld_imaginary = NumericParameter('nsld_imaginary',
                                             nsld_imaginary)
     self._msld = MSLD(msld_rho, msld_theta, msld_phi)
     self._roughness = NumericParameter('roughness', roughness)
     self._roughness_model = roughness_model
     self._sublayers = sublayers
     self._name = name
Example #3
0
 def phi(self, p):
     self._phi = NumericParameter('phi', p)
Example #4
0
 def theta(self, t):
     self._theta = NumericParameter('theta', t)
Example #5
0
 def rho(self, r):
     self._rho = NumericParameter('rho', r)
Example #6
0
 def roughness(self, v):
     self._roughness = NumericParameter('roughness', v)
Example #7
0
 def nsld_imaginary(self, v):
     self._nsld_imaginary = NumericParameter('nsld_imaginary', v)
Example #8
0
 def nsld_real(self, v):
     self._nsld_real = NumericParameter('nsld_real', v)
Example #9
0
 def thickness(self, v):
     self._thickness = NumericParameter('thickness', v)