Package pydrizzle :: Module buildproduct
[hide private]
[frames] | no frames]

Module buildproduct

source code

These functions rely on booleans for 'yes' and 'no', PyFITS and readgeis.

Functions [hide private]
 
buildDthProduct(pardict, output, extlist=None, outlist=None, wcs=None)
Parameters: pardict - a dictionary containing (at least): 'data','outdata','outweight','outcontext' where 'data' serves as the name of the backup template image, and the others are filenames of the drizzle products.
source code
 
appendDrizCards(extnhdr, drizhdr)
Copy over the Drizzle keywords from the drizzle output image to the output FITS extension header.
source code
 
getTemplates(fname, extlist) source code
 
updateDTHKeywords(hdr, extnhdr, filename)
Update header keywords in output to reflect values from the dither product.
source code
 
geisToFITS(geisname, fitsname)
Converts GEIS file to Simple FITS file using readgeis.
source code
Variables [hide private]
  DTH_KEYWORDS = ['CD1_1', 'CD1_2', 'CD2_1', 'CD2_2', 'CRPIX1', ...
  RESERVED_KEYS = ['NAXIS', 'BITPIX', 'DATE', 'IRAF-TLM']
  yes = True
  no = False

Imports: pyfits, string, os, types, N, fileutil, readgeis


Function Details [hide private]

buildDthProduct(pardict, output, extlist=None, outlist=None, wcs=None)

source code 

Parameters:
    pardict - a dictionary containing (at least):
        'data','outdata','outweight','outcontext'
        where 'data' serves as the name of the backup template image,
            and the others are filenames of the drizzle products.
    output - filename of the final combined output image
    extlist - list of EXTNAME's to be searched in the template image
    outlist - list of EXTNAME's to be used for naming the output extensions

This function will package the two or three output files from
'drizzle' or 'tdrizzle' into a single output multi-extension
FITS file.
It uses a pre-existing multi-extension FITS file as a template
for the output product.
The list 'extlist' contains the names of the extensions from the
template image which will be used to build the output file.

A number of keywords are also updated based on values from the
drizzle products, including the CD matrix, CRPIX[1,2], CRVAL[1,2].
In addition, the template images will be of different size than
the drizzle products, yet this is handled automatically by PyFITS.

NOTE:
The output file will ALWAYS contain 'SCI','WHT', and 'CTX'
extensions.


Variables Details [hide private]

DTH_KEYWORDS

Value:
['CD1_1', 'CD1_2', 'CD2_1', 'CD2_2', 'CRPIX1', 'CRPIX2', 'CRVAL1', 'CR\
VAL2', 'CTYPE1', 'CTYPE2']