Commit f3b362bd authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Wrap

parent c0ba27c4
...@@ -44,7 +44,7 @@ def signal_thread(): ...@@ -44,7 +44,7 @@ def signal_thread():
global signal global signal
context = zmq.Context() context = zmq.Context()
receiver = context.socket(zmq.PULL) receiver = context.socket(zmq.PULL)
receiver.connect("tcp://127.0.0.1:5557") receiver.connect("tcp://127.0.0.1:5558")
while True: while True:
buff = receiver.recv() buff = receiver.recv()
signal = np.frombuffer(buff, dtype="float32")[-1] signal = np.frombuffer(buff, dtype="float32")[-1]
...@@ -53,7 +53,7 @@ s = Thread(target=signal_thread) ...@@ -53,7 +53,7 @@ s = Thread(target=signal_thread)
s.daemon = True s.daemon = True
s.start() s.start()
dt = Telescope(consoleHost='localhost') dt = Telescope(consoleHost='console')
data = np.zeros((360, 720), dtype=float) data = np.zeros((360, 720), dtype=float)
data[:, :] = np.nan data[:, :] = np.nan
...@@ -115,7 +115,10 @@ while not stoprequest: ...@@ -115,7 +115,10 @@ while not stoprequest:
def lat_to_pixel(lat): def lat_to_pixel(lat):
return round(2 * lat) + 180 return round(2 * lat) + 180
l = lon_to_pixel(pos.l.deg) ldeg = pos.l.deg
if ldeg > 180:
ldeg -= 360
l = lon_to_pixel(ldeg)
b = lat_to_pixel(pos.b.deg) b = lat_to_pixel(pos.b.deg)
n = npoints[b, l] n = npoints[b, l]
......
Markdown is supported
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