diff --git a/nih2mne/make_meg_bids.py b/nih2mne/make_meg_bids.py index d20296c..deb32fd 100755 --- a/nih2mne/make_meg_bids.py +++ b/nih2mne/make_meg_bids.py @@ -519,7 +519,7 @@ def get_subj_logger(subjid, log_dir=None, loglevel=logging.INFO): parser.add_argument('-autocrop_zeros', help='''If files are terminated early, leaving zeros at the end of the file - this will detect and remove - the trailing zeros''', + the trailing zeros. !!!Files larger than 2G will Fail!!!''', action='store_true' ) group3 = parser.add_argument_group('Optional Overrides') diff --git a/nih2mne/utilities/data_crop_wrapper.py b/nih2mne/utilities/data_crop_wrapper.py index c3293ce..9e608cc 100644 --- a/nih2mne/utilities/data_crop_wrapper.py +++ b/nih2mne/utilities/data_crop_wrapper.py @@ -49,13 +49,13 @@ def return_cropped_ds(fname): raw = mne.io.read_raw_ctf(fname, system_clock='ignore', preload=True) crop_time = get_term_time(raw) - if endtime == False: + if crop_time == False: raise RuntimeError('Could not find a terminated timepoint') - base = op.dirname(fname) + base = op.abspath(op.dirname(fname)) f_ = op.basename(fname) - outdir = op.join(base, 'tmp_cropped') + outdir = op.join(base, 'bids_prep_temp','tmp_cropped') if not op.exists(outdir): os.mkdir(outdir) - fname_out = op.join(outdir, fname) + fname_out = op.join(outdir, f_) cmd = f'newDs -f -time 0 {str(crop_time)} {fname} {fname_out}' subprocess.run(cmd) return fname_out