# Centrally-defined butler datasets

**URL:** <https://www.rubin.community/t/centrally-defined-butler-datasets/841>\
**Category:** DM Notifications\
**Tags:** mapper, butler, dm-dev, obspackages\
**Created:** [June 8, 2016, 3:06am UTC](https://www.rubin.community/t/centrally-defined-butler-datasets/841 "2016-06-08T03:06:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![price](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/price/32/488_2.png) [@price](https://www.rubin.community/u/price)\
**Post date:** [June 8, 2016, 3:06am UTC](https://www.rubin.community/t/centrally-defined-butler-datasets/841/1 "2016-06-08T03:06:46Z")

</div>

As part of my work on [DM-3372](https://jira.lsstcorp.org/browse/DM-3372) (“stack provenance”), I added a new feature to the `CameraMapper` that allows us to provide a default specification for datasets. This allows us to add datasets that will be defined in the same way for all cameras. This meant that I didn’t have to add a `packages` dataset in all the obs\_\* packages (to save the package version information), but by putting it in a single place it takes effect for all the obs\_\* packages. Beyond that convenience, I hope it will also allow us to simplify the existing obs\_\* packages by moving most of the coadd products into a single place.

The default dataset specifications are stored in `daf_butlerUtils/policy` as `images.yaml`, `exposures.yaml`, `calibrations.yaml` and `datasets.yaml`, according to which category of dataset it is. They have the same information as what would go in our `*Mapper.paf` files, but (as the file extensions suggest) are in YAML. Files that don’t currently exist are treated as empty.

---

<div class="post-metadata">

**Author:** ![natepease](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/natepease/32/2086_2.png) [@natepease](https://www.rubin.community/u/natepease)\
**Post date:** [August 30, 2016, 6:37pm UTC](https://www.rubin.community/t/centrally-defined-butler-datasets/841/2 "2016-08-30T18:37:36Z")

</div>

@price, why did you break the different categories into separate yaml files, instead of having one yaml file, named something like “defaultPolicy.yaml”?

---

<div class="post-metadata">

**Author:** ![price](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/price/32/488_2.png) [@price](https://www.rubin.community/u/price)\
**Post date:** [August 30, 2016, 10:23pm UTC](https://www.rubin.community/t/centrally-defined-butler-datasets/841/3 "2016-08-30T22:23:51Z")

</div>

It was my first foray into YAML, and it seemed dividing the namespace using files was neater and/or easier than having multiple namespaces in a single file (e.g., all elements in a file have the same format). You’re welcome to refactor it if you want.

---

<div class="post-metadata">

**Author:** ![natepease](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/natepease/32/2086_2.png) [@natepease](https://www.rubin.community/u/natepease)\
**Post date:** [August 30, 2016, 11:58pm UTC](https://www.rubin.community/t/centrally-defined-butler-datasets/841/4 "2016-08-30T23:58:53Z")

</div>

understand. thanks.

(this post must be at least 20 characters)
