Adjusting skymap produced by makeDiscreteSkyMap.py

Is there a way to adjust the skyMap produced by the lsstpipe task makeDiscreteSkyMap?

I’m running it through the command line task, with the usual TAN projection, and passing it a list of visit numbers as --id ccd=XX visit=YYYYYYY^ZZZZZZ etc. The input images are all of a single CCD, and nearly coaligned to the precision of the telescope tracking.

The task produces a single 2x2 patch map, with center equal to the image centre. This results in warps with mostly blank image bordering ~1/4 of the input image.

Each patch could easily fit a full CCD image. Is there a way to force makeDiscreteSkyMap to produce a 1x1 patch map instead of the 2x2 it defaults to?

Edit - the reason I want this is because for some footprints, the imageDifference task fails because it cannot find enough kernel sources in the small 1/4-ccd templates. I suspect this problem would not occur for a template containing the full ccd.

Thanks

You could create a discrete skymap of your own design using makeSkyMap.py and a configuration file like the following:

config.skyMap["discrete"].raList = [1.234]  # degrees
config.skyMap["discrete"].decList = [-5.678]  # degrees
config.skyMap["discrete"].radiusList = [0.5]  # degrees
config.skyMap["discrete"].pixelScale = 0.168  # arcsec
config.skyMap.name = "discrete"

Oh, and the size of the patches can be controlled via:

config.skyMap["discrete"].patchBuilder.patchInnerDimensions = (2000, 2000)  # pixels

As noted by @erykoff on Slack, you could also run makeDiscreteSkyMap.py (that effectively sets the raList, decList and radiusList to cover the data) with adjusted patchInnerDimensions.

Thanks for the tips @price .

I am getting the error:

makeSkyMap.py /arc/projects/NewHorizons/HSC_21_June-lsst/ --rerun /arc/projects/NewHorizons/HSC_21_June-lsst//rerun/03447_warpCompare_004 --clobber-config --configfile configs/testing_makeSkyMap_config.py

root INFO: Loading config overrride file '/opt/lsst/software/stack/stack/miniconda3-4.7.10-4d7b902/Linux64/obs_subaru/19.0.0+2/config/makeSkyMap.py'
root INFO: Loading config overrride file '/opt/lsst/software/stack/stack/miniconda3-4.7.10-4d7b902/Linux64/obs_subaru/19.0.0+2/config/hsc/makeSkyMap.py'
usage: makeSkyMap.py input [options]
makeSkyMap.py: error: cannot load config file 'configs/testing_makeSkyMap_config.py': 'DiscreteSkyMapConfig' object has no attribute 'patchBuilder'

know the solution?

Will try this one out. Thanks!

Oh, the patchBuilder part didn’t get added until after the 23.0 release. If you’re using LSST 23.0 then the spelling is config.skyMap["discrete"].patchInnerDimensions.

Awesome. Thanks @price that got it working.

I assume this is a gen2 butler and pipeline system then? In gen3 the equivalent is butler make-discrete-skymap.

1 Like

Yep gen 2. We’ve avoided moving to gen 3 for the sake of maintaining consistency across the many years of this particular project.

We have demonstrated parity between gen2 and gen3 pipelines.

You are likely locked into using v23 to keep gen2 support since we are currently removing chunks of gen2 functionality each week.

Thanks @timj. I am aware of equivalency. I meant consistency of our codes. aka. Not having to reinvent the wheel mid-project.