|
5 | 5 | from specparam.modes.mode import Mode |
6 | 6 | from specparam.modes.params import ParamDefinition |
7 | 7 | from specparam.modes.funcs import (expo_function, expo_nk_function, double_expo_function, |
8 | | - gaussian_function, skewnorm_function, cauchy_function) |
| 8 | + gaussian_function, skewed_gaussian_function, cauchy_function) |
9 | 9 | from specparam.modes.jacobians import jacobian_gauss |
10 | 10 |
|
11 | 11 | ################################################################################################### |
12 | 12 | ## APERIODIC MODES |
13 | 13 |
|
14 | | -# Fixed |
| 14 | +## AP - Fixed Mode |
| 15 | + |
15 | 16 | params_fixed = ParamDefinition(OrderedDict({ |
16 | 17 | 'offset' : 'Offset of the aperiodic component.', |
17 | 18 | 'exponent' : 'Exponent of the aperiodic component.', |
|
30 | 31 | ) |
31 | 32 |
|
32 | 33 |
|
33 | | -# Knee |
| 34 | +## AP - Knee Mode |
| 35 | + |
34 | 36 | params_knee = ParamDefinition(OrderedDict({ |
35 | 37 | 'offset' : 'Offset of the aperiodic component.', |
36 | 38 | 'knee' : 'Knee of the aperiodic component.', |
|
50 | 52 | ) |
51 | 53 |
|
52 | 54 |
|
53 | | -# Double exponent |
54 | | -params_double_exp = ParamDefinition(OrderedDict({ |
| 55 | +## AP - Double Exponent Mode |
| 56 | + |
| 57 | +params_doublexp = ParamDefinition(OrderedDict({ |
55 | 58 | 'offset' : 'Offset of the aperiodic component.', |
56 | 59 | 'exponent0' : 'Exponent of the aperiodic component, before the knee.', |
57 | 60 | 'knee' : 'Knee of the aperiodic component.', |
|
64 | 67 | description='Fit an function with 2 exponents and a knee.', |
65 | 68 | func=double_expo_function, |
66 | 69 | jacobian=None, |
67 | | - params=params_double_exp, |
| 70 | + params=params_doublexp, |
68 | 71 | ndim=1, |
69 | 72 | freq_space='linear', |
70 | 73 | powers_space='log10', |
|
81 | 84 | ################################################################################################### |
82 | 85 | ## PERIODIC MODES |
83 | 86 |
|
84 | | -# Gaussian |
| 87 | +## PE - Gaussian Mode |
| 88 | + |
85 | 89 | params_gauss = ParamDefinition(OrderedDict({ |
86 | 90 | 'cf' : 'Center frequency of the peak.', |
87 | 91 | 'pw' : 'Power of the peak, over and above the aperiodic component.', |
|
101 | 105 | ) |
102 | 106 |
|
103 | 107 |
|
104 | | -# Skewed Gaussian |
105 | | -params_skew = ParamDefinition(OrderedDict({ |
| 108 | +## PE - Skewed Gaussian Mode |
| 109 | + |
| 110 | +params_skewed_gaussian = ParamDefinition(OrderedDict({ |
106 | 111 | 'cf' : 'Center frequency of the peak.', |
107 | 112 | 'pw' : 'Power of the peak, over and above the aperiodic component.', |
108 | 113 | 'bw' : 'Bandwidth of the peak.', |
109 | 114 | 'skew' : 'Skewness of the peak.', |
110 | 115 | })) |
111 | 116 |
|
112 | | -pe_skewnorm = Mode( |
113 | | - name='skewnorm', |
| 117 | +pe_skewed_gaussian = Mode( |
| 118 | + name='skewed_gaussian', |
114 | 119 | component='periodic', |
115 | 120 | description='Skewed Gaussian peak fit function.', |
116 | | - func=skewnorm_function, |
| 121 | + func=skewed_gaussian_function, |
117 | 122 | jacobian=None, |
118 | | - params=params_skew, |
| 123 | + params=params_skewed_gaussian, |
119 | 124 | ndim=2, |
120 | 125 | freq_space='linear', |
121 | 126 | powers_space='log10', |
122 | 127 | ) |
123 | 128 |
|
124 | 129 |
|
125 | | -# Cauchy |
| 130 | +## PE - Cauchy Mode |
| 131 | + |
126 | 132 | params_cauchy = ParamDefinition(OrderedDict({ |
127 | 133 | 'cf' : 'Center frequency of the peak.', |
128 | 134 | 'pw' : 'Power of the peak, over and above the aperiodic component.', |
|
145 | 151 | # Collect available periodic modes |
146 | 152 | PE_MODES = { |
147 | 153 | 'gaussian' : pe_gaussian, |
148 | | - 'skewed_gaussian' : pe_skewnorm, |
| 154 | + 'skewed_gaussian' : pe_skewed_gaussian, |
149 | 155 | 'cauchy' : pe_cauchy, |
150 | 156 | } |
151 | 157 |
|
|
0 commit comments