diff --git a/rubin_sim/maf/generate_ss.py b/rubin_sim/maf/generate_ss.py index 4d58a58c8..b9e7cfa39 100755 --- a/rubin_sim/maf/generate_ss.py +++ b/rubin_sim/maf/generate_ss.py @@ -9,6 +9,7 @@ import pandas as pd import rubin_sim.maf.db as db +from rubin_sim.data import get_data_dir def generate_ss_commands( diff --git a/rubin_sim/moving_objects/direct_obs.py b/rubin_sim/moving_objects/direct_obs.py index 6015f629e..3eb96b476 100644 --- a/rubin_sim/moving_objects/direct_obs.py +++ b/rubin_sim/moving_objects/direct_obs.py @@ -2,6 +2,7 @@ import datetime import logging +import warnings import numpy as np @@ -168,9 +169,9 @@ def run(self, orbits, obs_data, object_positions=None, object_mjds=None): if (obs_data[self.obs_time_col].min() < object_mjds.min()) | ( obs_data[self.obs_time_col].max() > object_mjds.max() ): - raise ValueError( + warnings.warn( "Pre-computed position times do not cover MJD range of %i-%i." - % (obs_data[self.obs_time_col].min().obs_data[self.obs_time_col].max()) + % (obs_data[self.obs_time_col].min(), obs_data[self.obs_time_col].max()) ) object_mjds = None # calculate angular motion for each object at each timestep diff --git a/rubin_sim/phot_utils/photometric_parameters.py b/rubin_sim/phot_utils/photometric_parameters.py index 9aae95cd8..83124c726 100644 --- a/rubin_sim/phot_utils/photometric_parameters.py +++ b/rubin_sim/phot_utils/photometric_parameters.py @@ -1,9 +1,11 @@ __all__ = ("PhotometricParameters", "DustValues") import os + import numpy as np from rubin_sim.data import get_data_dir + from .bandpass import Bandpass from .sed import Sed diff --git a/rubin_sim/phot_utils/signaltonoise.py b/rubin_sim/phot_utils/signaltonoise.py index 5190c2a68..ac062368f 100644 --- a/rubin_sim/phot_utils/signaltonoise.py +++ b/rubin_sim/phot_utils/signaltonoise.py @@ -18,12 +18,8 @@ import numpy from . import lsst_defaults -from .photometric_parameters import PhotometricParameters -from .sed import Sed - -import numpy - from .lsst_defaults import LSSTdefaults +from .photometric_parameters import PhotometricParameters from .sed import Sed diff --git a/rubin_sim/phot_utils/utils/test_utils.py b/rubin_sim/phot_utils/utils/test_utils.py index 93ca25151..dd5540d5a 100644 --- a/rubin_sim/phot_utils/utils/test_utils.py +++ b/rubin_sim/phot_utils/utils/test_utils.py @@ -7,8 +7,7 @@ import numpy -from rubin_sim.phot_utils import Sed, calc_sky_counts_per_pixel_for_m5 -from rubin_sim.phot_utils import LSSTdefaults +from rubin_sim.phot_utils import LSSTdefaults, Sed, calc_sky_counts_per_pixel_for_m5 def set_m5(m5target, skysed, total_bandpass, hardware, phot_params, fwhm_eff=None):