Package functions :: Module mf_trans_functions
[hide private]
[frames] | no frames]

Source Code for Module functions.mf_trans_functions

 1  from Numeric import Float64, copy, zeros 
 2  from re import match 
 3   
 4  from chi2 import chi2 
 5  from dchi2 import dchi2 
 6  from d2chi2 import d2chi2 
 7   
 8  from ri import Ri 
 9  from dri import dRi 
10  from d2ri import d2Ri 
11   
12  from ri_prime import Ri_prime 
13  from dri_prime import dRi_prime 
14  from d2ri_prime import d2Ri_prime 
15   
16  from jw_mf_trans import Jw 
17  from djw_mf_trans import dJw 
18  from d2jw_mf_trans import d2Jw 
19   
20  from data import data 
21   
22 -class mf_trans_functions(chi2, dchi2, d2chi2, Ri, dRi, d2Ri, Ri_prime, dRi_prime, d2Ri_prime, Jw, dJw, d2Jw):
23 - def __init__(self, mf):
24 """Class used to store all the transformed model-free function classes. 25 26 See the respective files for descriptions of the functions and detials of the formulae. 27 """ 28 29 self.mf = mf 30 31 # Class containing data. 32 self.data = data()
33 34
35 - def init_param_types(self):
36 "Initialise arrays with the model-free parameter labels." 37 38 # Relaxation parameter labels. 39 if self.data.model == 'm1': 40 self.data.ri_param_types = ['Jj'] 41 elif self.data.model == 'm2': 42 self.data.ri_param_types = ['Jj', 'Jj'] 43 elif self.data.model == 'm3': 44 self.data.ri_param_types = ['Jj', 'Rex'] 45 elif self.data.model == 'm4': 46 self.data.ri_param_types = ['Jj', 'Jj', 'Rex'] 47 elif self.data.model == 'm5': 48 self.data.ri_param_types = ['Jj', 'Jj', 'Jj'] 49 else: 50 raise NameError, "Should not be here." 51 52 # J(w) parameter labels. 53 if self.data.model == 'm1': 54 self.data.jw_param_types = ['S2'] 55 elif self.data.model == 'm2': 56 self.data.jw_param_types = ['S2', 'te'] 57 elif self.data.model == 'm3': 58 self.data.jw_param_types = ['S2', None] 59 elif self.data.model == 'm4': 60 self.data.jw_param_types = ['S2', 'te', None] 61 elif self.data.model == 'm5': 62 self.data.jw_param_types = ['S2f', 'S2s', 'ts'] 63 else: 64 raise NameError, "Should not be here."
65 66
67 - def lm_dri(self):
68 return self.data.dri
69