# Amending the alert schema for PLAsTiCC simulations

**URL:** <https://www.rubin.community/t/amending-the-alert-schema-for-plasticc-simulations/4888>\
**Category:** Data Products\
**Created:** [April 14, 2021, 6:58pm UTC](https://www.rubin.community/t/amending-the-alert-schema-for-plasticc-simulations/4888 "2021-04-14T18:58:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![reneehlozek](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/reneehlozek/32/1453_2.png) [@reneehlozek](https://www.rubin.community/u/reneehlozek)\
**Post date:** [April 14, 2021, 6:58pm UTC](https://www.rubin.community/t/amending-the-alert-schema-for-plasticc-simulations/4888/1 "2021-04-14T18:58:03Z")

</div>

tl;dr: is there a well defined process for amending the current LSST alert schema or creating alerts with a user-defined schema?

As part of the PLAsTiCC v2.0 broker challenge, we’d like to supplement the standard alert schema with host information. I’ve generated a notebook to add additional fields, but wanted to know the best practice for writing out these schema.

Using schema = lsst.alert.packet.Schema.from\_file(path/to/our/modified/schema/lsst.v4\_1.alert.avsc)  
seems to throw up exceptions that it is still expecting a valid v4\_0 defined schema.  
Note that the modified schema are here: [plasticc\_alerts/Examples/plasticc\_schema at main · LSSTDESC/plasticc\_alerts · GitHub](https://github.com/LSSTDESC/plasticc_alerts/tree/main/Examples/plasticc_schema) (the same workbook contains our work).

---

<div class="post-metadata">

**Author:** ![ebellm](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/ebellm/32/771_2.png) [@ebellm](https://www.rubin.community/u/ebellm)\
**Post date:** [April 14, 2021, 8:39pm UTC](https://www.rubin.community/t/amending-the-alert-schema-for-plasticc-simulations/4888/2 "2021-04-14T20:39:05Z")

</div>

Hi @reneehlozek, it looks to me like some of the `namespace` lines in your `4.1` schemas still specify the `4.0` schema (e.g., [here](https://github.com/LSSTDESC/plasticc_alerts/blob/67bcce6fbfaf8dc4bd0bc080f23784c785fa8423/Examples/plasticc_schema/lsst.v4_1.diaObject.avsc#L2))–I would see if changing these to `4.1` would help.

I will mention/warn that we (@spencernelson) are considering some larger changes to `alert_packet` to make it simpler: any eventual proposal will show up at [DM-28733](https://jira.lsstcorp.org/browse/DM-28733).

---

<div class="post-metadata">

**Author:** ![ebellm](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/ebellm/32/771_2.png) [@ebellm](https://www.rubin.community/u/ebellm)\
**Post date:** [April 14, 2021, 8:45pm UTC](https://www.rubin.community/t/amending-the-alert-schema-for-plasticc-simulations/4888/3 "2021-04-14T20:45:07Z")

</div>

Setting aside the technical question: Rubin is not going to have these host quantities available in our alerts (because the information is unknown!)–does it set the wrong expectation for PLAsTiCC data consumers to include them?

---

<div class="post-metadata">

**Author:** ![reneehlozek](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/reneehlozek/32/1453_2.png) [@reneehlozek](https://www.rubin.community/u/reneehlozek)\
**Post date:** [April 15, 2021, 3:08pm UTC](https://www.rubin.community/t/amending-the-alert-schema-for-plasticc-simulations/4888/4 "2021-04-15T15:08:57Z")

</div>

hi @ebellm thanks for the input and technical help, that definitely fixed it. I’m excited to see the proposal on changes too, so thanks for the heads up. I agree that this exhaustive list is beyond the scope of what Rubin can provide (a more sensible list would be host mags + errors + light profile moments + PSF), but this will hopefully be a jumping off point for discussions about the alerts and how folks will use ancillary data in classifications.
