Skip to content

Commit 966679f

Browse files
Updating the default config to be compatible with adult recordings.
1 parent 0cc087b commit 966679f

File tree

3 files changed

+165
-21
lines changed

3 files changed

+165
-21
lines changed
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
######################### General properties #########################
2+
#ref_loc_file: derivatives/pylossless/code/misc/standard_1020_ll_ref19.elc
3+
#montage_info: [0.0, -16.0, 0.0, -0.02, 0.0, -1.58, 10.7, 11.5, 11.5]
4+
5+
################## General info about the project ####################
6+
project:
7+
readme: "# Description of the dataset"
8+
9+
# Montage use to make file BIDS compliant.
10+
# Can be path to digitized montage OR a string of one of mne's built in
11+
# standard montages as specified by mne.channels.get_builtin_montages().
12+
# Can be left empty if the input dataset is already in BIDS format.
13+
bids_montage: GSN-HydroCel-129
14+
15+
# montage used while running the lossless pipeline.
16+
# if empty, the pipeline will use the electrodes.tsv sidecar file, if created
17+
# during the BIDS conversion.
18+
# If specified, needs to be a string of one of mne's built in standard montages.
19+
analysis_montage: ""
20+
21+
set_montage_kwargs: {}
22+
23+
coordsys:
24+
EEGCoordinateSystem: Other
25+
EEGCoordinateUnits: metres
26+
27+
general_info:
28+
authors: [Unspecified]
29+
institution_Name: Unspecified
30+
institution_address: Unspecified
31+
dataset_doi: []
32+
funding: Unspecified
33+
how_to_acknowledge: tba
34+
license: ""
35+
name: Unspecified
36+
references_and_links: []
37+
38+
t_info:
39+
EEG_placement_scheme: EGI 129
40+
cap_manufacturer: EGI
41+
cap_manufacturers_model_name: Hydrocel 129 Channel
42+
hardware_filters: n/a
43+
manufacturer: Electrical Geodesics
44+
manufacturers_model_name: NetAmps300
45+
power_line_frequency: 60
46+
software_filters: n/a
47+
software_versions: NetStation V4.5
48+
49+
######################## Task break detection ########################
50+
# See arguments definition from mne.preprocessing.annotate_breaks
51+
find_breaks:
52+
53+
############################## epoching ##############################
54+
epoching:
55+
overlap: 0
56+
57+
# See arguments definition from mne.Epochs
58+
epochs_args:
59+
baseline: null
60+
tmax: 1
61+
tmin: 0
62+
63+
########################### EEG filtering ############################
64+
# See arguments definition from mne.io.Raw.filter & mne.io.Raw.notch_filter
65+
filtering:
66+
filter_args:
67+
h_freq: 100
68+
l_freq: 1
69+
notch_filter_args:
70+
freqs: [60]
71+
72+
############################## SLURM #################################
73+
# Options for running the pipeline on a cluster
74+
# through SLURM
75+
slurm_options:
76+
account: def-emayada
77+
job_name: pylossless
78+
memory: 16g
79+
mpi: false
80+
num_tasks: 1
81+
program_options: []
82+
threads_per_task: []
83+
time_limit: 2h
84+
85+
########################## Nearest neighbor ##########################
86+
nearest_neighbors:
87+
n_nbr_ch: 3
88+
n_nbr_epoch: 3
89+
90+
####################### Pipeline steps config ########################
91+
bridged_channels:
92+
bridge_trim: 40
93+
bridge_z: 6
94+
95+
noisy_channels:
96+
flag_crit: 0.2
97+
outlier_method: quantile
98+
outliers_kwargs:
99+
k: 6
100+
lower: 0.25
101+
upper: 0.75
102+
103+
uncorrelated_channels:
104+
flag_crit: 0.2
105+
outlier_method: quantile
106+
outliers_kwargs:
107+
k: 6
108+
lower: 0.25
109+
upper: 0.75
110+
111+
noisy_epochs:
112+
flag_crit: 0.2
113+
outlier_method: quantile
114+
outliers_kwargs:
115+
k: 6
116+
lower: 0.25
117+
upper: 0.75
118+
119+
uncorrelated_epochs:
120+
flag_crit: 0.2
121+
outlier_method: quantile
122+
outliers_kwargs:
123+
k: 6
124+
lower: 0.25
125+
upper: 0.75
126+
127+
################################ ICA #################################
128+
ica:
129+
noisy_ic_epochs:
130+
flag_crit: 0.2
131+
outlier_method: quantile
132+
outliers_kwargs:
133+
k: 6
134+
lower: 0.25
135+
upper: 0.75
136+
137+
# See arguments definition from mne.preprocessing.ICA
138+
ica_args:
139+
run1:
140+
method: fastica
141+
run2:
142+
method: infomax
143+
fit_params:
144+
extended: True

