Package prompt :: Module relax_data :: Class Relax_data
[hide private]
[frames] | no frames]

Class Relax_data

source code

Instance Methods [hide private]
 
__init__(self, relax) source code
 
back_calc(self, run=None, ri_label=None, frq_label=None, frq=None)
Function for back calculating relaxation data.
source code
 
copy(self, run1=None, run2=None, ri_label=None, frq_label=None)
Function for copying relaxation data from run1 to run2.
source code
 
delete(self, run=None, ri_label=None, frq_label=None)
Function for deleting the relaxation data corresponding to ri_label and frq_label.
source code
 
display(self, run=None, ri_label=None, frq_label=None)
Function for displaying the relaxation data corresponding to ri_label and frq_label.
source code
 
read(self, run=None, ri_label=None, frq_label=None, frq=None, file=None, dir=None, num_col=0, name_col=1, data_col=2, error_col=3, sep=None)
Function for reading R1, R2, or NOE relaxation data from a file.
source code
 
write(self, run=None, ri_label=None, frq_label=None, file=None, dir=None, force=0)
Function for writing R1, R2, or NOE relaxation data to a file.
source code
Method Details [hide private]

back_calc(self, run=None, ri_label=None, frq_label=None, frq=None)

source code 
Function for back calculating relaxation data.

Keyword Arguments
~~~~~~~~~~~~~~~~~

run:  The name of the run.

ri_label:  The relaxation data type, ie 'R1', 'R2', or 'NOE'.

frq_label:  The field strength label.

frq:  The spectrometer frequency in Hz.

copy(self, run1=None, run2=None, ri_label=None, frq_label=None)

source code 
Function for copying relaxation data from run1 to run2.

Keyword Arguments
~~~~~~~~~~~~~~~~~

run1:  The name of the run to copy the sequence from.

run2:  The name of the run to copy the sequence to.

ri_label:  The relaxation data type, ie 'R1', 'R2', or 'NOE'.

frq_label:  The field strength label.


Description
~~~~~~~~~~~

This function will copy relaxation data from 'run1' to 'run2'.  If ri_label and frq_label
are not given then all relaxation data will be copied, otherwise only a specific data set
will be copied.


Examples
~~~~~~~~

To copy all relaxation data from run 'm1' to run 'm9', type one of:

relax> relax_data.copy('m1', 'm9')
relax> relax_data.copy(run1='m1', run2='m9')
relax> relax_data.copy('m1', 'm9', None, None)
relax> relax_data.copy(run1='m1', run2='m9', ri_label=None, frq_label=None)

To copy only the NOE relaxation data with the frq_label of '800' from 'm3' to 'm6', type one
of:

relax> relax_data.copy('m3', 'm6', 'NOE', '800')
relax> relax_data.copy(run1='m3', run2='m6', ri_label='NOE', frq_label='800')

delete(self, run=None, ri_label=None, frq_label=None)

source code 
Function for deleting the relaxation data corresponding to ri_label and frq_label.

Keyword Arguments
~~~~~~~~~~~~~~~~~

run:  The name of the run.

ri_label:  The relaxation data type, ie 'R1', 'R2', or 'NOE'.

frq_label:  The field strength label.


Examples
~~~~~~~~

To delete the relaxation data corresponding to ri_label='NOE', frq_label='600', and the run
'm4', type:

relax> relax_data.delete('m4', 'NOE', '600')

display(self, run=None, ri_label=None, frq_label=None)

source code 
Function for displaying the relaxation data corresponding to ri_label and frq_label.

Keyword Arguments
~~~~~~~~~~~~~~~~~

run:  The name of the run.

ri_label:  The relaxation data type, ie 'R1', 'R2', or 'NOE'.

frq_label:  The field strength label.


Examples
~~~~~~~~

To display the NOE relaxation data at 600 MHz from the run 'm4', type

relax> relax_data.display('m4', 'NOE', '600')

read(self, run=None, ri_label=None, frq_label=None, frq=None, file=None, dir=None, num_col=0, name_col=1, data_col=2, error_col=3, sep=None)

source code 
Function for reading R1, R2, or NOE relaxation data from a file.

Keyword Arguments
~~~~~~~~~~~~~~~~~

run:  The name of the run.

ri_label:  The relaxation data type, ie 'R1', 'R2', or 'NOE'.

frq_label:  The field strength label.

frq:  The spectrometer frequency in Hz.

file:  The name of the file containing the relaxation data.

dir:  The directory where the file is located.

num_col:  The residue number column (the default is 0, ie the first column).

name_col:  The residue name column (the default is 1).

data_col:  The relaxation data column (the default is 2).

error_col:  The experimental error column (the default is 3).

sep:  The column separator (the default is white space).


Description
~~~~~~~~~~~

The frequency label argument can be anything as long as data collected at the same field
strength have the same label.


Examples
~~~~~~~~

The following commands will read the NOE relaxation data collected at 600 MHz out of a file
called 'noe.600.out' where the residue numbers, residue names, data, errors are in the
first, second, third, and forth columns respectively.

relax> relax_data.read('m1', 'NOE', '600', 599.7 * 1e6, 'noe.600.out')
relax> relax_data.read('m1', ri_label='NOE', frq_label='600', frq=600.0 * 1e6,
                       file='noe.600.out')


The following commands will read the R2 data out of the file 'r2.out' where the residue
numbers, residue names, data, errors are in the second, third, fifth, and sixth columns
respectively.  The columns are separated by commas.

relax> relax_data.read('m1', 'R2', '800 MHz', 8.0 * 1e8, 'r2.out', 1, 2, 4, 5, ',')
relax> relax_data.read('m1', ri_label='R2', frq_label='800 MHz', frq=8.0*1e8,
                       file='r2.out', num_col=1, name_col=2, data_col=4, error_col=5,
                       sep=',')


The following commands will read the R1 data out of the file 'r1.out' where the columns are
separated by the symbol '%'

relax> relax_data.read('m1', 'R1', '300', 300.1 * 1e6, 'r1.out', sep='%')

write(self, run=None, ri_label=None, frq_label=None, file=None, dir=None, force=0)

source code 
Function for writing R1, R2, or NOE relaxation data to a file.

Keyword Arguments
~~~~~~~~~~~~~~~~~

run:  The name of the run.

ri_label:  The relaxation data type, ie 'R1', 'R2', or 'NOE'.

frq_label:  The field strength label.

file:  The name of the file.

dir:  The directory name.

force:  A flag which, if set to 1, will cause the file to be overwritten.


Description
~~~~~~~~~~~

If no directory name is given, the file will be placed in the current working directory.
The 'ri_label' and 'frq_label' arguments are required for selecting which relaxation data
to write to file.