Commit 14bf2a3f authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Tidy up offset from api

parent 509cc7f9
......@@ -85,7 +85,15 @@ def make_sigmf(iqfile, no_rename=False):
global_meta[
"camras:pointing:az_deg"] = f"{(pointingdata['az'] + 180) % 360:.4f}"
global_meta["camras:pointing:el_deg"] = f"{pointingdata['el']:.4f}"
global_meta["camras:offset_str"] = f"{pointingdata['offset']}"
if pointingdata['offset'].strip() == "":
offset_az_deg = 0
offset_el_deg = 0
else:
offset_az_str, offset_el_str = pointingdata['offset'].split(',')
offset_az_str = offset_az_str.strip().rstrip('°')
offset_el_str = offset_el_str.strip().rstrip('°')
global_meta["camras:pointing:offset:az_deg"] = offset_az_str
global_meta["camras:pointing:offset:el_deg"] = offset_el_str
global_meta["camras:pointing:datetime"] = Time.now(
).iso[:19] # Pointing is only accurate to the second
else:
......@@ -96,10 +104,10 @@ def make_sigmf(iqfile, no_rename=False):
"camras:pointing:az_deg"] = f"{(dt.az.value + 180) % 360:.4f}"
global_meta["camras:pointing:el_deg"] = f"{dt.el.value:.4f}"
global_meta[
"camras:pointing:offset_az_deg"] = f"{dt.offset_az.value:.4f}"
"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:.3f}"
"camras:pointing:offset:el_deg"] = f"{dt.offset_el.value:+.4f}"
global_meta["camras:focusbox_position_m"] = 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