From 048936c4e0dec024518e7b04c176b5745f2dcc2d Mon Sep 17 00:00:00 2001 From: Jeff Stout Date: Tue, 23 Jan 2024 13:13:58 -0500 Subject: [PATCH] Added some minimal data checks to make_meg_bids --- nih2mne/make_meg_bids.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nih2mne/make_meg_bids.py b/nih2mne/make_meg_bids.py index c84d198..81bfb3a 100755 --- a/nih2mne/make_meg_bids.py +++ b/nih2mne/make_meg_bids.py @@ -578,6 +578,17 @@ def get_subj_logger(subjid, log_dir=None, loglevel=logging.INFO): temp_dir=Path(args.bids_dir).parent / 'bids_prep_temp' temp_dir.mkdir(parents=True, exist_ok=True) + # + # Data Check + # + assert op.exists(args.meg_input_dir) + if 'mri_brik' in args: + assert op.exists(args.mri_brik) + if 'mri_bsight' in args: + assert op.exists(args.mri_bsight) + if 'mri_bsight_elec' in args: + assert op.exists(args.mri_bsight_elec) + # # Process MEG #