Package data :: Module diff_tensor :: Class DiffTensorData
[hide private]
[frames] | no frames]

Class DiffTensorData

source code


An empty data container for the diffusion tensor elements.

Instance Methods [hide private]
 
__deepcopy__(self, memo)
Replacement deepcopy method.
source code
 
__init__(self)
Initialise a few instance variables.
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
 
from_xml(self, diff_tensor_node)
Recreate the diffusion tensor data structure from the XML diffusion tensor node.
source code
 
to_xml(self, doc, element)
Create an XML element for the diffusion tensor.
source code

Inherited from data_classes.Element: __repr__, is_empty

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

Class Variables [hide private]
  __mod_attr__ = ['type', 'fixed', 'spheroid_type', 'tm', 'tm_si...
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

Initialise a few instance variables.

Parameters:
  • name - The name of the object.
  • desc - The description of the object.
Overrides: object.__init__

__setattr__(self, name, value)

source code 

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

The equations for the parameters Dper, Dpar, and Dratio are:

   Dratio  =  Dpar / Dper.
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

from_xml(self, diff_tensor_node)

source code 

Recreate the diffusion tensor data structure from the XML diffusion tensor node.

Parameters:
  • diff_tensor_node (xml.dom.minicompat.Element instance) - The diffusion tensor XML node.
Overrides: data_classes.Element.from_xml

to_xml(self, doc, element)

source code 

Create an XML element for the diffusion tensor.

Parameters:
  • doc (xml.dom.minidom.Document instance) - The XML document object.
  • element (XML element object) - The element to add the diffusion tensor element to.
Overrides: data_classes.Element.to_xml

Class Variable Details [hide private]

__mod_attr__

Value:
['type',
 'fixed',
 'spheroid_type',
 'tm',
 'tm_sim',
 'tm_err',
 'Da',
 'Da_sim',
...