simonsobs / sotodlib

Simons Observatory: Time-Ordered Data processing library.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Imprinter / Bookbinder co-sampling check

kmharrington opened this issue · comments

This was an issue during to SAT1 cooldown in the highbay. Most of the pieces were set up but we were missing at least one thing. So the data files are written to have high-precision timing but the data between the different UFMs were not actually co-sampled. Book binder needs to throw errors if this happens.

Cosampling check isn't done until binding step, should be done earlier in the bookbinder preprocess step here:

t0 = np.max([s.times[0] for s in self.streams.values()])
t1 = np.min([s.times[-1] for s in self.streams.values()])
# prioritizes the last stream
# implicitly assumes co-sampled (this is where we could throw errors
# after looking for co-sampled data)
ts, _ = fill_time_gaps(stream.times)