Reject by annotation for all functions?

Hi everyone
When preprocessing my EEG data I mark noisy spans as ‘bad’ annotations and find the ‘reject_by_annotation’ argument very useful for further analyses such as using psd_welch.

I am wondering why the ‘reject_by_annotation’ argument is only included in some analyses- e.g. psd_welch but not psd_multitaper?

and is there an equivalent way to remove/ignore ‘bad’ annotation spans of data when this ‘reject_by_annotation’ argument is not available?

Thankyou

Indeed it seems like psd_multitaper doesn’t have this parameter. However, it should be possible to add it depending on whether this function can properly deal with NaN values. Basically, you can try it manually using raw.get_data(), which has a reject_by_annotation parameter that can be set to 'omit', 'NaN' or None. In general, it depends on the function you want to apply after getting data and how you can treat segments annotated as bad.

1 Like