@@ -490,7 +490,6 @@ def post_annotations(self, oid: str, detection: Mapping):
490
490
data ["imcce_nearest_Vmag" ] = float (nearest_match ["V" ].value )
491
491
492
492
annotations = {
493
- "obj_id" : oid ,
494
493
"origin" : "tails:twilight" ,
495
494
"data" : data ,
496
495
"group_ids" : [self .config ["sentinel" ]["fritz" ]["group_id" ]],
@@ -500,10 +499,12 @@ def post_annotations(self, oid: str, detection: Mapping):
500
499
log (annotations )
501
500
502
501
with timer (
503
- f"Posting annotation for { oid } { candid } to Fritz" ,
502
+ f"Posting annotations for { oid } { candid } to Fritz" ,
504
503
self .verbose > 1 ,
505
504
):
506
- response = self .api_fritz ("POST" , "/api/annotation" , annotations )
505
+ response = self .api_fritz (
506
+ "POST" , f"/api/sources/{ oid } /annotations" , annotations
507
+ )
507
508
if response .json ()["status" ] == "success" :
508
509
log (f"Posted { oid } { candid } annotation to Fritz" )
509
510
else :
@@ -611,7 +612,6 @@ def post_comments(self, oid: str, detection: Mapping):
611
612
file_content = f .read ()
612
613
cutouts_png = base64 .b64encode (file_content ).decode ("utf-8" )
613
614
comment = {
614
- "obj_id" : oid ,
615
615
"text" : "Full-sized cutouts (256x256 px)" ,
616
616
"group_ids" : [self .config ["sentinel" ]["fritz" ]["group_id" ]],
617
617
"attachment" : {
@@ -620,7 +620,7 @@ def post_comments(self, oid: str, detection: Mapping):
620
620
},
621
621
}
622
622
623
- response = self .api_fritz ("POST" , "/api/comment " , comment )
623
+ response = self .api_fritz ("POST" , f "/api/sources/ { oid } /comments " , comment )
624
624
if response .json ()["status" ] == "success" :
625
625
log (f"Posted { oid } { candid } png to Fritz" )
626
626
else :
@@ -645,7 +645,6 @@ def post_comments(self, oid: str, detection: Mapping):
645
645
.to_dict (orient = "records" )
646
646
)
647
647
comment = {
648
- "obj_id" : oid ,
649
648
"text" : "MPC and IMCCE cross-match" ,
650
649
"group_ids" : [self .config ["sentinel" ]["fritz" ]["group_id" ]],
651
650
"attachment" : {
@@ -656,7 +655,7 @@ def post_comments(self, oid: str, detection: Mapping):
656
655
},
657
656
}
658
657
659
- response = self .api_fritz ("POST" , "/api/comment " , comment )
658
+ response = self .api_fritz ("POST" , f "/api/sources/ { oid } /comments " , comment )
660
659
if response .json ()["status" ] == "success" :
661
660
log (f"Posted { oid } { candid } cross-matches to Fritz" )
662
661
else :
@@ -665,12 +664,11 @@ def post_comments(self, oid: str, detection: Mapping):
665
664
666
665
# post SCI image URL on IPAC's IRSA
667
666
comment = {
668
- "obj_id" : oid ,
669
667
"text" : f"[SCI image from IPAC]({ detection ['sci_ipac_url' ]} )" ,
670
668
"group_ids" : [self .config ["sentinel" ]["fritz" ]["group_id" ]],
671
669
}
672
670
673
- response = self .api_fritz ("POST" , "/api/comment " , comment )
671
+ response = self .api_fritz ("POST" , f "/api/sources/ { oid } /comments " , comment )
674
672
if response .json ()["status" ] == "success" :
675
673
log (f"Posted { oid } { candid } sci image url to Fritz" )
676
674
else :
0 commit comments