Spitzer Documentation & Tools
rectify_raw_irac_data

Purpose: Converts raw IRAC image data to rectified DN.

Author: Sean Carey (SSC)
Date Contributed: 22 Aug 2011
System Requirements: IDL v6.0 and higher, requires astrolib IDL library

Information and Download

Download rectify_raw_irac_data.pro (PRO File, 8 KB)

IDL procedure to transform a list of raw IRAC data files to rectified data numbers in floating point representation. This procedure is most useful for the IRAC 3.6 and 4.5 um raw data as decreasing DN in those images corresponds to increasing flux. The procedure converts the unsigned integer format to floating point, applies the appropriate sign flip for InSb data, corrects for Fowler sampling bias and data wraparound. The procedure will save the results as a set of arrays in an IDL .sav file and/or FITS images. The rectified FITS files will have filenames similar to the original filename but with the transformation of "_dce.fits" to "_recdce.fits" applied. Applied to subarray data, the procedure will transform the 2d array into a properly formatted subarray data cube. FITS images in BCD orientation can be optionally output using the /BCD_ORIENTATION keyword. For example, running IDL in a directory containing channel 1 subarray raw frames, a set of rectified subarray raw data cubes with BCD orientation can be made using:


IDL> files = file_search("SPITZER_I1_*_dce.fits")
IDL> rectify_raw_irac_data, files, /MAKEFITS, /BCD_ORIENTATION