1 import xml.dom as dom
2 import xml.dom.minidom as minidom
3
4 import os, sys
5 import traceback
6 import numpy
7 import operator
8
9 from park.fitpark.fitterObject import FitterObject
10 from park.fitpark.parameterSet import ParameterSet
11
12
13 """
14 A model implementing the Reflectivity function.
15 """
16
17 REFL_PS_TAG = 'refl'
18
19
21 """
22 The parameters (x0,x0,sigma) for the Gaussian function:
23 f(x) = a0 * exp(-[(x-x0)/sigma]^2),
24 whose default values are :
25 a0 = 1.0 , x0 = 0.0, sigma = 1.0
26 """
27
28 PARAMS = { 'depth' : 100,
29 'rough':0.0,
30 'rho':1.0,
31 'mu': 0.0
32 }
33 PARAMS_TAG = REFL_PS_TAG
34
36 """ constructor. """
37 ParameterSet.__init__(self, name)
38
39
40
41
43 """
44 Magnetic Case
45 """
46
47 PARAMS = { 'depth' : 100,
48 'rough':0.0,
49 'rho':1.0,
50 'mu': 1.0,
51 'rho_m':0.0,
52 'theta_m':270
53 }
54 PARAMS_TAG = REFL_PS_TAG
55
57 """ constructor. """
58 ParameterSet.__init__(self, name)
59
60
61
62
63
65 pm = ReflParameterSet('R0')
66 print 'Refl Parameter:', pm
67
68 pm.rho = 10.0
69 print "\nRefl Parameter after pm['rho']=10:", pm
70
71 pm.rho = [10.0, 20.0]
72 print '\nRefl Parameter after pm.rho=[10,20]:', pm
73
74
75 if __name__ == '__main__':
76 test()
77