sub2full

../_images/sub2full_translate.png

wfc3tools.sub2full Module

Given an image specified by the user which contains a subarray readout, return the location of the corner of the subarray in a full frame reference image (including the full physical extent of the chip), in 1-indexed pixels. If the user supplies an X and Y coordinate, then the translated location of that point will be returned.

>>> from wfc3tools import sub2full
>>> sub2full('ibbso1fdq_flt.fits')
[(3584.0, 1539)]

Specify a list of images:

>>> im = ['ic5p02e0q_spt.fits',
          'ic5p02e1q_spt.fits',
          'ic5p02e2q_spt.fits',
          'ic5p02e3q_spt.fits',
          'ic5p02e4q_spt.fits']
>>> sub2full(im)
[(1062.0, 1363),
 (1062.0, 1363),
 (1410.0, 1243),
 (1410.0, 1243),
 (1402.0, 1539)]

Return the full extent of the subarray:

>>> sub2full('ibbso1fdq_flt.fits',fullExtent=True)
[(3584.0, 4096, 1539, 2050)]

Functions

sub2full(filename[, x, y, fullExtent])

Given an image specified by the user which contains a subarray readout, return the location of the corner of the subarray in a full frame reference image (including the full physical extent of the chip), in 1-indexed pixels.

More information on header keywords

The task uses header keywords from the SPT file of the associated image in order to calculate the offset for the subarray. The keywords it uses are:

Keyword

Meaning

SS_DTCTR

To get the detector for the image

SS_SUBAR

To make sure the image is a subarray

XCORNER

The x corner of the subarray

YCORNER

The y corner of the subarray

NUMROWS

Subarray x size

NUMCOLS

Subarray y size

The UVIS full frame detector has 2051 rows, with 25 pixels of serial overscan. The IR detector has 1024 rows and 5 pixels of overscan.