예제 #1
0
    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
예제 #2
0
    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
예제 #3
0
 def setUp(self):
     self.mh = ModelHelper(ObservingSite())
예제 #4
0
 def setUp(self):
     self.truth_slew_time = 56.45919674628731
     logging.getLogger().setLevel(logging.WARN)
     self.observatory = MainObservatory(ObservingSite())
예제 #5
0
 def __init__(self):
     """Initialize the class.
     """
     ModelHelper.__init__(self, ObservingSite())
예제 #6
0
    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)