# Custom tracts and patches with LSSTpipe

**URL:** <https://www.rubin.community/t/custom-tracts-and-patches-with-lsstpipe/5645>\
**Category:** Support\
**Created:** [July 12, 2021, 6:42pm UTC](https://www.rubin.community/t/custom-tracts-and-patches-with-lsstpipe/5645 "2021-07-12T18:42:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![StephenGwyn](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@StephenGwyn](https://www.rubin.community/u/StephenGwyn)\
**Post date:** [July 12, 2021, 6:42pm UTC](https://www.rubin.community/t/custom-tracts-and-patches-with-lsstpipe/5645/1 "2021-07-12T18:42:22Z")

</div>

I’m trying to produce coadds from HSC data onto a specific set of tiles used in the CFIS survey. Is there a way to get makeDiscreteSkyMap.py to set up tracts and patches that exactly match an existing image that wasn’t processed with lsstipipe?

---

<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:** [July 12, 2021, 11:03pm UTC](https://www.rubin.community/t/custom-tracts-and-patches-with-lsstpipe/5645/2 "2021-07-12T23:03:02Z")

</div>

You should use `makeSkyMap.py` instead of `makeDiscreteSkyMap.py`, and use configuration overrides something like the following:

```auto
# Configuration for DiscreteSkyMap
# tract=0: M31
config.skyMap["discrete"].raList = [10.7]
config.skyMap["discrete"].decList = [41.3]
config.skyMap["discrete"].radiusList = [0.8]
config.skyMap["discrete"].pixelScale = 0.168
config.skyMap.name = "discrete"

```

With some care, you can choose the appropriate values to reproduce the WCS in your existing image – assuming it’s a `TAN` projection. If it’s something much more complicated (e.g., including any distortion), you’re out of luck, and will need to resample that image.

---

<div class="post-metadata">

**Author:** ![StephenGwyn](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@StephenGwyn](https://www.rubin.community/u/StephenGwyn)\
**Post date:** [July 12, 2021, 11:32pm UTC](https://www.rubin.community/t/custom-tracts-and-patches-with-lsstpipe/5645/3 "2021-07-12T23:32:13Z")

</div>

There isn’t a way to set CRVAL/CRPIX and so on to specific values?

---

<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:** [July 13, 2021, 1:55pm UTC](https://www.rubin.community/t/custom-tracts-and-patches-with-lsstpipe/5645/4 "2021-07-13T13:55:57Z")

</div>

With the current code you can’t just set `CRVAL`,`CRPIX` directly (but maybe we could write a subclass that lets you do that).
