Unverified Commit b580a4e6 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Add start and end lines

parent aa21e890
...@@ -13,7 +13,7 @@ import matplotlib.pyplot as plt ...@@ -13,7 +13,7 @@ import matplotlib.pyplot as plt
import zmq import zmq
import struct import struct
import numpy as np import numpy as np
from telescope import telescope from telescope import Telescope
from astropy.coordinates import get_sun, SkyCoord, AltAz, EarthLocation, Angle from astropy.coordinates import get_sun, SkyCoord, AltAz, EarthLocation, Angle
from astropy.time import Time from astropy.time import Time
import astropy.units as u import astropy.units as u
...@@ -46,7 +46,7 @@ s = Thread(target=signal_thread) ...@@ -46,7 +46,7 @@ s = Thread(target=signal_thread)
s.daemon = True s.daemon = True
s.start() s.start()
dt = telescope(consoleHost='localhost') dt = Telescope(consoleHost='localhost')
dt.getAzEl(waitForUpdate=True) dt.getAzEl(waitForUpdate=True)
dwl = EarthLocation(lon=Angle("6:23:46.21 degrees"), dwl = EarthLocation(lon=Angle("6:23:46.21 degrees"),
...@@ -71,6 +71,15 @@ maxsignal = 0. ...@@ -71,6 +71,15 @@ maxsignal = 0.
scatterplot_70cm = ax.scatter([], [], s=3, color='black') scatterplot_70cm = ax.scatter([], [], s=3, color='black')
ax.xaxis.set_major_formatter(mdates.DateFormatter('%H:%M')) ax.xaxis.set_major_formatter(mdates.DateFormatter('%H:%M'))
eclipse_starttime = Time("2021-06-10T11:21") + 2*u.hour
eclipse_endtime = Time("2021-06-10T13:34") + 2*u.hour
if starttime < eclipse_starttime < starttime + 3*u.hour:
ax.axvline(eclipse_starttime.datetime, linestyle='--', linewidth=1, color='lightgrey')
ax.text(eclipse_starttime.datetime,0.1,'Start: '+eclipse_starttime.isot[11:16],rotation=90, color='black', transform=ax.get_xaxis_transform())
if starttime < eclipse_endtime < starttime + 3*u.hour:
ax.axvline(eclipse_endtime.datetime, linestyle='--', linewidth=1, color='lightgrey')
ax.text(eclipse_endtime.datetime,0.1,'Einde: '+eclipse_endtime.isot[11:16],rotation=90, color='black', transform=ax.get_xaxis_transform())
while True: while True:
time.sleep(0.2) time.sleep(0.2)
if signal == prev_signal: if signal == prev_signal:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment