These are chat archives for thunder-project/thunder
betweenmethod might be what you're looking for: http://thunder-project.org/thunder/docs/generated/thunder.TimeSeries.html#thunder.TimeSeries.between
rangefunction to create a sequence of numbers corresponding to
Ah yeah, that would be a bit more circuitous! Though sometimes (at least in my day-to-day use cases) the experimental data comes with an extra "index" indicating the experimental epochs (e.g.
[1,1,1,1,1,2,2,2,2,2,3,3,3,....]. In this case, another solution is to do something really similar to what you were trying. You can set this extra data as another index and then use the "multi-index" functionality that we recently built in:
series = tsc.loadSeries(...) epochs = [1,1,1,1,1,2,2,2,2,.....] series.index = np.vstack([series.index, epochs]).T ep = 5 #epoch of interest subseries = series.selectByIndex(level=1, ep)