>
> If you want to be efficient, you could do:
>
> self.times += tshift if tshift > 0 else -tshift
>
>
Is there a technical name for this so that I can look this up? This looks a
lot like the ternary operator in C. And does it result in computational
efficiency or just shorter code?

> Also, I think we're going to run into a problem here where you have a set
> of times, you save to disk, then reload, the times may differ by up to 1
> / sfreq. This is because, when saving evoked, evoked.times is not stored,
> but rather evoked.first/last/info['freq'], which is used to reconstruct
> evoked.times. Thus it would be better if here you calculated what
> self.first (which is an integer) should be changed to, and then
> recalculate times, kind of like you do above. This will avoid the
> different-times-on-load issue, and allow you to unify the code above and
> below a bit. Something like:
>
> offset = self.first if relative else 0
> self.first = int(tshift * sfreq)
> self.last = self.first + len(times) - 1
> times = ...
>
> Does that make sense?
>
Yup, thanks for pointing this out. Will change this asap.