Package data :: Module align_tensor :: Class AlignTensorData
[hide private]
[frames] | no frames]

Class AlignTensorData

source code


An empty data container for the alignment tensor elements.

Instance Methods [hide private]
 
__init__(self, name, fixed=False)
Set up the tensor data.
source code
 
__setattr__(self, name, value)
Function for calculating the parameters, unit vectors, and tensors on the fly.
source code
 
__update_sim_append(self, param_name, index)
Update the Monte Carlo simulation data lists when a simulation value is appended.
source code
 
__update_sim_set(self, param_name, index)
Update the Monte Carlo simulation data lists when a simulation value is set.
source code
 
__update_object(self, param_name, target, update_if_set, depends, category)
Function for updating the target object, its error, and the MC simulations.
source code

Inherited from data_classes.Element: __repr__, from_xml, is_empty, to_xml

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  __mod_attr__ = ['name', 'Axx', 'Axx_sim', 'Axx_err', 'Ayy', 'A...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, fixed=False)
(Constructor)

source code 

Set up the tensor data.

Parameters:
  • name (str) - The tensor ID string.
  • fixed (bool) - The optimisation flag.
Overrides: object.__init__

__setattr__(self, name, value)

source code 

Function for calculating the parameters, unit vectors, and tensors on the fly.

Parameters:
  • name (str) - The name of the object to set.
  • value (Any Python object type) - The value to set the object corresponding to the name argument to.
Overrides: object.__setattr__

__update_sim_append(self, param_name, index)

source code 

Update the Monte Carlo simulation data lists when a simulation value is appended.

Parameters:
  • param_name (str) - The MC sim parameter name which is being appended to.
  • index (int) - The index of the Monte Carlo simulation which was set.

__update_sim_set(self, param_name, index)

source code 

Update the Monte Carlo simulation data lists when a simulation value is set.

Parameters:
  • param_name (str) - The MC sim parameter name which is being set.
  • index (int) - The index of the Monte Carlo simulation which was set.

__update_object(self, param_name, target, update_if_set, depends, category)

source code 

Function for updating the target object, its error, and the MC simulations.

If the base name of the object is not within the 'update_if_set' list, this function returns without doing anything (to avoid wasting time). Dependant upon the category the object (target), its error (target+'_err'), or all Monte Carlo simulations (target+'_sim') are updated.

Parameters:
  • param_name (str) - The parameter name which is being set in the __setattr__() function.
  • target (str) - The name of the object to update.
  • update_if_set - If the parameter being set by the __setattr__() function is not within this list of parameters, don't waste time updating the target.
  • depends (array of str) - An array of names objects that the target is dependent upon.
  • category (str) - The category of the object to update (one of 'val', 'err', or 'sim').
Returns:
None

Class Variable Details [hide private]

__mod_attr__

Value:
['name',
 'Axx',
 'Axx_sim',
 'Axx_err',
 'Ayy',
 'Ayy_sim',
 'Ayy_err',
 'Axy',
...