21 lines
1.3 KiB
Python
21 lines
1.3 KiB
Python
"""Writes labels.jsonl after the requalification: drops LENZSPITZE-53, rewrites LENZSPITZE-66 (loses review), keeps the rest as is."""
|
|||
|
|
import json, sys
|
||
|
|
D = sys.argv[1]
|
||
|
|
NEW66 = ("For the duration of a single measurement, just after the passage of the previous measurement, the reference 8004 "
|
||
|
|
"is hidden and rejected (its flux falls to almost nothing, with that of 8010; that of 8003, 1016, 1018, 7013B, 7013H and of "
|
||
|
|
"the reference 8002 drops clearly, the other targets keep their light): the compensation runs without 8004, the basis changes, "
|
||
|
|
"and the nearby target 1009 makes a clear jump in corr_y and in corr_x, 1006 a smaller one in corr_y; the other curves stay "
|
||
|
|
"within their noise, and everything returns at the next measurement. The 11:00 image shows nothing in front of the targets; "
|
||
|
|
"a passage in front of this corner of the scene is probable, deduced from the cut flux of the hidden targets, not seen. "
|
||
|
|
"Point to ignore, nothing to do.")
|
||
|
|
out = []
|
||
|
|
for l in open(f"{D}/work/requalify_input.jsonl"):
|
||
|
|
d = json.loads(l)
|
||
|
|
i = d.pop('id')
|
||
|
|
if i == 'LENZSPITZE-53': continue
|
||
|
|
if i == 'LENZSPITZE-66':
|
||
|
|
d = {'start': d['start'], 'end': d['end'], 'family': d['family'], 'description': NEW66}
|
||
|
|
out.append(d)
|
||
|
|
with open(f"{D}/labels.jsonl", 'w') as f:
|
||
|
|
for d in out: f.write(json.dumps(d, ensure_ascii=False) + '\n')
|
||
|
|
print(len(out))
|