You are here: IRS>SmartDoc Web>SmartDataStructures (04 Nov 2008, DonBarry)

SMART Data Structures

SMART utilises a number of data structures to store and manipulate data. The main ones are :

  1. The 1D-data, (ie. spectra), are stored in the "IRS" spectral structure.
    This is the structure that is used whenever the user is directly operating on the structure. (ie. Command line and batch/script calls.)
  2. Inside the SMART IDEA window processing the "IAAR" and "YAAAR" structures are used.


SMART IRS Data Structure

Datasets are passed within SMART in pointer arrays.
Each element of the pointer arrays contains a structure of the format :

        *ptr_aar(n) = {irs:     irs,   $
                       target:  str,   $  
                       filename:string}

irs IDL data structure "irs", see below.
target IDL string variable containing target name.
filename IDL string variable containing file name.

"irs" is an IDL data structure of the form :

        irs = {type   : 'IRS',      $
               header : str,        $
               history: strarr(1) , $
               data   : data}

type IDL string hard coded with the letters "IRS".
|header |IDL string variable containing a formated ASCII FITS header. This will contain all the important key words from the SSC pipeline. |
history IDL one element string array. This can contain history information.
data IDL data structure containg observational data.

"data" is an IDL data structure of the form :

        data = {wave:0.0, flux:0.0, stdev:0.0, order:0l, slitpos:0l, module:0l, bcd:0l, status:0l, sky:0.0, skye:0.0, flag:0l}

Note : This is NOT the same as the "data" data structure in the "YAAAR" data structure described below.

where :

wave Wavelength in microns.
flux Flux density in Jy (TBC).
stdev Uncertainty in flux density in Jy (TBC).
order IRS orders SL, LL = 1 ,2 ,3 (bonus order) SH, LH = 11-20.
slit position IRS Slit Position range 1:30 for SL1, SL2, LL1, LL2 and 1:5 for SH and LH.
|module |IRS module.
The low resolution modules (SL, LL) each have two entrance apertures so when a point source
is observed in order 1 it is not observed simultaneously in order 2.
Order 3 is the bonus order (very short) and it sees the same sky as order 2.

  • 0 = SL1 (order 1 = target; order 2, 3 = sky)
  • 1 = SL2 (order 2,3 = target; order 1 = sky)
  • 2 = LL1
  • 3 = LL2
  • 4 = SH (order 11-20)
  • 5 = LH (order 11-20)

|
bcd IRS BCD numbers 1....n.
status Will contain IRS status flag if we have one !
sky Sky background in Jy (TBC).
skye Sky background uncertainty in Jy (TBC).
flag So we can mask the data. (BAD='40000000'XL, GOOD='BFFFFFFF'XL)

Notes :

  1. Do not hard code in the maximum slit position, in case we decide for some reason to take a strip outside the nominal wavesamp.
  2. This assumes the BCDs will start at 1 but they may start at 0 !
  3. There may be additional data tags added to the structure, for now assume you will have at least the ones outlined above.
  4. Use a tag value of -1 in command line routines if for example you wish to operate on all orders etc
  5. if it doesn't make sense please ask before you start coding !

SMART IDEA Window Processing

The SMART-IDEA Window (based on the original ISAP GUI) passes the data inside the window environment
via a structure known as an AAR, (Auto Analysis Result) which is currently available in two versions for IRS data :

  1. IAAR : "IRS AAR", spectral data.
  2. YAAAR : "Yet Another AAR", a more generic, flexible AAR-like IDL data structure,
    for handling spectral data from any instrument providing it has wave, flux, stdev and flag data tags.

The SMART IDEA window will also handle the original ISO data formats allowing direct comparisons between Spitzer/SIRTF data and ISO data :

  1. LAAR : LWS Auto Analysis Result.
  2. SAAR : SWS Auto Analysis Result.
  3. Browse Quality Products from the ISO Archive (LWS, SWS, CAM-CVF and PHOT_S) => stored in YAAAR format.

YAAAR

Currently the YAAAR format is used to pass IRS data into the SMART IDEA Window :

        yaaar = {type: 'YAAAR',       $
                 header: str,         $
                 history: strarr(1),  $
                 data: data}

type IDL string hard coded with the letters "YAAAR".
header IDL string variable containing a formated ASCII FITS header.
history IDL one element string array. This can contain history information.
data IDL data structure containg observational data.

"data" is an IDL data structure of the form :

        data = {wave:0.0, flux:0.0, stdev:0.0, det:0l, line:0l, sdir:0l, scnt:0l, status:0l, sky:0.0, skye:0.0, flag:0l}

Note : This is NOT the same as the "data" data structure in the "IRS" data structure described above.

where :

IRS name YAAAR Name Description
   
order det IRS orders SL/LL = 1 ,2 ,3 (bonus order) SH/LH = 11-20
slitpos line IRS Slit Position -1 = whole slit, 1-30 = positions along SL/LL
module sdir SL1 = 0, SL2 = 1, LL1 = 2, LL2 = 3, SH = 4, LH = 5
bcd scnt IRS BCD nubers 1....n

Outside of SMART-IDEA

Command line routines use the IRS spectral structure described above.

SMART IDEA AAR

(This section is adapted from the ISAP WWW page "ISAP AAR" with all relevant acknowledgements.)

Input AAR:

The AAR FITS files for SWS and LWS are the final products of pipeline processing.
ISAP defines a new named structure with simpler data names and read these files into it.
This new AAR contains the following tags :

Type Description
"LAAR' for LWS FITS
'SAAR' for SWS FITS
'YAAAR' for processed AAR (stands for "Yet Another AAR")

header - Array of strings of 80 chars

history - Array of strings of 32700 chars each

data - array of structures of data containing the possible data tags as follows :

{WAVE, WAVEU, FLUX, STDEV, TINT, DET, ITK, UTK, RPID, SPARE, LINE, SDIR, SCNT, STATUS, FLAG}

The FITS primary and secondary headers are written into the header tag of AAR.
In addition, all HISTORY keywords found in FITS headers are saved in history tag.

The traslation of input FITS file parameters into ISAP AAR data tags is as follows :

SAAR/LAAR SWS LWS
     
     
WAVE SWAAWAVE LSANWAV
WAVEU   LSANWAVU
FLUX SWAAFLUX LSANFLX
     
STDEV SWAASTDV LSANFLXU
TINT SWAATINT LSANTINT
DET SWAADETN LSANDET
     
ITK SWAAITK LSANITK
UTK SWAAUTK LSANUTK
RPID SWAARPID LSANRPID
     
SPARE SWAASPAR LSANFILL
LINE SWAALINE LSANLINE
SDIR SWAASDIR LSANSDIR
     
SCNT SWAASCNT LSANSCNT
STATUS SWAASTAT LSANSTAT
FLAG SWAAFLAG LSANFLAG

YAAAR:

Input to ISAP are the files as described above. However, sometime during processing information is lost on certain data tags.
For example when you rebin/merge/average spectra from individual detectors into one final spectrum, you are loosing the information on individual detectors.
Thus, ISAP processed AAR , known as YAAAR, can have 4 to 15 data tags.
The minimum data tags expected are WAVE, FLUX, STDEV, and FLAG.

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