Skip to content

Commit

Permalink
Update avro schemas with docstrings and add update tool
Browse files Browse the repository at this point in the history
  • Loading branch information
bsmartradio committed Sep 20, 2023
1 parent c1f99d0 commit b602c68
Show file tree
Hide file tree
Showing 10 changed files with 2,413 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install yaml needed for build
run: |
pip install pyyaml
- name: Build and install wheel
run: |
pip install virtualenv
Expand Down
1 change: 1 addition & 0 deletions python/lsst/alert/packet/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,4 @@
from .schema import *
from .schemaRegistry import *
from .simulate import *
from .updateSchema import *
23 changes: 23 additions & 0 deletions python/lsst/alert/packet/schema/6/0/lsst.v6_0.alert.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"namespace": "lsst.v6_0",
"type": "record",
"name": "alert",
"doc": "sample avro alert schema v6.0",
"fields": [
{"name": "alertId", "type": "long", "doc": "unique alert identifer"},
{"name": "diaSource", "type": "lsst.v6_0.diaSource"},
{"name": "prvDiaSources", "type": ["null", {
"type": "array",
"items": "lsst.v6_0.diaSource"}], "default": null},
{"name": "prvDiaForcedSources", "type": ["null", {
"type": "array",
"items": "lsst.v6_0.diaForcedSource"}], "default": null},
{"name": "prvDiaNondetectionLimits", "type": ["null", {
"type": "array",
"items": "lsst.v6_0.diaNondetectionLimit"}], "default": null},
{"name": "diaObject", "type": ["null", "lsst.v6_0.diaObject"], "default": null},
{"name": "ssObject", "type": ["null", "lsst.v6_0.ssObject"], "default": null},
{"name": "cutoutDifference", "type": ["null", "bytes"], "default": null},
{"name": "cutoutTemplate", "type": ["null", "bytes"], "default": null}
]
}
68 changes: 68 additions & 0 deletions python/lsst/alert/packet/schema/6/0/lsst.v6_0.diaForcedSource.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
{
"type": "record",
"namespace": "lsst.v6_0",
"name": "diaForcedSource",
"fields": [
{
"doc": "Unique id.",
"name": "diaForcedSourceId",
"type": "long"
},
{
"doc": "Id of the DiaObject that this DiaForcedSource was associated with.",
"name": "diaObjectId",
"type": "long"
},
{
"doc": "Id of the ccdVisit where this forcedSource was measured.",
"name": "ccdVisitId",
"type": "long"
},
{
"default": null,
"doc": "Point Source model flux.",
"name": "psfFlux",
"type": [
"null",
"float"
]
},
{
"default": null,
"doc": "Uncertainty of psfFlux.",
"name": "psfFluxErr",
"type": [
"null",
"float"
]
},
{
"default": null,
"doc": "x position at which psfFlux has been measured.",
"name": "x",
"type": [
"null",
"float"
]
},
{
"default": null,
"doc": "y position at which psfFlux has been measured.",
"name": "y",
"type": [
"null",
"float"
]
},
{
"doc": "Flags, bitwise OR tbd",
"name": "flags",
"type": "long"
},
{
"doc": "Effective mid-visit time for this diaForcedSource, expressed as Modified Julian Date, International Atomic Time.",
"name": "midpointMjdTai",
"type": "double"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"type": "record",
"namespace": "lsst.v6_0",
"name": "diaNondetectionLimit",
"fields": [
{
"name": "ccdVisitId",
"type": "long"
},
{
"name": "midpointMjdTai",
"type": "double"
},
{
"name": "band",
"type": "string"
},
{
"name": "diaNoise",
"type": "float"
}
]
}
Loading

0 comments on commit b602c68

Please sign in to comment.