Crop out multiple segments from a raw file

Hi,

I want to crop out the middle portion of the raw file . Is there a way to crop out just that segment and be able to combine the remaining segments of the raw file ? Also, is there a way to crop out multiple segments in the raw file ?

Hello @apoorva6262, have you considered to mark the undesired segments as “bad” using an annotation whose description starts with “bad_”? MNE will automatically exclude such segments from further processing — no need to crop anything manually.

See Rejecting bad data spans — MNE 0.23.0 documentation