Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

combine output questions: how to avoid trimming and how to normalize by # of overlapping frames #810

Open
gcecil opened this issue Jul 15, 2023 · 1 comment
Labels

Comments

@gcecil
Copy link

gcecil commented Jul 15, 2023

astropy: 5.2.2
ccdproc: 2.4.0
numpy: 1.24.3es

I'm combining a dozen dithers of a 2x2 mosaic of 2x2k NIR detectors. It seemed quickest to use ccdproc machinery because each detector image in the mosaic has updated WCS using astrometry.net Astrometry.net confirms that the detectors have a slight skew to each other and optical changes etc.

My questions:

  1. Unfortunately, after searching this forum etc, I cannot find how to prevent ccdproc.combine from trimming the registered stack down to the coverage of the first image. Instead I want the output to encompass the entire footprint of the input stack. Possible?
  2. I also see no way written up on how to scale the result at each pixel by the number of images that overlapped there. 'average' in combine doesn't seem to do this and I don't know the values a priori so can't use combine's weights.

Everything else in ccdproc is working fine for me, thank you for this package.

@mwcraig
Copy link
Member

mwcraig commented Jul 25, 2023

Thanks for the questions @gcecill! The short answer to the first question, I think, is that there is no built-in way to reproject the images on the fly and combine them.

We do have this for breaking that into two steps, reprojecting and then combing: https://ccdproc.readthedocs.io/en/latest/image_combination.html#combination-with-image-transformation-and-alignment

The code at that snippet is inefficient in that it keeps all of the reprojected images in memory, which might not be possible depending on how many you are combining. This notebook for a class I teach does the reprojecting and saves to disk, and the saved images are combined in this notebook.

To get the number of pixels in each region, I would look at this from reproject: https://reproject.readthedocs.io/en/stable/mosaicking.html

Should we add something about this to the ccdproc documentation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants