|
163 | 163 |
|
164 | 164 | ################################################################################################### |
165 | 165 | # A note on interpreting the 'knee' parameter |
166 | | -# ------------------------------------------- |
| 166 | +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
167 | 167 | # |
168 | 168 | # The aperiodic fit has the form: |
169 | 169 | # |
|
214 | 214 | # 'knee' mode to be able to appropriately characterize the data. |
215 | 215 | # |
216 | 216 |
|
| 217 | +################################################################################################### |
| 218 | +# Aperiodic Fit Mode: doublexp |
| 219 | +# ---------------------------- |
| 220 | +# |
| 221 | +# Returning to our exploration of the available fit modes for the aperiodic component, |
| 222 | +# another avaible fit mode is the 'double exponent' or 'doublexp'. |
| 223 | +# |
| 224 | +# In the above 'knee' mode, you might have noticed that even though the knee is described as |
| 225 | +# a change in the value of the aperiodic exponent, implying there are two different |
| 226 | +# exponent values, we still only fit one exponent value. In the above case, the exponent |
| 227 | +# above the knee is fit, whereas the exponent below the knee is assumed to be zero. |
| 228 | +# |
| 229 | +# By comparison, the double exponent model fits two different exponent values, above and |
| 230 | +# below the knee. |
| 231 | +# |
| 232 | + |
| 233 | +################################################################################################### |
| 234 | + |
| 235 | +# Create and fit a power spectrum model in doublexp aperiodic fit mode |
| 236 | +fm = SpectralModel(peak_width_limits=[2, 8], aperiodic_mode='doublexp') |
| 237 | +fm.report(freqs, spectrum, [2, 70], plt_log=True) |
| 238 | + |
| 239 | +################################################################################################### |
| 240 | +# |
| 241 | +# In the above example model fit, we can see that the aperiodic mode now includes 4 fit parameters, |
| 242 | +# including two different exponent values (exponent1, reflecting below the knee, and exponent2, |
| 243 | +# reflecting above the knee), as well as the offset and knee value. |
| 244 | +# |
| 245 | + |
217 | 246 | ################################################################################################### |
218 | 247 | # Choosing an Aperiodic Fit Mode |
219 | 248 | # ------------------------------ |
|
233 | 262 | # |
234 | 263 | # - This is likely across smaller frequency ranges, such as 3-30. |
235 | 264 | # - Do not perform no-knee fits across a range in which this does not hold. |
236 | | -# - If there is a clear knee, then use knee fits. |
| 265 | +# - If there is a clear knee, then use a fit mode that includes a knee. |
237 | 266 | # |
238 | 267 | # - This is likely across larger fitting ranges such as 1-150 Hz. |
239 | 268 | # - Be wary of ambiguous ranges, where there may or may not be a knee. |
|
0 commit comments