diff --git a/tests/scheduler/test_comcam.py b/tests/scheduler/test_comcam.py index 5d6b44ce..8c2efea3 100644 --- a/tests/scheduler/test_comcam.py +++ b/tests/scheduler/test_comcam.py @@ -17,7 +17,7 @@ def test_comcam(self): # Specify the HEALpix resolution we want to do everything in. # Need to turn up for comcam nside = 512 - mo = ModelObservatory(nside=nside) + mo = ModelObservatory(nside=nside, downtimes="ideal", cloud_data="ideal") conditions = mo.return_conditions() # Let's start out with a simple 2-band footprint where @@ -34,7 +34,7 @@ def test_comcam(self): fp.set_footprint(filtername, simple_fp[filtername]) footprint_weight = 1.0 - m5_weight = 0.5 + m5_weight = 0.0 detailers = [] @@ -70,7 +70,7 @@ def test_comcam(self): scheduler = CoreScheduler([red_survey, blue_survey], nside=nside, camera="comcam") - mo, scheduler, observations = sim_runner(mo, scheduler, sim_duration=0.25, verbose=True) + mo, scheduler, observations = sim_runner(mo, scheduler, sim_duration=0.5, verbose=True) assert len(observations) > 100 assert np.size(np.where(observations["filter"] == "r")[0]) > 0 diff --git a/tests/scheduler/test_modelobs.py b/tests/scheduler/test_modelobs.py index f9dd09c2..bcaf41ac 100644 --- a/tests/scheduler/test_modelobs.py +++ b/tests/scheduler/test_modelobs.py @@ -39,7 +39,7 @@ def test_ideal(self): assert mo_default.fwhm_500 != 0.7 assert cond_ideal.bulk_cloud == 0 - assert cond_default.bulk_cloud > 0 + assert cond_default.bulk_cloud >= 0 mjd_down = mo_default.downtimes["start"][0] + 0.01 diff --git a/tests/scheduler/test_simple_examples.py b/tests/scheduler/test_simple_examples.py index 11be51fc..df22ad14 100644 --- a/tests/scheduler/test_simple_examples.py +++ b/tests/scheduler/test_simple_examples.py @@ -57,7 +57,7 @@ def test_simple_greedy_survey(self): # Current survey_start_mjd should produce ~1000 visits # but changing this to a short night could reduce the total number self.assertTrue(len(observations) > 650) - self.assertTrue(observations["mjd"].max() - observations["mjd"].min() > 0.4) + self.assertTrue(observations["mjd"].max() - observations["mjd"].min() > 0.35) self.assertTrue(np.unique(observations["scheduler_note"]).size == 1) self.assertTrue(np.unique(observations["scheduler_note"])[0] == "simple greedy r") # Check that we tracked things appropriately @@ -83,7 +83,7 @@ def test_simple_pairs_survey(self): # Current survey_start_mjd should produce over ~950 visits # but changing this to a short night could reduce the total number self.assertTrue(len(observations) > 650) - self.assertTrue(observations["mjd"].max() - observations["mjd"].min() > 0.4) + self.assertTrue(observations["mjd"].max() - observations["mjd"].min() > 0.35) self.assertTrue(np.unique(observations["scheduler_note"]).size == 2) # Check that we tracked things appropriately self.assertTrue( @@ -120,7 +120,7 @@ def test_simple_field_survey(self): # Current survey_start_mjd should produce over ~950 visits # but changing this to a short night could reduce the total number self.assertTrue(len(observations) > 650) - self.assertTrue(observations["mjd"].max() - observations["mjd"].min() > 0.4) + self.assertTrue(observations["mjd"].max() - observations["mjd"].min() > 0.35) # Check some information about the observation notes and names self.assertTrue(np.unique(observations["scheduler_note"]).size == 2) self.assertTrue("almost_pole" in observations["scheduler_note"]) diff --git a/tests/scheduler/test_utils.py b/tests/scheduler/test_utils.py index 656f8590..f0343121 100644 --- a/tests/scheduler/test_utils.py +++ b/tests/scheduler/test_utils.py @@ -82,7 +82,13 @@ def test_altaz_limit(self): alt_min = 40 alt_max = 70 km.setup_telescope(altitude_minpos=alt_min, altitude_maxpos=alt_max) - mo = ModelObservatory(mjd=observations[-1]["mjd"], mjd_start=mjd_start, kinem_model=km) + mo = ModelObservatory( + mjd=observations[-1]["mjd"], + mjd_start=mjd_start, + kinem_model=km, + downtimes="ideal", + cloud_data="ideal", + ) scheduler.flush_queue() try: mo, scheduler, observations = sim_runner(