spacetelescope / drizzlepac

AstroDrizzle for HST images.
https://drizzlepac.readthedocs.io
BSD 3-Clause "New" or "Revised" License
50 stars 39 forks source link

Moving target subarray images do not combine properly #101

Closed stsci-hack closed 2 years ago

stsci-hack commented 6 years ago

The HLA has identified a use-case where multiple apertures (subarray formats) were used along with full frame exposures to observe a moving target. Not surprisingly, drizzlepac was unable to correctly use the WCS information to correctly combine these exposures. It is not clear what can be done, but this issue will provide a reminder to review this use-case to see what might possibly be done to generalize even further how these sets of exposures should be combined.

The following details came from a help call filed by R. White (HLA):

_Here are a couple of examples. Visit 17 of proposal 11559 has these 10 WFC3/UVIS exposures:

filename aperture ccdchip ib4v17plq_flc.fits UVIS-QUAD-SUB 2 ib4v17pmq_flc.fits UVIS-QUAD-SUB 2 ib4v17pnq_flc.fits UVIS-QUAD-SUB 1 ib4v17poq_flc.fits UVIS-QUAD-SUB 2 ib4v17ppq_flc.fits UVIS-QUAD-SUB 2 ib4v17pqq_flc.fits UVIS-QUAD-SUB 2 ib4v17psq_flc.fits UVIS-QUAD-SUB 1 ib4v17puq_flc.fits UVIS1-2K4-SUB 1 ib4v17pvq_flc.fits UVIS-QUAD-SUB 2 ib4v17pwq_flc.fits UVIS-QUAD-SUB 2

These are all subarray exposures of Jupiter. Most of the observations use the UVIS-QUAD-SUB aperture, but that apparently moves from chip to chip depending on the quad filter being used. And the ib4v17puq_flc.fits observation uses the UVIS1-2K4-SUB aperture, which is a much larger subarray. Applying the WCS from one image to another leads to the weird result shown in the attached preview.

Another example is visit 11 of proposal 13675, which has 11 WFC3/UVIS exposures:

filename aperture ccdchip(s) icoc11fmq_flt.fits UVIS 2 1 icoc11fnq_flt.fits UVIS 2 1 icoc11foq_flc.fits UVIS2-2K2C-SUB 2 icoc11fpq_flc.fits UVIS-QUAD-SUB 1 icoc11frq_flc.fits UVIS2-2K2C-SUB 2 icoc11fsq_flc.fits UVIS2-2K2C-SUB 2 icoc11ftq_flc.fits UVIS-QUAD-SUB 1 icoc11fuq_flc.fits UVIS-QUAD-SUB 1 icoc11fvq_flc.fits UVIS2-2K2C-SUB 2 icoc11fwq_flt.fits UVIS 2 1 icoc11fxq_flt.fits UVIS 2 1

This visit has several different apertures, including some UVIS apertures that are not subarrays (and so have both CCD chips) and some subarrays (with only 1 chip).

For this visit the results are really weird. I'm pretty sure that what happens is that one of the 2-chip observations is used as the reference image for the WCS. It supplies a WCS for both chips. When it gets to one of the images that is a subarray, there is no second chip. The 4th extension in those files is the D2IMARR extension, which is a 64x32 pixel distortion array. Apparently the astrodrizzle code blithely proceeds to apply the WCS to that tiny coefficient image and drizzles it into the output! The results for exposure icoc11foqflc.fits are shown in the second image.

stsci-hack commented 2 years ago

Moved to being a Jira ticket HLA-699.

stscijgbot-hstdp commented 6 months ago

This issue is tracked on JIRA as HLA-699.

stscijgbot-hstdp commented 6 months ago

Comment by Michele De La Pena on JIRA:

Here is another example of a dataset for this ticket.  The filter-level IR image look OK, but the total is bad.  The UVIS images may be OK.

File: ibig07qwq_flt.fits  detector: IR  subarray: True  filter: F110W  pctecorr: n/a File: ibig07qxq_flt.fits  detector: IR  subarray: True  filter: F110W  pctecorr: n/a File: ibig07qyq_flt.fits  detector: IR  subarray: True  filter: F110W  pctecorr: n/a File: ibig07qzq_flt.fits  detector: IR  subarray: True  filter: F110W  pctecorr: n/a File: ibig07r0q_flt.fits  detector: IR  subarray: True  filter: F160W  pctecorr: n/a File: ibig07r1q_flt.fits  detector: IR  subarray: True  filter: F160W  pctecorr: n/a File: ibig07r2q_flt.fits  detector: IR  subarray: True  filter: F160W  pctecorr: n/a File: ibig07r3q_flt.fits  detector: IR  subarray: True  filter: F160W  pctecorr: n/a File: ibig07r4q_flc.fits  detector: UVIS  subarray: False  filter: F336W  pctecorr: COMPLETE File: ibig07raq_flc.fits  detector: UVIS  subarray: False  filter: F336W  pctecorr: COMPLETE File: ibig07rcq_flc.fits  detector: UVIS  subarray: False  filter: F336W  pctecorr: COMPLETE File: ibig07rfq_flc.fits  detector: UVIS  subarray: False  filter: F438W  pctecorr: COMPLETE File: ibig07rhq_flc.fits  detector: UVIS  subarray: False  filter: F438W  pctecorr: COMPLETE File: ibig07rvq_flc.fits  detector: UVIS  subarray: False  filter: F438W  pctecorr: COMPLETE File: ibig07rjq_flc.fits  detector: UVIS  subarray: False  filter: F814W  pctecorr: COMPLETE File: ibig07roq_flc.fits  detector: UVIS  subarray: False  filter: F814W  pctecorr: COMPLETE File: ibig07rqq_flc.fits  detector: UVIS  subarray: False  filter: F814W  pctecorr: COMPLETE File: ibig07rsq_flc.fits  detector: UVIS  subarray: False  filter: F814W  pctecorr: COMPLETE File: ibig07riq_flt.fits  detector: UVIS  subarray: True  filter: F814W  pctecorr: OMIT

The "n/a" means the keyword PCTECORR was not found in the primary header.