Commit bf6ef499 authored by Jürgen Dammers's avatar Jürgen Dammers
Browse files

Merge branch 'get_picks' into 'master'

error msg if no aux channels were found

See merge request j.dammers/gdcnn!1
parents 2a396e35 796b5f0f
......@@ -63,10 +63,11 @@ from dcnn_utils import find_files
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
# select your config file
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
fnconfig = 'config_example.yaml'
# fnconfig = 'config_4D_CAU.yaml'
# fnconfig = 'config_4D_INTEXT.yaml'
fnconfig = 'config_MEGIN.yaml'
# fnconfig = 'config_MEGIN.yaml'
# fnconfig = 'config_CTF_Paris.yaml'
# fnconfig = 'config_CTF_Philly.yaml'
......
# gDCNN config file
version: 'v0.1'
###############################################################################
# global and path settings
###############################################################################
n_jobs: 'cuda' # use this only if you have installed cuda properly
#n_jobs: 1
path:
basedir: '/home/jdammers/ownCloud/Data/gDCNN/'
# the following will be relative to basedir
data_meg: 'meg_rawdata/Juelich/INTEXT/' # input directory
data_train: 'ica_labeled/Juelich/' # output directory
report: 'report/Juelich/' # save reports here
###############################################################################
# MEG system
###############################################################################
meg:
# type of MEG system: 4D, CTF, Neuromag
vendor: '4D' # CTF, MEGIN, 4D
system: 'MAGNES3600' # CTF275, CTF151, Triux, TriuxNeo, MAGNES3600
location: 'Juelich'
# info about experiment: task or rest
exp_type: 'task' # task or rest
exp_name: 'INTEXT' # any meaningful acronym
exp_info: '' # optional free text
# Auxilliary channels must be of good quality!
ecg_ch: 'ECG 001' # ECG channel
eog_ch1: 'EOG 001' # vertical EOG channel
eog_ch2: 'EOG 002' # horizontal EOG channel (optional, otherwise set eog_ch2: null)
reject: null # to be set appropriately or None (null)
apply_notch: False # not needed for ICA as filtering is applied
line_freqs: [50., 100., 150., 200., 250., 300., 350.]
apply_noise_reduction: False
###############################################################################
# ica settings
###############################################################################
ica:
ecg_thresh_ctps: 0.20
ecg_thresh_corr: 0.20 # set to null (None) if not to be used
eog_thresh_ver: 0.20
eog_thresh_hor: 0.20
......@@ -515,10 +515,22 @@ class PICKS(_SLOTS):
:return:
np.array , picks [ECG,EOG]
'''
picks = self.labels2picks(self.aux_labels)
self._aux_types = self.raw.get_channel_types(picks,unique=False,only_data_chs=False)
error_msg = "\nERROR => Wrong or missing aux channel labels in config!\n" \
" -> aux labels: {}".format(self.aux_labels)
try:
picks = self.labels2picks(self.aux_labels)
assert picks is not None, error_msg
assert (len(picks) == len(self._aux_labels)), error_msg + "\n -> picks found: {}".format(picks)
self._aux_types = self.raw.get_channel_types(picks, unique=False, only_data_chs=False)
except ValueError:
# logger.exception( error_msg +"\n -> picks: {}".format(picks) )
raise SystemExit(error_msg + "\n -> picks: {}".format(picks))
return picks
def _get_all_aux(self):
'''
get all aux picks
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment