Commit 509cc7f9 authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Tweak metadata

parent 07ff11c7
......@@ -25,7 +25,7 @@ def make_sigmf(iqfile, no_rename=False):
rate = float(rate)
frequency = float(frequency)
rx_gain = float(rx_gain)
time_first_sample = Time(time_first_sample, format="unix")
time_first_sample = Time(float(time_first_sample), format="unix")
# sigmfname_data = sigmfname_meta.replace("-meta", "-data")
if dataformat.strip('"') == "short":
......@@ -69,8 +69,8 @@ def make_sigmf(iqfile, no_rename=False):
# CAMRAS
try:
dt = Telescope(consoleHost="localhost")
time.sleep(1.5) # Make sure everything is updated
dt = Telescope(consoleHost="console")
time.sleep(1.1) # Make sure everything is updated
console_is_on = True
except IOError:
console_is_on = False
......@@ -87,7 +87,7 @@ def make_sigmf(iqfile, no_rename=False):
global_meta["camras:pointing:el_deg"] = f"{pointingdata['el']:.4f}"
global_meta["camras:offset_str"] = f"{pointingdata['offset']}"
global_meta["camras:pointing:datetime"] = Time.now(
).datetime.isoformat()
).iso[:19] # Pointing is only accurate to the second
else:
global_meta["camras:pointing:source"] = "DT controller"
tracker = dt.tracker.replace("console/", "")
......@@ -99,7 +99,7 @@ def make_sigmf(iqfile, no_rename=False):
"camras:pointing:offset_az_deg"] = f"{dt.offset_az.value:.4f}"
global_meta[
"camras:pointing:offset_el_deg"] = f"{dt.offset_el.value:.4f}"
global_meta["camras:focusbox_position"] = f"{dt.focusbox_pos:.1f}"
global_meta["camras:focusbox_position"] = f"{dt.focusbox_pos:.3f}"
global_meta["camras:pointing:datetime"] = Time.now(
).datetime.isoformat()
......
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