# DP1 Deblended Object Footprints

**URL:** <https://www.rubin.community/t/dp1-deblended-object-footprints/10715>\
**Category:** Support\
**Tags:** deblender, dp1\
**Created:** [July 29, 2025, 6:03pm UTC](https://www.rubin.community/t/dp1-deblended-object-footprints/10715 "2025-07-29T18:03:06Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![grantmerz](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/grantmerz/32/4123_2.png) [@grantmerz](https://www.rubin.community/u/grantmerz)\
**Post date:** [July 29, 2025, 6:03pm UTC](https://www.rubin.community/t/dp1-deblended-object-footprints/10715/1 "2025-07-29T18:03:06Z")

</div>

Hello,

Are DP1 object footprints that are created by the deblender accessible? I would like to access individual object footprints to use as segmentation masks. I am using a neural network that will utilize the masks to help with other tasks. Previously, I could access these in DP0.2 with the `deepCoadd_deblendedFlux`catalogs, or the `meas` catalogs. It appears that DP1 does not have these, but I did find `object_scarlet_models` accessible through the butler. Can these be used to recreate scarlet models, or at least get footprints?

Thanks,  
Grant

---

<div class="post-metadata">

**Author:** ![ameisner](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/ameisner/32/2392_2.png) [@ameisner](https://www.rubin.community/u/ameisner)\
**Post date:** [July 29, 2025, 8:08pm UTC](https://www.rubin.community/t/dp1-deblended-object-footprints/10715/2 "2025-07-29T20:08:05Z")

</div>

Hi Grant – thanks a lot for the question. For DP1, the footprints are not included in the data release due to storage volume considerations. I’m double checking internally about using `object_scarlet_models` to recreate the DP1 object footprints. Thanks again…

---

<div class="post-metadata">

**Author:** ![fred3m](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/fred3m/32/650_2.png) [@fred3m](https://www.rubin.community/u/fred3m)\
**Post date:** [July 29, 2025, 8:28pm UTC](https://www.rubin.community/t/dp1-deblended-object-footprints/10715/3 "2025-07-29T20:28:42Z")

</div>

Hi Grant,  
Yes, you can reconstruct the full scarlet model for a blend from the `object_scarlet_models` structure. Unfortunately for DP1 you have to load all of the models into memory and this takes up a lot of time (and memory). In DP2 and future data releases you will be able to load a single model as the code is already implemented in `main`.

I don’t remember the exact syntax for the version of the code that was used in DP1 but it will be something like

```auto
scarlet_model_data = butler.get("object_scarlet_models", **dataId)
model_psf = scarlet_model_data.psf
blend_data = scarlet_model_data.blends[blendId]
blend = blend_data.minimal_data_to_blend(model_psf, dtype: np.float32)

```

Just be warned that the exact syntax will change slightly in future data releases, but the `blend` given is the scarlet lite model.

---

<div class="post-metadata">

**Author:** ![grantmerz](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/grantmerz/32/4123_2.png) [@grantmerz](https://www.rubin.community/u/grantmerz)\
**Post date:** [July 30, 2025, 8:36pm UTC](https://www.rubin.community/t/dp1-deblended-object-footprints/10715/4 "2025-07-30T20:36:04Z")

</div>

Hi Fred, thanks for your help. Trying the code snippet you sent, I get this error after the last line:

` "ValueError: Both images must have the same number of axes, got 3 and 2"`

I think this is due to the scarlet\_model\_data.psf being a 2D array, whereas the model data is 3D. I tried using the `blend_data.psf` object instead, which does work, but I’m not sure this is the right thing to do. An example image I get from running

> import lsst.scarlet.lite as sl  
> norm = sl.display.AsinhMapping(minimum=0, stretch=1, Q=20)  
> model = blend.get\_model(convolve=True)  
> rgb = sl.display.img\_to\_rgb(model, norm=norm)  
> plt.imshow(rgb, origin=‘lower’)  
> plt.axis(‘off’)  
> plt.show()

appears a bit odd (not properly convolved?)

 ![Capture](https://us1.discourse-cdn.com/flex002/uploads/rubin/original/2X/2/23d3450c6097f55adfb375316f2775d06364d8c8.png)

Thanks for your help on this!

---

<div class="post-metadata">

**Author:** ![fred3m](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/fred3m/32/650_2.png) [@fred3m](https://www.rubin.community/u/fred3m)\
**Post date:** [August 15, 2025, 1:23am UTC](https://www.rubin.community/t/dp1-deblended-object-footprints/10715/5 "2025-08-15T01:23:19Z")

</div>

Hi Grant. Sorry for the delayed reply, apparently I must not be getting emails from community and I didn’t realize that you replied. Using the blend PSF won’t work for the model psf because that is essentially telling the code not to do a convolution. You need to use the model PSF but pass it as `blend = blend_data.minimal_data_to_blend(model_psf[None,:,:], dtype: np.float32)`, which will make the dimensions match.
