def main(): alert_ids = GenerateCameraAlertStream( alert_num=1 ) alert_id = alert_ids[ 0 ] alert = ConstructAlertFromID( alert_id, 'E' ) ## Compute P value with lower confidence. alert.CA.P.value = ComputeP() alert.CA.P.confidence = 0.4 alert.CA.P.annotation = 'Computed with low confidence' #print( alert ) alert.commit() # Second commit won't write DB since everything is synced now. alert.commit()
def main(): alert_ids = GenerateCameraAlertStream(alert_num=1) alert_id = alert_ids[0] alert = ConstructAlertFromID(alert_id, 'E') ## Compute P value with lower confidence. alert.CA.P.value = ComputeP() alert.CA.P.confidence = 0.4 alert.CA.P.annotation = 'Computed with low confidence' #print( alert ) alert.commit() # Second commit won't write DB since everything is synced now. alert.commit()
def main(): alert_ids = GenerateCameraAlertStream(alert_num=1) alert_id = alert_ids[0] alert = ConstructAlertFromID(alert_id, 'E') print(alert) ## Create a replica with an associated astro object. replica_id1 = alert.createReplica(astro_id=17249) print('Created replica {0}'.format(replica_id1)) ## Construct replica object given ID replica1 = ConstructAlertFromID(replica_id1, 'R') print(replica1) ## Create another replica without an associated astro object. replica_id2 = alert.createReplica() print('Created replica {0}'.format(replica_id2)) ## Construct replica object given ID replica2 = ConstructAlertFromID(replica_id2, 'R') replica2.commit() print(replica2)