hpc4cmb / toast

Time Ordered Astrophysics Scalable Tools
Other
44 stars 39 forks source link

Implement Operator loader pattern on execution #792

Closed tskisner closed 2 hours ago

tskisner commented 6 hours ago

This is a small PR that is the beginning of implementing a design pattern that is useful in cases where the solved map-domain or template amplitude products require more detector data than will fit in memory. Essentially the new Operator.load_exec() method loops over observations and looks for an Observation attribute containing a "Loader" class. If that exists, it is used to "load" data prior to calling exec() on that observation and then used to "unload" data afterwards. See the trivial unit test to see how this works.

Future PRs will use this feature to implement an operator that loads (or simulates) data per observation and accumulates the hits, inverse covariance, and noise weighted map. This foundational operator can then be used in larger workflows making a binned map or solving for template amplitudes without persistent storage of all detector data.