Package data_store :: 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)
Make this object read-only.
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
 
set(self, param=None, value=None, category='val', sim_index=None)
Set a alignment tensor parameter.
source code
 
set_fixed(self, flag)
Set if the alignment tensor should be fixed during optimisation or not.
source code
 
set_sim_num(self, sim_number=None)
Set the number of Monte Carlo simulations for the construction of the simulation structures.
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', 'Ayy_...
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 

Make this object read-only.

Overrides: object.__setattr__

_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

set(self, param=None, value=None, category='val', sim_index=None)

source code 

Set a alignment tensor parameter.

Parameters:
  • param (str) - The name of the parameter to set.
  • value (anything) - The parameter value.
  • category (str) - The type of parameter to set. This can be 'val' for the normal parameter, 'err' for the parameter error, or 'sim' for Monte Carlo or other simulated parameters.
  • sim_index (int or None) - The index for a Monte Carlo simulation for simulated parameter.

set_fixed(self, flag)

source code 

Set if the alignment tensor should be fixed during optimisation or not.

Parameters:
  • flag (bool) - The fixed flag.

set_sim_num(self, sim_number=None)

source code 

Set the number of Monte Carlo simulations for the construction of the simulation structures.

Parameters:
  • sim_number (int) - The number of Monte Carlo simulations.

Class Variable Details [hide private]

_mod_attr

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