pylossless/assets/ll_default_config.yaml renamed to pylossless/assets/ll_default_config_infants.yaml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
######################### General properties #########################
2-
aref_trim: 30
3-
order: 1
4-
out_path: derivatives/EEG-IP-L
5-
ref_loc_file: derivatives/EEG-IP-L/code/misc/standard_1020_ll_ref19.elc
6-
save_f_res: 1
7-
sd_t_pad: 1
8-
in_path: []
9-
montage_info: [0.0, -16.0, 0.0, -0.02, 0.0, -1.58, 10.7, 11.5, 11.5]
2+
#ref_loc_file: derivatives/pylossless/code/misc/standard_1020_ll_ref19.elc
3+
#montage_info: [0.0, -16.0, 0.0, -0.02, 0.0, -1.58, 10.7, 11.5, 11.5]
104

115
################## General info about the project ####################
126
project:
13-
readme: "# Q1K ACAR Dataset"
7+
readme: "# Description of the dataset"
148

159
# Montage use to make file BIDS compliant.
1610
# Can be path to digitized montage OR a string of one of mne's built in
@@ -31,14 +25,14 @@ project:
3125
EEGCoordinateUnits: metres
3226

3327
general_info:
34-
authors: [Q1K Neuroimaging group]
35-
institution_Name: McGill University
36-
institution_address: 3775 Rue University, Montreal, QC
28+
authors: [Unspecified]
29+
institution_Name: Unspecified
30+
institution_address: Unspecified
3731
dataset_doi: []
38-
funding: Azrieli Foundationt
32+
funding: Unspecified
3933
how_to_acknowledge: tba
4034
license: ""
41-
name: Q1K Mismatched Negativity
35+
name: Unspecified
4236
references_and_links: []
4337

4438
t_info:

pylossless/config/config.py

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class ConfigMixin(dict):
1515
"""Base configuration file class for pipeline procedures."""
1616

1717
DEFAULT_CONFIG_PATH = (
18-
Path(__file__).parent.parent / "assets" / "ll_default_config.yaml"
18+
Path(__file__).parent.parent / "assets"
1919
)
2020

2121
def read(self, file_name):
@@ -49,13 +49,19 @@ def print(self):
4949

5050

5151
class Config(ConfigMixin):
52-
"""Representation of configuration file for running the pipeline."""
52+
"""Representation of configuration file for running the pipeline.
5353
54-
DEFAULT_CONFIG_PATH = (
55-
Path(__file__).parent.parent / "assets" / "ll_default_config.yaml"
56-
)
54+
Parameters
55+
----------
56+
kind : str | pathlib.Path
57+
Can be either 'adults' or 'infants'. Default to 'adults'.
58+
"""
5759

58-
def load_default(self):
60+
def load_default(self, kind="adults"):
5961
"""Get the default pylossless config file."""
60-
self.read(Config.DEFAULT_CONFIG_PATH)
62+
63+
path = Config.DEFAULT_CONFIG_PATH / f"ll_default_config_{kind}.yaml"
64+
if not path.exists():
65+
raise ValueError(f"No default configuration for kind '{kind}'.")
66+
self.read(path)
6167
return self

0 commit comments

Comments
 (0)