As I understand it by default the LSST Science Pipelines deblend in single band mode using the HSC/SDSS deblender. If I want to switch on the SCARLET multiband deblender am I right in thinking I need to retarget the deblender using something like:
from lsst.meas.deblender.deblend import MultibandDeblendTask
config. singleBandDeblend.retarget(MultibandDeblendTask)
in a config/deblendCoaddSources.py file.
I can see that the default config deblend.py has settings such as “config.multiBandDeblend.monotonic=True” which made me think perhaps I can run it with a different command or it is in fact being run by default in v21.
I had thought that I could use the multibandDeblender by simply sending multiple bands “filter=HSC-G^HSC-R” to the deblendCoaddSources.py task but when it runs it seems to only refer to the singleBandDeblend task.
Finally what should be the result of running the multiband deblender? Will it be a new set of flux measurements that are completely distinct from the standard measurements such as ‘circularApertureFlux’ since the same flux exists in a circle regardless of deblending? Will this exist in an independent catalogue file in the Butler or as an extra set of columns in the main measurement and forced catalogues?
I am surprised to see no multibandDeblend configuration options in obs_subaru. Is that because SCARLET is still under development and not included by default yet?
Hi Raphael,
If you want to use scarlet for single band deblending you still need to use lsst.meas.extensions.scarlet.ScarletDeblendTask, the same task that is used in multiband. One slight complication is that you’ll need to convert your Exposure to a MultibandExposure with a single band, since that’s what scarlet expects.
Thanks for your response. So by default if deblendCoaddSoruces.py is sent multiple bands will it run both the traditional single band SDSS deblender and SCARLET for all the bands it is sent? Can I retrieve these deblended fluxes from the files called e.g. ‘deblendedFlux-HSC-G-8524-3,5.fits’. I can’t see such files in the public PDR2 files so wonder if they are a new addition with the deblended fluxes.
Or do I run a ScarletDeblendTask to create a new dataset of deblended fluxes in a sepaerate catalogue?
No, in order to use scarlet you have to set simultaneous=True in pipe_tasks/multiBand.py at master · lsst/pipe_tasks · GitHub (ignore the docstring, which has the inverse of the actual behavior and is being fixed in a PR right now). So the multiband version can be run with pipe_drivers or pipe_tasks, or a pipeline task in gen3 if you set that parameter to True (which is the default in the stack for multiband). But I don’t think that there is a commandline task to use scarlet as the deblender in single band.
Someone can correct me if I’m wrong, but I don’t think that there is a public release of data since we switched to scarlet, so the only way to get scarlet results on HSC data is to rerun it yourself using multiband driver, or at least ScarletDeblendTask.
Ok I think I understand. If I run the full multibandDriver.py and add “config.simultaneous=True” to the deblendCoaddSources config it should run both and use all bands in the Scarlet deblending. I will try that. Thank you.