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.
If
load_inst_zeropoints
is called from theinit
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.