This Brainlife.io application crops raw MEG/EEG data to a specified time window. It takes a raw MNE-format data file and trims it to the interval [tmin, tmax] using MNE-Python's raw.crop() function.
The app generates:
- Cropped data in MNE-Python format
mne(neuro/meeg/mne/raw): continuous raw MEG/EEG data to crop (required)
out_dir/raw.fif(neuro/meeg/mne/raw): cropped MEG/EEG data
| key | type | default | description |
|---|---|---|---|
tmin |
float | null | null |
Start time in seconds for cropping (must be >= 0). If null, the data are kept from the beginning of the recording. |
tmax |
float | null | null |
End time in seconds for cropping (cannot exceed data duration). If null, the data are kept until the end of the recording. |
- Upload your MEG/EEG data file in MNE format (.fif)
- Select the crop-raw app
- Configure the time window:
- Set
tminto the desired start time in seconds (or leavenullfor start of recording) - Set
tmaxto the desired end time in seconds (or leavenullfor end of recording)
- Set
- Submit the task
# Update config.json with your data path and desired tmin/tmax
# Then run:
python main.py- Uses MNE-Python's
raw.crop(tmin, tmax)method tmin=nulldefaults to the start of the recording (t=0)tmax=nulldefaults to the end of the recording- Times are specified in seconds relative to the recording start
- The crop is applied in-place after loading (data is preloaded for efficiency)
- Maximilien Chaumon (https://github.com/dnacombo)
- Hayashi, S., Caron, B.A., Heinsfeld, A.S. et al. brainlife.io: a decentralized and open-source cloud platform to support neuroscience research. Nat Methods 21, 809–813 (2024). https://doi.org/10.1038/s41592-024-02237-2
- Gramfort, A. et al. MEG and EEG data analysis with MNE-Python. Front. Neurosci. 7, 267 (2013). https://doi.org/10.3389/fnins.2013.00267
brainlife.io is publicly funded. We kindly ask that you acknowledge the funding below in your code and publications.
Copyright (c) 2026 MEEG Brainlife team. Licensed under AGPL-3.0, see license.txt.