
The base routines in ISAP are callable from either a graphical user interface (GUI),
from the IDL command line, or from IDL command procedures (scripts).
The user will need to be able to plot/overlay these results displaying error
bars where appropriate, manipulate the data as well as fit models to it
and write FITS and ASCII output files (possibly MCFITS TBD).
The plotting routines will also write hardcopies (postscript files) of any
data set where appropriate. A history file will either be written to an ASCII
file and/or appended to the FITS header TBD. This will log any changes to a
data set as well as recording the results from any line/model fitting.
On-line help is provided in the following formats: standard IDL help screens,
HTML, and a hardcopy Reference Guide. All of these are derived from the
headers of the original procedure code.
Input files may be either ASCII or FITS. Output is either ASCII
or FITS. Data can also be read/written from the active IDL
session (i.e outside of the GUI). A record of how data has been
modified and the results from any analysis (e.g., line fitting) are
kept using a history mechanism which records history in an ASCII
history file and adds some history as comments in the FITS header.
In addition, every ISAP routine writes the command line wich has been
given interactively to call the routine into the history tag
of the output structure, so that the AAR itself keeps a record
of all steps by which it has been modified.
Note that this history handling currently holds only for the interactive mode
(e.g., not with the GUI).
All the data imported/manipulated/created/exported by SAP will be accessed by
the common AAR structure. The memory is allocated and deallocated dynamically,
when data are read into the system and each time an additional data set is
created or destroyed.
The handling of LWS raster observations is TBD.
General User Requirements
The basic user requirements for ISAP, including primarily a
description of why the package is needed, can be found in the
Introduction to the ISAP User's Guide .
Jargon (Definitions, Acronyms and Abbreviations)
Installation & Set-up (UNIX)
Put this in your .cshrc file:
alias isap 'idl /[path...]/isap_start.dat'
At IPAC, it is:
alias isap 'idl /iso/slws-dev/isap/v_2.0/isap_start.dat'
General Science Requirements
There are other spectral reduction packages available as part of
existing astronomical data reduction aand analysis packages (e.g.,
IRAF, MIDAS). However, for compatibility with other software efforts
within the ISO mission, particularly the Interactive Analysis
packages, we have decided to supply a package written in IDL. The
starting point for ISAP is the Auto Analysis Results (AARs) for LWS
and SWS. Various calibration and auxiliary files, as well as models
of continuum and line sources, observations from other telescopes
such as IRAS and KAO can also be read into ISAP as either FITS or
multi-column ASCII files.Data Input/Output
ISAP software reads LWS and SWS Auto Analysis Result (binary FITS) products and
writes them into an IDL AAR structure. Various LWS/SWS calibration files and
model and ground based spectra for cross-calibration and scientific
interpretation can also be imported.
| Field | Number | Format | Unit | Description |
|---|---|---|---|---|
| SWAAWAVE | 1 | R*4 | micron | Wavelength of data point |
| SWAAFLUX | 1 | R*4 | Jy | Flux density of data point td> |
| SWAASTDV | 1 | R*4 | Jy | Standard Deviation |
| SWAATINT | 1 | I*4 | sec | Total integration time |
| SWAADETN | 1 | I*4 | Detector number | |
| SWAAITK | 1 | I*4 | SWS instrument time key | |
| SWAAUTK | 1 | I*4 | ISO uniform time key | |
| SWAARPID | 2 | I*1 | Raster point ID | |
| SWAASPAR | 2 | I*1 | Spare | |
| SWAALINE | 1 | I*4 | Line number | |
| SWAASDIR | 1 | I*4 | Scan direction | |
| SWAASCNT | 1 | I*4 | Scan number | |
| SWAASTAT | 1 | I*4 | Status word | |
| SWAAFLAG | 1 | I*4 | Flag word |
| Field (Click for Details) | Offset | #Bytes | Variable Type | Description |
|---|---|---|---|---|
| LSANUTK | 0 | 1 | I*4 | UTK time |
| LSANRPID | 4 | 2 | I*1 | Raster Point ID |
| LSANFILL | 6 | 1 | I*2 | Filler |
| LSANLINE | 8 | 1 | I*4 | Line Number |
| LSANDET | 12 | 1 | I*4 | Detector ID |
| LSANSDIR | 16 | 1 | I*4 | Scan Direction |
| LSANSCNT | 20 | 1 | I*4 | Scan Count |
| LSANWAV | 24 | 1 | R*4 | Wavelength |
| LSANWAVU | 28 | 1 | R*4 | Uncertainty in Wavelength |
| LSANFLX | 32 | 1 | R*4 | Flux on detector |
| LSANFLXU | 36 | 1 | R*4 | Uncertainty in flux |
| LSANSTAT | 40 | 1 | I*4 | Status word |
The ARR structure is defined in IDL as follows:
aar_def = { type : 'AAR',$ ; string
history : '',$ ; string
header : '',$ ; string
data : data} ; data structure
where `data' is an array of structures, each array
element defined as follows:
data_def = { wave : 0.0,$ ; wavelength
flux : 0.0,$ ; flux
stdev : 0.0,$ ; standard deviation
tint : 0L,$ ; time interval
det : 0L,$ ; detector
itk : 0L,$ ; instrument time key
utk : 0L,$ ; universal time key
rpid : bytarr(2),$ ; raster point id
spare : bytarr(2),$ ; spare
line : 0L,$ ; line number
sdir : 0L,$ ; scan direction
scnt : 0L,$ ; scan count
status : 0L,$ ; status word
flag : 0L}
The array of data would ideally be arranged in order of increasing wavelength
by the pipeline. In case this is not the case, the ISAP sorting routine
sap_sort is planned.
To extract all data for detector 3, the following would be used:
idl>temp = where(aar.data.det eq 3,count) idl>if count gt 0 then detector3_data = aar.data(temp)(Note: this is only an example!)
The YAARR structure is defined in IDL as follows:SWS AAR
LWS AAR
YAAAR
A more generic, flexible IDL structure is also allowed for some ISAP
routines. It may have one or more tags from the standard SAAR or
LAAR missing, and it is refered to as `YAAAR' ("Yet Another AAR").
As long as the tags that are required and expected for a given
routine are present, the code should act as expected.
aar_def = { type : 'YAAAR',$ ; string
history : '',$ ; string
header : '',$ ; string
data : data} ; data structure
where `data' is an array of structures, each array
element defined as follows:
data_def = { wave : 0.0,$ ; wavelength
flux : 0.0,$ ; flux
stdev : 0.0,$ ; standard deviation
.
.
(other tags optional)
.
flag : 0L}
Auxilary Files for SWS & LWS
| Auxilary File | Descripion | Page |
|---|---|---|
| APPH | Aperture pointing history | 37 |
| IIPH | Instrument instantaneous pointing history | 37 |
| IRPH | Instrument reference pointing history | 37 |
| ORBIT | Orbital parameters file | 37 |
| Task(Click for Details) | Description | Programmer | Status |
|---|---|---|---|
| ascii2yaaar | Import ASCII table to IDL YAAAR structure | P. Morris (SRON) | ? |
| sap_rfits | Import FITS AAR file to IDL AAR structure | R. Narron (IPAC) | ? |
| sap_wfits | Export IDL AAR structure to FITS file | R. Narron (IPAC) | ? |
Plotting
| Task(Click for Details) | Description | Programmer | Status |
|---|---|---|---|
| disp_aar | Plot an AAR in various modes | I. Khan (IPAC) | ? |
History
| Task(Click for Details) | Description | Programmer | Status |
|---|---|---|---|
| sap | Initialize ISAP history handling | E. Sturm (MPE) | ? |
| squit | Quit ISAP history handling | E. Sturm (MPE) | ? |
| write2hist | Write a comment into the history tag | E. Sturm (MPE) | ? |
Header
| Task(Click for Details) | Description | Programmer | Status |
|---|---|---|---|
| get_hdrkey | Read a keyword value (and comment) | E. Sturm (MPE) | ? |
| write_hdrkey | (Over)Write a keyword value (and comment) | E. Sturm (MPE) | ? |
Scan Arithmetic
| Task(Click for Details) | Description | Programmer | Status |
|---|---|---|---|
| arithm | del_2.0 | E. Sturm (MPE) | ? |
Rebinning (Regridding, Resampling) and Combining (Merging) Scans
| Task(Click for Details) | Description | Programmer | Status |
|---|---|---|---|
| glue | Join overlapping (mini-)spectra into a single spectrum | R. Narron (IPAC) | ? |
| mask | Mask (mark) bad data points | R. Narron (IPAC) | ? |
| normal | Normalize a portion of a spectrum | R. Narron (IPAC) | ? |
| sap_rebin | Rebin/Regrid/Resample an AAR on wavelength | I. Khan (IPAC) | ? |
| sap_shift | Normalize a scan to match a selected detector | R. Narron (IPAC) | ? |
| tippex | Replace masked points with interpolated values | R. Narron (IPAC) | ? |
Conversion
| Task(Click for Details) | Description | Programmer | Status |
|---|---|---|---|
| wave_form | Convert wavelength units | E. Sturm (MPE) | ? |
| spect_form | Convert flux (density) units | E. Sturm (MPE) | ? |
| vel_prof | Convert from wavelength to velocity space | E. Sturm (MPE) | ? |
| wav_dop | Correct wavelengths for Doppler velocity shifts | E. Sturm (MPE) | ? |
Modeling & Fitting
| Task(Click for Details) | Description | Programmer | Status |
|---|---|---|---|
| dered | Deredden a spectrum or line list | D.Lutz/C. Wright (MPE) | ? |
| syn_phot | Perform synthetic photometry | I. Khan (IPAC) | ? |
| zodiacal | Model Zodiacal emission spectrum | I. Khan (IPAC) | ? |
Instrumental Corrections
| Task(Click for Details) | Description | Programmer | Status |
|---|---|---|---|
| point2ext | SWS calibration conversion between point and extended sources | E. Sturm/L. Haser (MPE) | ? |
| how_about_for_lws? | Any LWS instrumental corrections available for ISAP? | ? (RAL) | ? |
Filtering
| Task(Click for Details) | Description | Programmer | Status |
|---|---|---|---|
| sm_airy | Airy smoothing | L. Verstraete (IAS, Orsay) | ? |
| sm_box | Boxcar smoothing | L. Verstraete (IAS, Orsay) | ? |
| sm_gauss | Gaussian smoothing | L. Verstraete (IAS, Orsay) | ? |
| sm_median | Median filtering | L. Verstraete (IAS, Orsay) | ? |
GUI Bits
| Task(Click for Details) | Description | Programmer | Status |
|---|---|---|---|
| isap_gui | IDL script to load GUI | M.Buckley/S.Unger(RAL) | ? |
| Task(Click for Details) | Description | Programmer | Status |
|---|---|---|---|
| avgsig | Compute weighted means, sigmas and dispersions | I. Khan (IPAC) | ? |
| band_2_det | Map bands to detectors | E.Sturm(MPE) | ? |
| bin_struct | Modify an AAR after rebinning (sap_rebin) | I. Khan (IAPC) | ? |
| binsrch | Binary search to find index | I. Khan (IAPC) | ? |
| chk_det | Check that detectors are present | E. Sturm (MPE) | ? |
| chk_tag | Check that tags are present | E. Sturm (MPE) | ? |
| chk_multix | Check for very close x values (prebinning) | I. Khan (IPAC) | ? |
| chk_units | Check units | E. Sturm (MPE) | ? |
| define_yaaar | Define IDL YAAAR structure | P. Morris (SRON) | ? |
| dered_corr | Dereddening for a single data point | D. Lutz (MPE) | ? |
| dered_getext | Interpolate extinction or Tau | D. Lutz (MPE) | ? |
| flux_conserv | Interpolate a spectrum while conserving flux | I. Khan (IPAC) | ? |
| get_unit | Get units for tag(s) | E. Sturm (MPE) | ? |
| inter_pol | Perform interpolation (sap_rebin) | I. Khan (IPAC) | ? |
| is_struct | Verify structure type AAR, SPD, or LLI | E. Sturm (MPE) | ? |
| kwd_notset | Check that a keyword is set and of correct type | R. Narron (IPAC) | ? |
| integrate_flux | ? | I. Khan (IPAC)? | ? |
| make52 | Make a 52 element (det) array | E. Sturm (MPE) | ? |
| make_detmask | Make mask from det and band switches | E. Sturm (MPE) | ? |
| makeyaaarhead | Make IDL YAAAR header | P. Morris (SRON) | ? |
| plot_legend | Plot a legend (disp_aar) | I. Khan (IPAC) | ? |
| polyint | Polynomial interpolation (sap_rebin) | I. Khan (IPAC) | ? |
| read_filter | Import ASCII filter curve into IDL YAAAR | I. Khan (IPAC) | ? |
| redo_hdr | Re-do secondary FITS header | R. Narron (IPAC) | ? |
| sap_abs | Perform y = abs(x) on arrays | E.Sturm/A.Fiedler (MPE) | ? |
| sap_add | Add spectrum+spectrum or spectrum+C | E.Sturm/A.Fiedler (MPE) | ? |
| sap_div | Divide spectrum/spectrum or spectrum/C | E.Sturm/A.Fiedler (MPE) | ? |
| sap_exp | Perform y = exp(x) on arrays | E.Sturm/A.Fiedler (MPE) | ? |
| sap_exp10 | Perform y = 10^x on arrays | E.Sturm/A.Fiedler (MPE) | ? |
| sap_log | Perform y = log_e(x) on arrays | E.Sturm/A.Fiedler (MPE) | ? |
| sap_log10 | Perform y = log_10(x) on arrays | E.Sturm/A.Fiedler (MPE) | ? |
| sap_max | Max(spec,spec) or Max(spec,C) | E.Sturm/A.Fiedler (MPE) | ? |
| sap_mean | Mean(spec,spec) | E.Sturm/A.Fiedler (MPE) | ? |
| sap_min | Min(spec,spec) or Min(spec,C) | E.Sturm/A.Fiedler (MPE) | ? |
| sap_mult | Multiply spec*spec or spec*C | E.Sturm/A.Fiedler (MPE) | ? |
| sap_sqrt | Perform y = sqrt(x) on arrays | E.Sturm/A.Fiedler (MPE) | ? |
| sap_sub | Subtract spec-spec or spec-C | E.Sturm/A.Fiedler (MPE) | ? |
| sap_ckunits | Check that parameter is set and of correct type | R. Narron (IPAC) | ? |
| sap_error | Handle error messages (GUI, command line, script) | R. Narron (IPAC) | ? |
| sap_keyword_set | Check that a keyword is set | E. Sturm (MPE) | ? |
| scale_define | Define new wavelength scale for rebinning(sap_rebin) | I. Khan (IPAC) | ? |
| set_usersym | Set user-defined symbols (disp_aar) | A. Fiedler (MPE) | ? |
| symgen | Symbol generation (disp_aar) | A. Fiedler (MPE) | ? |
| add_history_string | Add a string (comment) to the history | E. Sturm (MPE) | ? |
| update_history | Update history tag in (Y)AAR | E. Sturm (MPE) | ? |
| write2hist | Write a comment into the history tag | E. Sturm (MPE) | ? |
| zodi_iso_emit | Compute Zodiacal emission spectrum at SWS/LWS wavelengths (zodiacal) | I. Khan (IPAC) | ? |
| zodi_iso_flux | Compute zodiacal flux for given T,lambda (zodi_iso_emit) | I. Khan (IPAC) | ? |
| zodi_model | (ra/dec)->(elon/elat); UTC->Julian date (zodiacal) | I. Khan (IPAC) | ? |
| Task(Click for Details) | Responsible | Status |
|---|---|---|
| test_disp_aar.pro | Mazz/Iffat | V1.0 works |
| test_sap_rebin.pro | Mazz/Iffat | V1.0 works |
| test_merge.pro | Steve/Bob | V1.0 works |
| test_arithm.pro | Eckhard | V1.0 works |
| test_synphot.pro | Steve/Iffat/Pat | Needed |
| test_zodi.pro | Mazz/Iffat | Needed |
| test_smooth.pro | LV (IAS) | V1.0 works |
| Task(Click for Details) | Responsible | Status |
|---|---|---|
| test_sws01.pro | Eckhard | OK |
| test_sws02.pro | Mazz | Needed |
| test_sws07.pro | Eckhard/Dieter? | Needed |
| test_lws01.pro | Steve/Sarah | Needed |
| test_lws02.pro | Sarah/Steve | Needed |
| test_lws03.pro | Steve/Sarah | Needed |
| test_lws04.pro | Sarah/Steve | Needed |
Note that multifit has been integrated "as is" into IA3 for fitting and measuring lines. These routines are planned to be re-written for Version 2+.
| Task(Click for Details) | Description | Programmer | Status |
|---|---|---|---|
| sap_subset | Subset an AAR or YAAR | TBD | Wish-list |
| sap_sort | Sort an AAR on wavelength | TBD | Wish-list |
| specfit | Line and continuum fitting | TBD | Wish-list |
| merge_slws | Merge/splice SWS & LWS spectra | Steve/Mazz/Sarah/Eckhard | Wish-list |
| whatelse? | TBD | TBD | Wish-list |