simonsobs / sotodlib

Simons Observatory: Time-Ordered Data processing library.
MIT License
16 stars 19 forks source link

tod_ops.flags.get_turnaround_flags should produce a RangesMatrix with [dets, samps] shape #681

Closed chervias closed 9 months ago

chervias commented 10 months ago

The function for creating turnaround flags creates the RangesMatrix with axis samps, but maybe it should be axes [dets, samps]. For the filterbin mapmaking, the turnaround flags will go directly into the cuts argument of the pointing matrix operation, so it would be useful to have it ready to go considering it usually will be OR with other flags, and it should have the correct shape.

kmharrington commented 10 months ago

oh, instead of making it a RangesMatrix with dets,samps we should make it a Ranges of length samps. Ranges * RangeMatrix logic is supported iirc

kmharrington commented 9 months ago

I just found where this might be showing up. Has to do with where multiplication is defined for RangesMatrix. RangesMatrix * Ranges works as you'd like it to. Ranges * RangesMatrix does not. Luckily flags are commutative

msilvafe commented 9 months ago

So @kmharrington it sounds like you prefer we keep the turnaround flags as Ranges instead of padding into a RangesMatrix? If so I think we can close this issue.

chervias commented 9 months ago

I looked into this and I simply need to do RangesMatrix + Ranges to get the behavior I want. This is because I keep thinking of them as matrices when they are more than that. I'll close the issue.