A set of sample data can be run from the installation directory by typing
source bandmerge.env
./run
To run the other sample data, see the enclosed README.

  1. Fiducial Image Frame (FIF). Use the same FIF when running APEX on each band you want to merge. This will insure that the X,Y coordinates for each band are defined from the same FIF.

    If your mosaics in the different bands were made with different FIFs, and hence the pixel coordinates don't match, you will need to create a FIF.tbl that covers the region of interest. The FIF.tbl file has to encompass the full range of all the observations: if there are point sources outside the range of the astrometry in FIF.tbl, s2c_trans will produce lines with ****** for the x,y coordinates and bandmerge will crash.

    If necessary, run make_fif.pro on the fits files to generate the file FIF.tbl:

    IDL> make_fif,'ch1.fits'

    Note that your output from apex.pl or apex_1frame.pl must contain the following columns for input into s2c_trans: RA, delta_RA, Dec, delta_Dec, delta_RAD, x, y, flux, delta_flux, SNR, chi2/dof, deblend. This can be specified in the apex namelist file (in the 'select_columns' variable). NOTE THE LOWER CASE 'delta' in the apex output column names.

    Do Steps 2-3 for each band, then do Steps 4 and 5 to merge the bands and output the correct coordinates. :

  2. Input files header keywords. The keywords CDELT, NAXIS, Total_PS_Number, and N_Apertures must be edited to match the values of the input tables and the FIF.tbl file or bandmerge will crash. Two new keywords, INSTRUME and CHNLNUM must also be added to the header keywords.

    You can use this script example (provided kindly by Jennifer Karr) which will take the FIF.tbl and the extraction table and make sure the keywords are properly set to match the number of sources and the FIF.tbl keywords.

    ./keywords.pl

    Input Apex File: ch1.tbl
    Output File: ch1a.tbl
    Instrument: (IRAC or MIPS): IRAC
    Band (1-4 or 1-3): 1

  3. Run s2c_trans to convert RA,Dec and their uncertainties to pixel coordinates Global_X,Global_Y using the same FIF.tbl for all channels:

    s2c_trans -r data/FIF.tbl -i data/ch1a.tbl -o data/ch1b.tbl

    Alternatively, you can run s2c_trans with an input namelist:      s2c_trans -n s2c_trans.nl

  4. Run bandmerge.

    bandmerge -n bandmerge.nl    (click here to see examples of bandmerge input namelists and output files)

    Alternatively, you can run bandmerge using the command line option:

    bandmerge -i data/ch1b.tbl data/ch2b.tbl data/ch3b.tbl data/ch4b.tbl -o output/outfile.bm -q output/outfile.sp -s output/outfile.stat

  5. Run c2s_trans to convert pixel coordinates Global_X,Global_Y to RA,Dec:

    c2s_trans -r data/FIF.tbl -i output/outfile.bm -o output/outfile_radec.bm

    Alternatively, you can run c2s_trans with an input namelist:      c2s_trans -n c2s_trans.nl


SPITZER HOME || SPITZER SCIENCE || INSTRUMENTS || SCIENCE USER SUPPORT || SEARCH

help@spitzer.caltech.edu

This file was last modified on Fri Aug 29 14:39:50 PDT 2008.

California Institute of Technology Jet Propulsion Laboratory NASA