def apply_overrides(self, config_files): """Apply configuration overrides. Parameters ---------- config_files : list The list of configuration file paths. """ obs_site = ObservingSite() ModelHelper.load_config(obs_site, config_files) model = ModelHelper(obs_site) return model.params
model.park() model.slew_altaz(0., np.radians(alt1), np.radians(az1), np.radians(rot1), model.current_state.filter) initial_slew_state = copy.deepcopy(model.current_state) model.slew_altaz(model.current_state.time, np.radians(alt2), np.radians(az2), np.radians(rot2), model.current_state.filter) final_slew_state = copy.deepcopy(model.current_state) slew_time = final_slew_state.time - initial_slew_state.time return slew_time # initialize opsim observatory # Easy to just make an observatory and pull out the configured model mo = MainObservatory(ObservingSite()) mo.configure(Observatory()) model = mo.model # initialize alt-sched observatory tel = Telescope() numRand = 10000 randMax = np.radians(30) deltaAlts = np.random.rand(numRand) * np.sqrt(randMax) deltaAzes = np.random.rand(numRand) * np.sqrt(randMax) opsim_slew_times = [] fast_slew_times = [] for deltaAlt, deltaAz in zip(deltaAlts, deltaAzes): # make altitude start at 45 degs so opsim doesn't complain # if we ask it to point at the ground
def setUp(self): self.mh = ModelHelper(ObservingSite())
def setUp(self): self.truth_slew_time = 56.45919674628731 logging.getLogger().setLevel(logging.WARN) self.observatory = MainObservatory(ObservingSite())
def __init__(self): """Initialize the class. """ ModelHelper.__init__(self, ObservingSite())
def setUp(self): patcher1 = mock.patch("lsst.sims.ocs.kernel.sequencer.AstronomicalSkyModel", spec=True) self.addCleanup(patcher1.stop) self.mock_astro_sky = patcher1.start() self.seq = Sequencer(ObservingSite(), Survey().idle_delay)