You are here: IRS>SmartDoc Web>ThreePlaneFiles (30 Oct 2008, WikiGuest)

SMART Cook Book

Making a 3 Plane Data File for SMART

Usage

SMART processes input data comprised of 3 plane images. Data from the Spitzer (formerly SIRTF) satellite is available from the pipeline in separate plane formats.
The PERL script "sm_make_3plane.pl" supplied with SMART allows the user to convert pipeline output files to 3 plane data for input to SMART.
These instructions assume that you are using SMART on a Unix/Linux system.
For other operating systems (eg. Microsoft Windows, Macintosh OS) please see your system administrator for installation and conversion advice.

For information about the pipeline files please see the "Infra Red Spectrograph Data Handbook". This is available from the SSC.

NOTE :
To use "sm_make_3plane.pl" you must have PERL installed on your system.
Once PERL is installed you must add to it the "CFITSIO" file subroutine library, (which allows PERL to handle ".fits" files)
and the "CFITSIO.pm" interface (which allows PERL to use CFITSIO).
Information about both CFITSIO and CFITSIO.pm can be found at : CFITSIO - A FITS File Subroutine Library.
(This is maintained by the NASA Goddard Spaceflight Center.)
Due to the very large number of possible system configurations, sources for and ways of installing PERL
the SMART development team cannot advise on how to install PERL, CFITSIO or CFITSIO.pm on any particular system.
Please see your local system administrator for advice about how best to do this. |

To convert data from pipeline output to 3 plane SMART input do the following :

  1. First obtain your data. Data may be obtained from the Spitzer (formerly SIRTF) archive or direct from the SSC.
  2. To combine data into a 3 plane image you must have :

    1. The bcd (basic calibrated data) file for the relevant observation.
    2. The data file. This may be the same as the bcd file or another from earlier in the pipeline.
    3. The relevant uncertainty file. This will normally be the "func" type file for the corresponding data file.
    4. The relevant mask file. This will normally be the "bmask" type file for the corresponding data file.
  3. The "sm_make_3plane.pl" is a PERL script, not an IDL routine. Do not attempt to run it from the "IDL>" prompt.
    Instead run it from the Unix/Linux prompt.
  4. At the Unix/Linux prompt type the following :

    > sm_make_3plane.pl "outfile" "bcd" "data" "unc" "bmask"

    Where :

    • outfile is the name of the output 3 plane file to be written
    • bcd is the bcd file name
    • data is the data file name
    • unc is the uncertainty file name
    • bmask is the mask file name

    If a file is in the directory from which "sm_make_3plane.pl" is being run its name alone is sufficient, otherwise enter its path as well.

  5. When "sm_make_3plane.pl" is run it may produce the error message "Copying (input file name) to (output file name) failed with 207".
    This error message may be disregarded.
  6. "sm_make_3plane.pl" will produce a ".fits" output file which has the header taken from the bcd file. (This is necessary for SMART to function properly.)
    The data is taken from the data file. The data and bcd files can be the same file or two different ones.
    If they are the same enter the same file name twice, once for the "bcd" file name input parameter and once for the "data" file name input parameter.
  7. "sm_make_3plane.pl" can then be run again on other combinations of files to make further 3 plane data sets.
    If this is done please ensure that the output file names are unique. An error condition will occur if you attempt to write output to an already existing file.

 
This site is powered by FoswikiCopyright © 2002-2009 by the Cornell IRS Team.
Send feedback. We use Foswiki.