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_deblendedFluxcatalogs, 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?
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…
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
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()