'Crop data to a given time interval in place.
Parameters
tmin : float | None
Start time of selection in seconds.
tmax : float | None
End time of selection in seconds.
Returns
inst : instance of AverageTFR
The modified instance.'

def crop(self, tmin=None, tmax=None):

    mask = _time_mask(self.times, tmin, tmax, sfreq=self.info['sfreq'])
    self.times = self.times[mask]
    self.data = self.data[..., mask]
    return self
