Package data_store :: 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)
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
 
from_xml(self, diff_tensor_node, file_version=1)
Recreate the diffusion tensor data structure from the XML diffusion tensor node.
source code
 
set(self, param=None, value=None, category='val', sim_index=None)
Set a diffusion tensor parameter.
source code
 
set_fixed(self, flag)
Set if the diffusion 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
 
set_type(self, value)
Set the diffusion tensor type.
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_sim',...
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 

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

from_xml(self, diff_tensor_node, file_version=1)

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.
  • file_version (int) - The relax XML version of the XML file.
Overrides: data_classes.Element.from_xml

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

source code 

Set a diffusion 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 diffusion 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.

set_type(self, value)

source code 

Set the diffusion tensor type.

Parameters:
  • value (str) - The diffusion tensor type. This can be one of 'sphere', 'spheroid' or 'ellipsoid'.

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',
...