@@ -300,6 +300,7 @@ def __init__(
300300 tmin ,
301301 tmax ,
302302 picks ,
303+ exclude ,
303304 proj ,
304305 remove_dc ,
305306 * ,
@@ -348,7 +349,9 @@ def __init__(
348349
349350 # prep times and picks
350351 self ._time_mask = _time_mask (inst .times , tmin , tmax , sfreq = self .sfreq )
351- self ._picks = _picks_to_idx (inst .info , picks , "data" , with_ref_meg = False )
352+ self ._picks = _picks_to_idx (
353+ inst .info , picks , "data" , exclude , with_ref_meg = False
354+ )
352355
353356 # add the info object. bads and non-data channels were dropped by
354357 # _picks_to_idx() so we update the info accordingly:
@@ -1081,6 +1084,7 @@ class Spectrum(BaseSpectrum):
10811084 %(fmin_fmax_psd)s
10821085 %(tmin_tmax_psd)s
10831086 %(picks_good_data_noref)s
1087+ %(exclude_psd)s
10841088 %(proj_psd)s
10851089 %(remove_dc)s
10861090 %(reject_by_annotation_psd)s
@@ -1122,6 +1126,7 @@ def __init__(
11221126 tmin ,
11231127 tmax ,
11241128 picks ,
1129+ exclude ,
11251130 proj ,
11261131 remove_dc ,
11271132 reject_by_annotation ,
@@ -1145,6 +1150,7 @@ def __init__(
11451150 tmin ,
11461151 tmax ,
11471152 picks ,
1153+ exclude ,
11481154 proj ,
11491155 remove_dc ,
11501156 n_jobs = n_jobs ,
@@ -1290,6 +1296,7 @@ class EpochsSpectrum(BaseSpectrum, GetEpochsMixin):
12901296 %(fmin_fmax_psd)s
12911297 %(tmin_tmax_psd)s
12921298 %(picks_good_data_noref)s
1299+ %(exclude_psd)s
12931300 %(proj_psd)s
12941301 %(remove_dc)s
12951302 %(n_jobs)s
@@ -1327,6 +1334,7 @@ def __init__(
13271334 tmin ,
13281335 tmax ,
13291336 picks ,
1337+ exclude ,
13301338 proj ,
13311339 remove_dc ,
13321340 * ,
@@ -1347,6 +1355,7 @@ def __init__(
13471355 tmin ,
13481356 tmax ,
13491357 picks ,
1358+ exclude ,
13501359 proj ,
13511360 remove_dc ,
13521361 n_jobs = n_jobs ,
@@ -1459,6 +1468,7 @@ def average(self, method="mean"):
14591468 tmin = None ,
14601469 tmax = None ,
14611470 picks = None ,
1471+ exclude = (),
14621472 proj = None ,
14631473 remove_dc = None ,
14641474 reject_by_annotation = None ,
@@ -1561,6 +1571,7 @@ def read_spectrum(fname):
15611571 tmin = None ,
15621572 tmax = None ,
15631573 picks = None ,
1574+ exclude = (),
15641575 proj = None ,
15651576 remove_dc = None ,
15661577 reject_by_annotation = None ,
0 commit comments