Skip to content

Commit

Permalink
DOC: update tutorials
Browse files Browse the repository at this point in the history
  • Loading branch information
scott-huberty committed Nov 7, 2023
1 parent 0616240 commit edf6130
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 4 deletions.
6 changes: 4 additions & 2 deletions examples/plot_10_run_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,10 @@
#
# The :class:`~pylossless.LosslessPipeline` object stores flagged channels and ICs in
# the :attr:`~pylossless.LosslessPipeline.flags` attribute:
print(f"flagged channels: {pipeline.flags['ch']}")
print(f"flagged ICs: {pipeline.flags['ic']}")
pipeline

# %%
pipeline.flags["ic"]

# %%
# Get the cleaned data
Expand Down
117 changes: 117 additions & 0 deletions examples/test_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
aref_trim: 30
bridged_channels:
bridge_trim: 40
bridge_z: 6
epoching:
epochs_args:
baseline: null
tmax: 1
tmin: 0
overlap: 0
filtering:
filter_args:
h_freq: 100
l_freq: 1
notch_filter_args:
freqs: []
find_breaks: null
ica:
ica_args:
run1:
method: fastica
run2:
fit_params:
extended: true
method: infomax
noisy_ic_epochs:
flag_crit: 0.2
outlier_method: quantile
outliers_kwargs:
k: 6
lower: 0.3
upper: 0.7
in_path: []
montage_info:
- 0.0
- -16.0
- 0.0
- -0.02
- 0.0
- -1.58
- 10.7
- 11.5
- 11.5
nearest_neighbors:
n_nbr_ch: 3
n_nbr_epoch: 3
noisy_channels:
flag_crit: 0.3
outlier_method: quantile
outliers_kwargs:
k: 16
lower: 0.25
upper: 0.75
noisy_epochs:
flag_crit: 0.2
outlier_method: quantile
outliers_kwargs:
k: 16
lower: 0.3
upper: 0.7
order: 1
out_path: derivatives/EEG-IP-L
project:
analysis_montage: ''
bids_montage: GSN-HydroCel-129
coordsys:
EEGCoordinateSystem: Other
EEGCoordinateUnits: metres
general_info:
authors:
- Q1K Neuroimaging group
dataset_doi: []
funding: Azrieli Foundationt
how_to_acknowledge: tba
institution_Name: McGill University
institution_address: 3775 Rue University, Montreal, QC
license: ''
name: Q1K Mismatched Negativity
references_and_links: []
readme: '# Q1K ACAR Dataset'
set_montage_kwargs: {}
t_info:
EEG_placement_scheme: EGI 129
cap_manufacturer: EGI
cap_manufacturers_model_name: Hydrocel 129 Channel
hardware_filters: n/a
manufacturer: Electrical Geodesics
manufacturers_model_name: NetAmps300
power_line_frequency: 60
software_filters: n/a
software_versions: NetStation V4.5
ref_loc_file: derivatives/EEG-IP-L/code/misc/standard_1020_ll_ref19.elc
save_f_res: 1
sd_t_pad: 1
slurm_options:
account: def-emayada
job_name: pylossless
memory: 16g
mpi: false
num_tasks: 1
program_options: []
threads_per_task: []
time_limit: 2h
uncorrelated_channels:
flag_crit: 0.2
outlier_method: quantile
outliers_kwargs:
k: 16
lower: 0.3
upper: 0.7
uncorrelated_epochs:
flag_crit: 0.2
outlier_method: quantile
outliers_kwargs:
k: 16
lower: 0.3
upper: 0.7
2 changes: 1 addition & 1 deletion pylossless/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ def add_pylossless_annotations(self, inds, event_type, epochs):
# it's end will coincide with the first sample of the
# next epoch, causing it to erroneously be rejected.
df["duration"] = 1 / epochs.info["sfreq"] * len(epochs.times[:-1])
df["description"] = f"bad_pylossless_{event_type}"
df["description"] = f"bad_{event_type}"

# Merge close onsets to prevent a bunch of 1-second annotations of the same name
# find onsets close enough to be considered the same
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ ignore-decorators = [
]

[tool.black]
exclude = "(dist/)|(build/)|(.*\\.ipynb)" # Exclude build artifacts and notebooks
exclude = "(dist/)|(build/)|(examples/)|(.*\\.ipynb)" # Exclude build artifacts and notebooks

[tool.pytest.ini_options]
filterwarnings = ["error",
Expand Down

0 comments on commit edf6130

Please sign in to comment.