Last modified: 11 December 2024

How can I specify the datatype of the output image?


Since there is no way to figure out what the data type should be in advance, the default datatype for images is Int2 (2 byte integers). For example:

unix% dmcopy "acisf00884N002_evt2.fits[bin ccd_id=0:9:1]" ccd_image.fits

unix% dmlist ccd_image.fits blocks
 
--------------------------------------------------------------------------------
Dataset: ccd_image.fits
--------------------------------------------------------------------------------
 
     Block Name                          Type         Dimensions
--------------------------------------------------------------------------------
Block    1: EVENTS_IMAGE                   Image      Int2(10)
Block    2: GTI7                           Table         2 cols x 1        rows

This can cause problems when you have an event file with more than ~216 values (i.e. many event files). The solution is to use the opt qualifier to specify the desired datatype. Here we repeat the example, but force the type to be Int4 (4 byte integers):

unix% dmcopy "acisf00884N002_evt2.fits[bin ccd_id=0:9:1][opt type=i4]" ccd_real4.fits

unix% dmlist ccd_real4.fits blocks
 
--------------------------------------------------------------------------------
Dataset: ccd_real4.fits
--------------------------------------------------------------------------------
 
     Block Name                          Type         Dimensions
--------------------------------------------------------------------------------
Block    1: EVENTS_IMAGE                   Image      Int4(10)
Block    2: GTI7                           Table         2 cols x 1        rows

For more information and a list of valid datatypes, see "ahelp dmopt."