[Mne_analysis] Cropping epoch to pre stimulus event

Alexandre Gramfort alexandre.gramfort at inria.fr
Mon Nov 2 02:48:57 EST 2020
Search archives:

        External Email - Use Caution        

hi,

this looks correct to me.

Alex

On Mon, Nov 2, 2020 at 7:44 AM <balandongiv at gmail.com> wrote:
>
>         External Email - Use Caution
>
> Dear Group,
>
>
>
> I had epoch a continuous signal into -0.7s and 0.7s relative to the stimulus. Along the pipeline, there is a step to evaluate only the signal from -0.7s-0s. I would like to confirm whether epochs.crop() is the right function for this?
>
>
>
> The code snippet is as below.
>
>
>
> sample_data_folder = mne.datasets.sample.data_path()
>
> sample_data_raw_file = os.path.join(sample_data_folder, 'MEG', 'sample',
>
>                                     'sample_audvis_raw.fif')
>
> raw = mne.io.read_raw_fif(sample_data_raw_file, verbose=False,preload=True).crop(tmax=60)
>
> events = mne.find_events(raw, stim_channel='STI 014')
>
> epochs = mne.Epochs(raw, events, tmin=-0.7, tmax=0.7,preload=True)
>
> pre_stim_epochs = epochs.copy().crop(tmin=-0.7, tmax=0, include_tmax=True)
>
>
>
>
>
> Thanks for the time entertaining this question
>
>
>
> Regards
>
> Rpb
>
>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://secure-web.cisco.com/1akczbQZ25wE5VGIRmwVQrdmKy8qafF5SA8JGtUkM-upQ11YDypWBTT4CrZZTw1gBbpS1UilYnJWRATyz5cwDPp51puMKDWEsGiBwpbbWlDhn03ZCKSa4c0TzhQM7mVIWHohGHNaUZfgQYLGlmHxNTSOTq5Ab1Aba1BkBA_wE8I-GgBaQehhkizpwJMELMM3AaVMw03ibQHogzIa7pfZjgA/https%3A%2F%2Fmail.nmr.mgh.harvard.edu%2Fmailman%2Flistinfo%2Fmne_analysis



More information about the Mne_analysis mailing list