Commit 29c7846
Laurent Mackay
Adds more flexibility in the aperiodic/oscillatory fitting
DESCRIPTION:
I have added a keyword `ap_range` to the FOOOF.fit() function.
When `ap_range` is specified, the already existing `freq_range` keyword
is used to determine the frequencies for the oscillatory fits while the
ap_range keyword is used for the aperiodic fit. When it is not
specified, everything proceeds as before.
This allows the two parts FO and OOF to be more-or-less independent of
one another if so-desired.
Furthermore, the `ap_range` keyword may also be a set of indices in
order to allow for a very simple implementation of exclusion zones.
TESTING:
Tested on 5 different EEG files, no errors unless inputs are the wrong
size.
Update: I have also modified the FOOOFGroup.fit() in order to work with
this keyword.1 parent 9a7fabb commit 29c7846
3 files changed
+38
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
332 | 332 | | |
333 | 333 | | |
334 | 334 | | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
335 | 338 | | |
336 | 339 | | |
337 | 340 | | |
338 | 341 | | |
339 | 342 | | |
340 | | - | |
341 | 343 | | |
342 | 344 | | |
343 | 345 | | |
| |||
358 | 360 | | |
359 | 361 | | |
360 | 362 | | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
361 | 371 | | |
362 | | - | |
363 | | - | |
364 | 372 | | |
365 | 373 | | |
366 | 374 | | |
| |||
374 | 382 | | |
375 | 383 | | |
376 | 384 | | |
377 | | - | |
378 | | - | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
379 | 391 | | |
380 | 392 | | |
381 | | - | |
382 | 393 | | |
| 394 | + | |
383 | 395 | | |
384 | | - | |
385 | | - | |
| 396 | + | |
386 | 397 | | |
387 | 398 | | |
388 | 399 | | |
389 | | - | |
| 400 | + | |
390 | 401 | | |
391 | | - | |
392 | | - | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
393 | 406 | | |
394 | 407 | | |
395 | 408 | | |
| |||
398 | 411 | | |
399 | 412 | | |
400 | 413 | | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
401 | 419 | | |
402 | 420 | | |
403 | | - | |
| 421 | + | |
404 | 422 | | |
405 | 423 | | |
406 | 424 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
141 | | - | |
| 141 | + | |
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | | - | |
| 170 | + | |
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
177 | | - | |
| 177 | + | |
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
| |||
366 | 366 | | |
367 | 367 | | |
368 | 368 | | |
369 | | - | |
| 369 | + | |
370 | 370 | | |
371 | 371 | | |
372 | | - | |
| 372 | + | |
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
| |||
0 commit comments