What's new
v1.9.0¶
New features & enhancements¶
- Added number of subject to
sub-average
report (#902, #910 by @SophieHerbst) - The type annotations in the default configuration file are now easier to read: We
replaced
Union[X, Y]
withX | Y
andOptional[X]
withX | None
. (#908, #911 by @hoechenberger) - Epochs metadata creation now supports variable time windows by specifying the names of events via
epochs_metadata_tmin
andepochs_metadata_tmax
. (#873 by @hoechenberger) - If you requested processing of non-existing subjects, we will now provide a more helpful error message. (#928 by @hoechenberger)
- We improved the logging output for automnated epochs rejection and cleaning via ICA and SSP. (#936, #937 by @hoechenberger)
- ECG and EOG signals created during ICA artifact detection are now saved to disk. (#938 by @hoechenberger)
Behavior changes¶
- All ICA HTML reports have been consolidated in the standard subject
*_report.html
file instead of producing separate files. (#899 by @larsoner) - Changed default for
source_info_path_update
toNone
. In_04_make_forward.py
and_05_make_inverse.py
, we retrieve the info from the file from which thenoise_cov
is computed. (#919 by @SophieHerbst) - The
depth
parameter doesn't acceptNone
anymore. Please use0
instead. (#915 by @hoechenberger) - When using automated bad channel detection, now indicate the generated
*_bads.tsv
files whether a channel had previously already been marked as bad in the dataset. Resulting entries in the TSV file may now look like:"pre-existing (before MNE-BIDS-pipeline was run) & auto-noisy"
(previously: only"auto-noisy"
). (#930 by @hoechenberger) - The
ica_ctps_ecg_threshold
has been renamed toica_ecg_threshold
. (#935 by @hoechenberger) - We changed the behavior when setting an EEG montage:
- When applying the montage, we now also check for channel aliases (e.g.
M1 -> TP9
). - If the data contains a channel that is not present in the montage, we now abort with an exception (previously, we emitted a warning).
This is to prevent silent errors. To proceed in this situation, select a different montage, or drop the respective channels via
the
drop_channels
configuration option. (#960 by @hoechenberger)
Requirements¶
- The minimum required version of MNE-Python is now 1.7.0.
- We dropped support for Python 3.9. You now need Python 3.10 or newer. (#908 by @hoechenberger)
Documentation¶
- We removed the
Execution
section from configuration options documentation and replaced it with new, more explicit sections (namely, Caching, Parallelization, Logging, and Error handling), and enhanced documentation. (#914 by @hoechenberger, #916 by @SophieHerbst)
Bug fixes¶
- When running the pipeline with [
find_bad_channels_meg
][mne_bids_pipeline._config. find_bad_channels_meg] enabled, then disabling it and running the pipeline again, the pipeline would incorrectly still use automatically detected bad channels from the first pipeline run. Now, we ensure that the original bad channels would be used and the related section is removed from the report in this case. (#902 by @larsoner) - Fixed group-average decoding statistics were not updated in some cases, even if relevant configuration options had been changed. (#902 by @larsoner)
- Fixed a compatibility bug with joblib 1.4.0. (#899 by @larsoner)
- Fixed how "original" raw data is included in the report. Previously, bad channels, subject, and experimenter name would not be displayed correctly. (#930 by @hoechenberger)
- In the report's table of contents, don't put the run numbers in quotation marks. (#933 by @hoechenberger)
Code health and infrastructure¶
- Use GitHub's
dependabot
service to automatically keep GitHub Actions up-to-date. (#893 by @hoechenberger)
v1.8.0 (2024-03-20)¶
New features & enhancements¶
- Disabling CSP time-frequency mode is now supported by passing an empty list to
decoding_csp_times
(#890 by @whoever)
Requirements¶
- MNE-BIDS-Pipeline now explicitly depends on
annotated-types
(#886 by @hoechenberger)
Bug fixes¶
- Fix handling of Maxwell-filtered data in CSP (#890 by @larsoner)
- Avoid recomputation / cache miss when the same empty-room file is matched to multiple subjects (#890 by @larsoner)
Code health¶
- We removed the unused settings
shortest_event
andstudy_name
. They were relics of early days of the pipeline and haven't been in use for a long time. (#888, #889 by @hoechenberger and @larsoner)
v1.7.0 (2024-03-13)¶
New features & enhancements¶
- Improved logging message during cache invalidation: We now print the selected
memory_file_method
("hash" or "mtime"). Previously, we'd always print "hash". (#876 by @hoechenberger)
Bug fixes¶
- Fixed an error when using
analyze_channels
with EEG data, where e.g. ERP creation didn't work. (#883 by @hoechenberger)
Code health¶
- We enabled stricter linting to guarantee a consistently high code quality! (#872 by @hoechenberger)
v1.6.0 (2024-03-01)¶
New features & enhancements
- Added
regress_artifact
to allow artifact regression (e.g., of MEG reference sensors in KIT systems) (#837 by @larsoner) - Chosen
reject
parameters are now saved in the generated HTML reports (#839 by @larsoner) - Added saving of clean raw data in addition to epochs (#840 by @larsoner)
- Added saving of detected blink and cardiac events used to calculate SSP projectors (#840 by @larsoner)
- Added
noise_cov_method
to allow for the use of methods other than"shrunk"
for noise covariance estimation (#854 by @larsoner) - Added option to pass
image_kwargs
to [mne.Report.add_epochs
] to allow adjusting e.g."vmin"
and"vmax"
of the epochs image in the report viareport_add_epochs_image_kwargs
. This feature requires MNE-Python 1.7 or newer. (#848 by @SophieHerbst) - Split ICA fitting and artifact detection into separate steps. This means that now, ICA is split into a total of three consecutive steps: fitting, artifact detection, and the actual data cleaning step ("applying ICA"). This makes it easier to experiment with different settings for artifact detection without needing to re-fit ICA. (#865 by @larsoner)
- The configuration used for the pipeline is now saved in a separate spreadsheet in the
.xlsx
log file (#869 by @larsoner)
Requirements¶
- MNE-BIDS-Pipeline now requires Python 3.9 or newer. (#825 by @hoechenberger)
Bug fixes¶
- Fixed minor issues with path handling for cross-talk and calibration files (#834 by @larsoner)
- Fixed EEG
reject
use forch_types = ["meg", "eeg"]
in epoch cleaning (#839 by @larsoner) - Fixed bug where implicit
mf_reference_run
could change across invocations ofmne_bids_pipeline
, breaking caching (#839 by @larsoner) - Fixed
--no-cache
behavior having no effect (#839 by @larsoner) - Fixed Maxwell filtering failures when
find_noisy_channels_meg = False
` is used (#847 by @larsoner) - Fixed raw, empty-room, and custom noise covariances calculation, previously they could errantly be calculated on data without ICA or SSP applied (#840 by @larsoner)
- Fixed multiple channel type handling (e.g., MEG and EEG) in decoding (#853 by @larsoner)
- Changed the default for
ica_n_components
from0.8
(too conservative) toNone
to match MNE-Python's default (#853 by @larsoner) - Prevent events table for the average subject overflowing in reports (#854 by @larsoner)
- Fixed split file behavior for Epochs when using ICA (#855 by @larsoner)
- Fixed a bug where users could not set
_components.tsv
as it would be detected as a cache miss and overwritten on next pipeline run (#865 by @larsoner)
Code health¶
- The package build backend has been switched from
setuptools
tohatchling
. (#825 by @hoechenberger) - Removed dependencies on
datalad
andgit-annex
for testing (#867 by @larsoner) - Code formatting now uses
ruff format
instead ofblack
(#834, #838 by @larsoner) - Code caching is now tested using GitHub Actions (#836 by @larsoner)
- Steps in the documentation are now automatically parsed into flowcharts (#859 by @larsoner)
- New configuration options are now automatically added to the docs (#863 by @larsoner)
- Configuration options now have relevant steps listed in the docs (#866 by @larsoner)
v1.5.0 (2023-11-30)¶
This release contains a number of very important bug fixes that address problems related to decoding, time-frequency analysis, and inverse modeling. All users are encouraged to update.
New features & enhancements¶
- Added
deriv_root
argument to CLI (#773 by @vferat) - Added support for annotating bad segments based on head movement velocity (#757 by @larsoner)
- Added examples of T1 and FLASH BEM to website (#758 by @larsoner)
- Added support for extended SSS (eSSS) in Maxwell filtering (#762 by @larsoner)
- Output logging spacing improved (#764 by @larsoner)
- Added caching of sensor and source average steps (#765 by @larsoner)
- Improved logging of coregistration distances (#769 by @larsoner)
- Input validation has been improved by leveraging pydantic (#779 by @larsoner)
- Reduced logging when reports are created and saved (#799 by @hoechenberger)
- Added
"picard-extended_infomax"
ICA algorithm to perform "extended Infomax"-like ICA decomposition using Picard (#801 by @hoechenberger) - Added support for using "local"
autoreject
to find (and repair) bad channels on a per-epoch basis as the last preprocessing step; this can be enabled by settingreject
to"autoreject_local"
. The behavior can further be controlled via the new settingautoreject_n_interpolate
. (#807 by @hoechenberger) - Added support for "local"
autoreject
to remove bad epochs before submitting the data to ICA fitting. This can be enabled by settingica_reject
to"autoreject_local"
. (#810, #816 by @hoechenberger) - The new setting
decoding_which_epochs
controls which epochs (e.g., uncleaned, after ICA/SSP, cleaned) shall be used for decoding. (#819 by @hoechenberger) - Website documentation tables can now be sorted (e.g., to find examples that use a specific feature) (#808 by @larsoner)
Behavior changes¶
- The default cache directory is now
_cache
within the derivatives folder when usingmemory_location=True
, setmemory_subdir="joblib"
to get the behavior from v1.4 (#778 by @larsoner) - Before cleaning epochs via ICA, we used to reject any epochs execeeding the
ica_reject
criteria. However, this may lead to the unnecessary exclusion of epochs that could have been salvaged through ICA cleaning. Now, we only applyica_reject
to the epochs used for ICA fitting. After the experimental epochs have been cleaned with ICA (preprocessing/apply_ica
step), any remaining large-amplitude artifacts can be removed viareject
, which is used in the last preprocessing step,preprocessing/ptp_reject
. (#806 by @hoechenberger) - MVPA / decoding used to be performed on un-cleaned epochs in the past. Now, cleaned epochs will be used by default (please also see the "Bug fixes" section below). (#796 by @hoechenberger)
Code health¶
- Fixed doc build errors and dependency specifications (#755 by @larsoner)
- Ensure
memory_file_method = "hash"
is tested (#768 by @larsoner) - Enable pre-commit.ci (#774 by @larsoner)
- Use
pooch
for web downloads (#775 by @larsoner) - Ensure compatibility with MNE-Python 1.6 (#800 by @hoechenberger)
- Updated testing dataset for ds004229 v1.0.3 (#808 by @larsoner)
Bug fixes¶
- Fixed bug where cache would not invalidate properly based on output file changes and steps could be incorrectly skipped. All steps will automatically rerun to accommodate the new, safer caching scheme (#756 by @larsoner)
- Fixed bug with parallelization across runs for Maxwell filtering (#761 by @larsoner)
- Fixed bug where head position files were not written with a proper suffix and extension (#761 by @larsoner)
- Fixed bug where default values for
decoding_csp_times
anddecoding_csp_freqs
were not set dynamically based on the config parameters (#779 by @larsoner) - Fixed bug where the MNE logger verbosity was not respected inside parallel jobs (#813 by @larsoner)
- A number of processing steps erroneously always operated on un-cleaned epochs (
sensor/decoding_full_epochs
,sensor/decoding_time_by_time
,sensor/decoding_csp
); or operated on un-cleaned epochs (without PTP rejection) if no ICA or SSP was requested (sensor/ime_frequency
,sensor/make_cov
) The bug insensor/make_cov
could propagate to the source level, as the covariance matrix is used for inverse modeling. (#796 by @hoechenberger) - Bad channels may have been submitted to MVPA (full epochs decoding, time-by-time decoding, CSP-based decoding) when not using Maxwell filtering (i.e., usually only EEG data was affected). This has now been fixed and data from bad channels is omitted from decoding. (#817 by @hoechenberger)
v1.4.0 (2023-07-04)¶
New features & enhancements¶
- Add movement compensation and cHPI filtering to the Maxwell filtering step, along with additional configuration options (#747 by @larsoner)
- Add option to specify
ssp_ecg_channel
to override the default value (#747 by @larsoner) - Add option
read_raw_bids_verbose
to set the verbosity level when usingread_raw_bids
to suppress known warnings (#749 by @larsoner)
Code health¶
Bug fixes¶
- Fix bug when
mf_reference_run != runs[0]
(#742 by @larsoner) - Fix bug with too many JSON files found during empty-room discovery (#743 by @allermat)
- Fix bug where SSP projectors were not added to the report (#747 by @larsoner)
- Fix documentation of
data_type
configuration option (#751 by @allermat) - Fix documentation of
ch_types
configuration option (#745 by @allermat)
v1.3.0 (released 2023/06/01)¶
New features & enhancements¶
- Provide a more helpful log message if the CSP decoding step is being skipped (#734 by @hoechenberger)
- Use
rich
for improved logging control and styling (#737 by @larsoner)
Code health¶
Bug fixes¶
- Fix pandas 2.0 compatibility (#732 by @larsoner)
- Fix bug with
mne.sys_info
insertion in reports (#732 by @larsoner) - Always generate CSP decdoing grand average analysis if CSP decoding was used on the single-subject level (#733 by @hoechenberger)
v1.2.0 (released 2023/03/23)¶
New features & enhancements¶
- We improved caching to reduce initialization time when large datasets are being processed. (#720 by @apmellot)
Behavior changes¶
- MNE-BIDS-Pipeline now requires MNE-Python 1.2 or newer.
Code health¶
v1.1.0 (released 2022/01/13)¶
New features & enhancements¶
- Add support for notch filtering (#702 by @hoechenberger and @larsoner)
v1.0.3 (released 2022/12/18)¶
Behavior changes¶
This backward-incompatible change was made before officially announcing the release, so we are bumping the patch version number rather than the major version number.
Bug fixes¶
Code health¶
- Code quality now checked by ruff and black (#689, #690, and #691 by @larsoner)
- Documentation building infrastructure improved by using newer mkdocs extensions (#693 by @hoechenberger)
v1.0.2 (released 2022/12/07)¶
Code health¶
- The repository README.md was improved (#680 by @hoechenberger )
v1.0.1 (released 2022/12/06)¶
Behavior changes¶
These backward-incompatible changes have been made before officially announcing the release, so we are bumping the patch version number rather than the major version number.
- The
epochs_decim
setting replacesdecim
for consistency and readability (#502 by @larsoner ) - The
raw_resample_sfreq
setting replacesresample_sfreq
for consistency and readability (#502 by @larsoner )
v1.0.0 (released 2022/12/01)¶
Changes were only tracked starting April 15, 2021.
New features & enhancements¶
- An official project governance structure has officially been adopted.
- The peak-to-peak (PTP) amplitude rejection thresholds for epochs can now
optionally be determined automatically using
autoreject
by setting thereject
parameter to'autoreject_global'
. (#306 by @agramfort and @hoechenberger) - The new configuration option
ica_reject
allows to exclude epochs from the ICA fit based on peak-to-peak (PTP) amplitude. (#302 by @hoechenberger) - Drastically reduces memory usage when creating epochs from datasets with multiple runs. (#355 by @hoechenberger)
- Add time-frequency plot to report. (#367 by @rob-luke)
- Add possibility to exclude runs from the analysis via the new
exclude_runs
setting. (#370 by @crsegerie) - Add possibility to process resting-state data via
rest_epochs_duration
andrest_epochs_overlap
. (#393 by @apmellot, @dengemann, @agramfort, and @hoechenberger) - We now create high-resolution scalp surfaces for visualization of the
coregistration in the reports. Existing surfaces can be force-regenerated by
setting the new
recreate_scalp_surface
toTrue
. (#378 by @hoechenberger) - When not applying Maxwell-filter (i.e., when
use_maxwell_filter
is set toFalse
, e.g. when processing EEG data), we skip the initial data import that would essentially just copy the input data to the derivatives root without doing any processing. Now, in such situations, the Maxwell-filtering step is skipped entirely, and we start with frequency filtering right away. This speeds up processing by avoiding unnecessary disk I/O and can help preserve large quantities of storage space for big datasets. (#378 by @dengemann and @hoechenberger) - Break periods in the continuous data can now be automatically detected and
annotated as "bad" segments, which will be ignored during subsequent
processing. This feature is disabled by default and can be switched on via
the
find_breaks
setting. (#386 by @hoechenberger) - You can now use the FreeSurfer
fsaverage
template MRI for source estimation in cases where you don't have participant-specific MR scans available, as is often the case in EEG studies. The behavior can be enabled using the new configuration optionuse_template_mri
. (#387), gh(526 by @agramfort and @hoechenberger) - You can now specify rejection parameters and the number of projection
vectors per channel type for SSP via
n_proj_eog
,n_proj_ecg
,ssp_reject_eog
andssp_reject_ecg
. (#392 by @agramfort, @dengemann, @apmellot and @hoechenberger) - You can now use autoreject for excluding artifacts before SSP estimation via
the
autoreject_global
option inssp_reject_eog
andssp_reject_ecg
. (#396 by @agramfort, @dengemann, @apmellot and @hoechenberger) - You can now specify a custom
eeg_template_montage
from anymne.channels.montage.DigMontage
object. (#407 by @dengemann, @hoechenberger and @agramfort) - Certain BIDS file system operations are now being cached, which should significantly reduce start-up times in situations where many participants are being processed with data from a network-attached storage (NAS). (#405 by @agramfort and @hoechenberger)
- Files docstrings in the preprocessing steps were updated. (#409 by @crsegerie)
- Do not crash when concatenating epochs or raws with different measurement info (like the dev_head_t when using EEG only data). (#416 by @agramfort)
- The
run.py
command line interface gained a new parameter--n_jobs
to specify the number of processes to run in parallel. (#417 by @hoechenberger) - Great improvements to our logging system produce more readable output on the terminal. We also generate an Excel file containing useful debugging info for all participants at each processing step to help you spot problematic participants more easily. (#429), gh(441 by @agramfort @hoechenberger)
- It is now possible to specify from which file to load the
mne.Info
object during forward and inverse computation viasource_info_path_update
. (#452 by @apmellot) - The
run.py
command line interface gained a new parameter,--interactive
, allowing you to override the interactive mode setting from the configuration file. (#456), gh(457 by @hoechenberger) - Add a new configuration setting
freesurfer_verbose
to control whether to display of FreeSurfer output. (#459 by @hoechenberger) - The
noise_cov
option can now be set toad-hoc
to use a fixed and data-independent diagonal noise covariance matrix for source imaging. (#460 by @agramfort and @apmellot) - Processing can now be parallelized using Dask. To use
Dask, set the new configuration setting
parallel_backend
to'dask'
. (#472 by @agramfort and @hoechenberger) - Drastically reduce memory usage during the epoching and ICA steps. (#477 by @hoechenberger and @agramfort)
- The new
plot_psd_for_runs
setting can be used to control for which runs to add PSD plots of the raw data to the reports. (#482 by @hoechenberger) - Speed up report generation. (#487 by @hoechenberger)
- The new `epochs_metadata_query setting allows to select epochs based on metadata query strings. (#495 by @hoechenberger and @agramfort)
- The new
time_frequency_cycles
setting allows for customization of the number of Morlet wavelet cycles used in time-frequency analysis. (#516 by @hoechenberger) - To analyze induced (as opposed to evoked) activity in the time-frequency
domain, the new setting
time_frequency_subtract_evoked
has been added, allowing to subtract the evoked signal from the epochs before performing time-frequency analysis. (#516 by @hoechenberger) - The covariance matrix and corresponding SVD figures, as well as whitened evoked data plots are now added to the reports. (#532 by @hoechenberger)
- The
noise_cov
option can now be set to a function to allow working with arbitrarily-generated covariance matrices. (#535 by @hoechenberger and @agramfort) - Arbitrary contrasts can be used in
contrasts
. The list now accepts as valid items, in addition to tuples which kept their behavior, dicts specifying a name, a condition list and a weights list to use tocombine_evoked
. Decoding steps ignores contrasts with more than two elements. (#536 by @mathias-sm) - The pipeline configuration and MNE system information are now automatically added to the report. (#544 by @hoechenberger)
- More robust empty-room data processing for use with Maxwell filter. We are
now relying on
mne.preprocessing.maxwell_filter_prepare_emptyroom
. (#550 by @hoechenberger) - Maxwell filtering now also parallelizes across runs (previously only across subjects and sessions). (#550 by @hoechenberger)
- It is now possible to estimate the noise covariance matrix based on a resting-state recording and use it for inverse modeling, just like one could previously do with empty-room recordings. (#554 by @hoechenberger)
- Added full-epochs decoding. (#558 by @hoechenberger)
- Generalization across time can now be enabled for the time-by-time decoding
scheme via the new configuration option
decoding_time_generalization
. (#559 by @hoechenberger) - Generalization across time additional decimation can be configured using
decoding_time_generalization_decim
. (#603 by @larsoner) - Caching of pipeline enabled for many pipeline steps
by default using
memory_location=True'
(#563, #600, #608, #615, #618, #644 by @agramfort and @larsoner) - Basic testing of infant MEG data with movement was added to CI testing (#582 by @larsoner)
- The
loose
anddepth
configuration parameters were re-enabled (#592) by @larsoner - Add the example MIND DATA dataset (ds004107) ((#600) by @larsoner)
- Simultaneous MEG+EEG can now be processed jointly (#606 by @larsoner)
- Spatial filtering using SSP is now supported for EEG data (#606 by @larsoner)
- Add SSP joint plots to generated reports
- (#614 by @larsoner)
- It is now possible to specify baseline and cropping parameters for
plotting time-frequency results via
time_frequency_baseline
,time_frequency_baseline_mode
andtime_frequency_crop
. (#641 by @agramfort) - Add time-frequency decoding based on common spatial patterns (CSP). (#625 by @crsegerie, @agramfort, @hoechenberger, and @larsoner)
- Add progress bar for time-by-time decoding (#647 by @larsoner)
- A template configuration file can now be created via
mne_bids_pipeline --create-config
(#653 by @hoechenberger) - Make report generation happen within relevant steps instead of at the end of all steps (#652 by @larsoner)
- Initial raw data plots are now added to reports and bad channel detection is executed in a dedicated step (#666 by @larsoner)
Behavior changes¶
- The
conditions
setting will now beNone
by default. It is a required setting so it will raise an error if left asNone
. (#348 by @guiomar and @hoechenberger) - When creating epochs, only those epochs are kept that belong to the specified
conditions
. This means that only this subset of epochs will be passed to ICA and SSP (if used). Previously, we would created epochs based on all events found in the data, and only subset them to the requested conditions at the epoching stage. (#449 by @agramfort) - Epochs rejection based on peak-to-peak amplitude, as controlled via the
reject
setting, will now take place after ICA or SSP. In previous versions of the Pipeline, rejection was carried out before ICA and SSP. To exclude epochs from ICA fitting, use the newica_reject
setting. - We don't apply SSP by default anymore. (#315 by @hoechenberger)
- The
use_ssp
anduse_ica
settings have been removed. Please use the newspatial_filter
setting instead. (#315 by @hoechenberger) - The
allow_maxshield
setting has been removed. The Pipeline now automatically ensures that FIFF files of recordings with active shielding (MaxShield) can be imported. Later stages of the Pipeline will fail if Maxwell filtering of such data is disabled viause_maxwell_filter=False
. (#318 by @hoechenberger) - The overlay plots that show the effects of ICA cleaning are now based on the baseline-corrected data to make it easier to spot the differences. (#320 by @hoechenberger)
bids_root
andderiv_root
are now converted to absolute paths to avoid running into issues caused by relative path specifications. (#322 by @hoechenberger)- Warn if using ICA and no EOG- or ECG-related ICs were detected. (#351 by @crsegerie)
- Added the possibility to have different runs for different subjects. (#353 by @crsegerie))
- Check that the baseline interval falls into
[epochs_tmin, epochs_tmax]
. (#361 by @crsegerie) config.crop
has been renamed to the more explicitconfig.crop_runs
, as it only applies to individual runs and not the concatenated data. (#358 by @hoechenberger)ica_reject
now also applies to ECG and EOG epochs. (#373 by @crsegerie)- Added a new step
freesurfer/coreg_surfaces
that creates the scalp surfaces required for coregistration in MNE-Python. (#422 by @hoechenberger) - Enabling interactive mode by setting
interactive
toTrue
now deactivates parallel processing. (#473 by @hoechenberger) - The resolution of the MRI slices for BEM visualalization has been reduced to 256 by 256 pixels (was 512 by 512 before), we now only plot every 8th slice (was ever 2nd before). This greatly speeds up BEM rendering and reduces the size of the generated report, while maintaining a sufficiently detailed visualization. (#488 by @hoechenberger)
- In
interactive
mode, the MatplotlibAgg
backend will be used. (#497 by @hoechenberger) - We added new configuration options to control the number of time points to
use when creating topographic maps of evoked signals and brain plots for
source estimates:
report_evoked_n_time_points
andreport_stc_n_time_points
, respectively. (#542 by @agramfort) - Add
reader_extra_params
parameter to pass parameters to read_raw_bids. (#585 by @agramfort) - Add
task_is_rest
parameter to be explicit that the data must be analyzed as resting state. (#585 by @agramfort) - Patch information is now incorporated when computing surface source spaces, which should slightly improve the surface normals (#588 by @larsoner)
- Add
ssp_meg
option for MEG SSP computation. This defaults to'auto'
, which will usessp_meg='combined'
for SSP computation when Maxwell filtering is used. (#595 by @larsoner) - Empty-room and resting-state data are processed by default if present,
regardless of
config.noise_cov
value. This can be controlled by changing the default values fromconfig.process_empty_room = True
andconfig.process_rest = True
(#633 by @larsoner) - Environment variables are no longer used to control execution and variables, use command-line switches instead (#663 by @larsoner )
- Config validation of likely misspellings and (some) outdated variables are now checked (#665, #670 by @larsoner )
Code health¶
- Each processing script now extracts the required subset of configuration options from the user config and operates solely on these. This helps make it clear which settings an individual script depends on. (#383 by @agramfort and @hoechenberger)
- We laid the groundwork for applying the inverse operator on other data types
than just
mne.Evoked
by introducinginverse_targets
. (#452 by @apmellot) - All processing scripts have been renamed and turned into submodules, and the
pipeline is now organized like a standard Python package with a command-line
interface
mne_bids_pipeline ...
(#470, #611, #664 by @agramfort, @hoechenberger, and @larsoner) - For storing configuration values, we switched from using
BunchConst
to Python's built-inSimpleNamespace
. (#472 by @agramfort) - The
config.process_er
variable was renamedconfig.process_empty_room
for readability, and the default was changed toTrue
for consistency (#633 by @larsoner)
Bug fixes¶
- The FreeSurfer script could only be run if
--n_jobs
was passed explicitly (#287 by @MerlinDumeur) - Fix a problem with the FreeSurfer processing step that caused the error
message
Could not consume arg
after completion (#301 by @hoechenberger) - Selecting the
extended_infomax
ICA algorithm caused a crash (#308 by @hoechenberger) - Correctly handle
eog_channels = None
setting after creation of bipolar EEG channels (#311 by @hoechenberger) - Added instructions on how to handle
FileNotFoundError
when loading the BEM model in the source steps (#304 by @MerlinDumeur) - When using
find_noisy_channels_meg
orfind_flat_channels_meg
, we now passmf_head_origin
to the respective bad channel detection algorithm to achieve better performance (#319 by @agramfort) - Baseline was not applied to epochs if neither ICA nor SSP was used (#319 by @hoechenberger)
- Ensure we always use the cleaned epochs for constructing evoked data (#319 by @agramfort)
- The summary report didn't use the cleaned epochs for showing the effects of ICA. (#320 by @hoechenberger)
- The sanity check comparing the rank of the experimental data and the rank of the empty-room after Maxwell-filtering did not use the maxfiltered data. (#336 by @agramfort, @hoechenberger, and @crsegerie)
epochs_tmin
andepochs_tmax
were named incorrectly in some test config files. (#340 by @crsegerie)- We now reject bad epochs by using
ica_reject
before producing the "overlay" plots that show the evoked data before and after ICA cleaning in theproc-ica_report
. (#385 by @crsegerie). - Passing subject, session, task, and run names to
run.py
the consist only of numbers doesn't throw an exception anymore, even if the values weren't double-quoted and hence converted to strings by the command-line interface toolkit we are using, Fire. (#375 by @hoechenberger) - Setting
eeg_reference
to a string (name of the reference channel) caused us to crash. (#391 by @hoechenberger) - Parameters retrieved from the BIDS dataset were not limited to the modality ("data type") we meant to process, sometimes leading to crashes. (#391 by @hoechenberger)
- Fix forward computation for CTF data. (#427 by @agramfort)
- Generated derivative epochs split files now follow the BIDS naming scheme. (#463)}} by @dengemann)
- Report tags are now better sanitized. (#471 by @hoechenberger)
- When creating epochs, we now ensure that the trigger codes provided via the
*_events.tsv
file are retained; previously, new trigger codes were generated in certain situations. (#471 by @hoechenberger) - ICA overlay plots in the report used the cleaned epochs, resulting in no visible ICA cleaning effects. This has been corrected. (#478 by @hoechenberger)
- Ensure we don't over-estimate the rank of Maxwell-filtered data consisting of multiple runs. (#530 by @hoechenberger and @agramfort)
- Don't drop bad channels from empty-room data on import. (#532 by @hoechenberger)
- Time-by-time decoding now respects the
decoding_n_splits
setting. (#558 by @hoechenberger) - Time-by-time decoding now respects the random seed specified via
random_state
when generating the cross-validation splits. (#558 by @hoechenberger) - When automatically finding flat or noisy MEG channels was enabled, the data would always be 40-Hz-lowpass-filtered even if not explicitly requested by the user. This is now fixed. (#558 by @apmellot and @hoechenberger)
- EEG channels couldn't be used as "virtual" EOG channels during ICA artifact detection. Reported by "fraenni" on the forum. Thank you! 🌻 (#572 by @hoechenberger)
- Fix bug with handling of split files during preprocessing (#597 by @larsoner)
- Fix bug where wrong command-line arguments to
run.py
were just ignored instead of raising an error (#605) by @larsoner) - During the Maxwell filtering step, all channels are now kept rather than being restricted to just MEG channels (#606 by @larsoner)
- The default for
analyze_channels
is now'ch_types'
which restricts to the data channels of interest rather than'all'
, which included all channels, and hence could include things like stimulus channels (#606 by @larsoner) - Fix bug where only the first run was used to compute SSP (#607 by @larsoner)
- Fix bug with CPU oversubscription when using the Dask backend on macOS M1 (#638 by @larsoner)