If I was to compute a PSD using multitapers on a Raw
object, and that abnormal peak-to-peak amplitudes are annotated with BAD_
, I could use psd_multitaper
(or the new Spectrum class) in combination with reject_by_annotation=True
.
However, I have long Epochs
(because it’s way more convenient for this particular dataset). Each Raw
recording contains:
- 10 epochs of 16 seconds (condition 1)
- 10 epochs of 8 seconds (condition 2)
And I would like to compute the PSD for each of those epochs individually. Let’s consider only one of those 2 conditions: the 10 epochs of 16 seconds.
Each of those epochs are quite long, and despite the preprocessing, they might include some abnormal artifacts in the form of large PTP amplitude. Thus, before computing the PSD, I thought I could cut them down into smaller e.g. 4 seconds sub-epochs, and reject the bad sub-epochs above a PTP threshold (without going into details, I’m using autoreject
to compute a global rejection threshold across a condition).
Now, 4 seconds is long, so if the sub-epochs do not overlap, I might end up rejecting 1/4 (or more) of the 16 seconds available before computing the PSD of this specific 16 seconds epoch.
Overlap it is, I don’t see a reason why I should make the overlap small, the only downside will be RAM and computation time. → Let’s consider that an epoch of 16 seconds is now cut down into sub-epochs of 4 seconds overlapping for 3.9 seconds. Now, a high-PTP event will drop less signal.
Question 1: Does this overlapping impact the computation of the PSD?
Assuming the answer to the previous question is negative, as I’m thinking, then what about the edges? Overlapping sub-epochs means that the edges of the 16 seconds epoch are now far less represented in the object passed to psd_multitaper
.
Question 2: Any thoughts on padding? Either zero-padding or reflective padding?
Am I overthinking this? Maybe running
psd_multitaper
directly on the 16 seconds epoch is fine… I don’t expect to drop many of the sub-epochs.