Example #1
0
 def test_observable_3(self):
     # vega should be visible near the end but not in the beginning
     # during this period (rising)
     tgt = entity.SiderealTarget(name="vega", ra=vega[0], dec=vega[1])
     cts = entity.Constraints(
         time_start=self.obs.get_date("2014-04-28 22:30"),
         time_stop=self.obs.get_date("2014-04-28 23:30"),
         el_min_deg=15.0,
         el_max_deg=85.0,
         duration=50 * 60,
         airmass=None)
     cts = self.obs.observable(tgt, cts)
     self.assert_(cts.observable == False)  # 50 min NOT ok
Example #2
0
 def test_observable_4(self):
     # vega should be visible near the beginning but not near the end
     # during this period (setting)
     tgt = entity.SiderealTarget(name="vega", ra=vega[0], dec=vega[1])
     cts = entity.Constraints(
         time_start=self.obs.get_date("2014-04-29 09:30"),
         time_stop=self.obs.get_date("2014-04-29 10:30"),
         el_min_deg=15.0,
         el_max_deg=85.0,
         duration=30 * 60,
         airmass=None)
     cts = self.obs.observable(tgt, cts)
     self.assert_(cts.observable == True)  # 30 min ok
Example #3
0
 def test_observable_1(self):
     # vega should be visible during this period
     tgt = entity.SiderealTarget(name="vega", ra=vega[0], dec=vega[1])
     cts = entity.Constraints(
         time_start=self.obs.get_date("2014-04-29 04:00"),
         time_stop=self.obs.get_date("2014-04-29 05:00"),
         el_min_deg=15.0,
         el_max_deg=85.0,
         duration=59.9 * 60,
         airmass=None)
     cts = self.obs.observable(tgt, cts)
     ## print((1, cts.observable,
     ##        cts.time_rise.astimezone(self.obs.tz_local).strftime("%H:%M"),
     ##        cts.time_set.astimezone(self.obs.tz_local).strftime("%H:%M")))
     self.assert_(cts.observable == True)