Skip to content

Commit

Permalink
Update schemas with missing fields
Browse files Browse the repository at this point in the history
  • Loading branch information
bsmartradio committed Jan 4, 2024
1 parent 2b9c5b9 commit f76f7e3
Show file tree
Hide file tree
Showing 9 changed files with 275 additions and 255 deletions.
4 changes: 2 additions & 2 deletions python/lsst/alert/packet/bin/validateAvroRoundTrip.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def main():
check_file_round_trip(args.cutout_template,
message.pop('cutoutTemplate')['stampData'])

message_size = len(json.dumps(message).encode('utf-8'))
message_size = len(json.dumps(message, default=repr).encode('utf-8'))
print("Size in bytes of JSON-encoded message (excl. stamps): %d" % (message_size,))
print("Size in bytes of stamps: %d" % (stamp_size,))
print("TOTAL: %d" % (stamp_size + message_size,))
Expand All @@ -135,7 +135,7 @@ def main():
# populated with nulls;
# - Precision has been lost on the floats.
if args.print:
print(json.dumps(message, sort_keys=True, indent=4))
print(json.dumps(message, sort_keys=True, indent=4, default=repr))


if __name__ == "__main__":
Expand Down
16 changes: 10 additions & 6 deletions python/lsst/alert/packet/schema/6/0/lsst.v6_0.diaForcedSource.avsc
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,35 @@
"type": "long"
},
{
"default": null,
"doc": "Point Source model flux.",
"default": null,
"name": "psfFlux",
"type": [
"null",
"float"
]
},
{
"default": null,
"doc": "Uncertainty of psfFlux.",
"default": null,
"name": "psfFluxErr",
"type": [
"null",
"float"
]
},
{
"default": null,
"doc": "x position at which psfFlux has been measured.",
"default": null,
"name": "x",
"type": [
"null",
"float"
]
},
{
"default": null,
"doc": "y position at which psfFlux has been measured.",
"default": null,
"name": "y",
"type": [
"null",
Expand All @@ -56,17 +56,21 @@
},
{
"doc": "Flags, bitwise OR tbd",
"default": null,
"name": "flags",
"type": "long"
"type": [
"null",
"long"
]
},
{
"doc": "Effective mid-visit time for this diaForcedSource, expressed as Modified Julian Date, International Atomic Time.",
"name": "midpointMjdTai",
"type": "double"
},
{
"default": null,
"doc": "Filter band this source was observed with.",
"default": null,
"name": "band",
"type": [
"null",
Expand Down
Loading

0 comments on commit f76f7e3

Please sign in to comment.