lsst / rubin_sim

Scheduler, survey strategy analysis, and other simulation tools for Rubin Observatory.
https://rubin-sim.lsst.io
GNU General Public License v3.0
41 stars 37 forks source link

Move reading of throughputs out of init #348

Closed rhiannonlynne closed 1 year ago

rhiannonlynne commented 1 year ago

If load_inst_zeropoints is called from the init method, then when the stacker is instantiated in other metrics or batches, then the actual read of the data will happen immediately -- and this causes even the import of maf to fail if rubin_sim_data/throughputs is not available. Moving the call to load_inst_zeropoints to the 'run' method (which is only called when the code is actually run) means that the import can proceed even if the data is not available.