diff --git a/examples/plot_10_run_pipeline.py b/examples/plot_10_run_pipeline.py index 9248092..eeac77d 100644 --- a/examples/plot_10_run_pipeline.py +++ b/examples/plot_10_run_pipeline.py @@ -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 diff --git a/examples/test_config.yaml b/examples/test_config.yaml new file mode 100644 index 0000000..d03fad5 --- /dev/null +++ b/examples/test_config.yaml @@ -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 diff --git a/pylossless/pipeline.py b/pylossless/pipeline.py index 383f8db..8be3c93 100644 --- a/pylossless/pipeline.py +++ b/pylossless/pipeline.py @@ -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 diff --git a/pyproject.toml b/pyproject.toml index a870304..a85b835 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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",