Hints for STIS
Run catfits which is in stsdas.fitsio on your fits files to see their structure and extensions. You will see the extensions with their types and the dimensionality of the BINTABLEs. You might even send it to a file and print it out for reference.
There are three types of extension: images =IMAGE, text tables =TABLE; binary tables=BINTABLE
the EXTNAME values SCI, ERR, and DQ indicate science, error, and data quality
format example: fitsfile.fits[sci,2] is the second science file in fitsfile.fits
Your other clue is the suffix on the name. We are interested mainly in the final calibrated spectra _x1d, _x2d and _sx1, _sx2
_x1d table 1-D extracted spectra: aperture extracted, background subtracted, flux and wavelength calibrated spectra
_sx1 table Summed 1-D extracted spectra
_x2d image 2-D extracted data: rectified, wavelength and flux calibrated spectra or geometrically corrected imaging data.
_sx2
image Summed 2-D extracted spectra
There are three main type of STIS data (if you want to check for sure imhead the [0]extension and look for the slit size. Long slit is 52x1 with short exposure times for bright objects. Echelle is .1x.1 or smaller long exposure times)
Note: Don't forget you can use the display, imexam and implot tasks to look at your 2-D images and figure out what to extract or what is going on.
x2d or _sx2 is a longslit extracted image. You can display with display or with stsdas.graphics.stplot.sgraph
Analysis using noao.onedspec.splot
See table for the splot tasks options.
When you are using splot, a log file saves
results produced by the equivalent width or de-blending functions. To specify a
file name for this log file, you can set the save_file parameter by typing, for
example:
cl> splot my file save_file=results.log
If you have used tomultispec to transform a STIS
echelle spectrum into OIF files with WCS wavelength information you can step
through the spectral orders stored in image lines using the ")",
"(", and "#" keys. To start with the first entry in your
OIF file, type:
cl> splot new_ms 1
You can then switch to any order for analysis
using the ")" key to increment the line number, the "(" key
to decrement, and the "#" key to switch to a specified image
line. Note the beam label that gives the spectral order cannot be used for navigation. See the online help for details.
Useful splot Cursor Commands
|
Command |
Purpose |
|
Manipulating spectra |
|
|
f |
Arithmetic mode; add and subtract spectra |
|
l |
Convert spectrum from fn to fl (invert transformation with "n") |
|
n |
Convert spectrum from fl to fn |
|
s |
Smooth with a boxcar |
|
u |
Define linear wavelength scale using two cursor markings |
|
Fitting spectra |
|
|
d |
Mark two continuum points & de-blend multiple Gaussian line profiles |
|
e |
Measure equivalent width by marking points around target line |
|
h |
Measure equivalent width assuming Gaussian profile |
|
k |
Mark two continuum points and fit a single Gaussian line profile |
|
m |
Compute the mean, RMS, and S/N over marked region |
|
t |
Enter interactive curve fit function (usually used for continuum fitting) |
|
|
|
|
Displaying and redrawing spectra |
|
|
a |
Expand and autoscale data range between cursor positions |
|
b |
Set plot base level to zero |
|
c |
Clear all windowing and redraw full current spectrum |
|
r |
Redraw spectrum with current windowing |
|
w |
Window the graph |
|
x |
Etch-a-sketch mode; connects two cursor positions |
|
y |
Overplot standard star values from calibration file |
|
z |
Zoom graph by a factor of two in X direction |
|
$ |
Switch between physical pixel coordinates and world coordinates |
|
|
|
|
General file manipulation commands |
|
|
? |
Display help |
|
g |
Get another spectrum |
|
i |
Write current spectrum to new or existing image |
|
q |
Quit and go on to next input spectrum |
_x1d or _ sx1 files are bintable containing echelle spectra
sgraph 'file_x1d.fits[1] WAVELENGTH FLUX' #plots l vs. flux first order echelle
sgraph 'file_x1d.fits[1][r:row=4] WAVELENGTH FLUX' # gives 4th echelle row l vs. f
remember row!!!!
Some _sx1 longslit extracted tables have only ONE row(order). catfits with XXFx1R shows this
Now that you have found them here is how to get them into a form for analysis.
Echelle spectra are in a standard FITS table consists of columns and rows forming a two-dimensional grid of cells; however, each of these cells can contain a data array, effectively creating a table of higher dimensionality. Tables containing extracted STIS spectra take advantage of this feature. Each column of a STIS spectral table holds data values corresponding to a particular physical attribute, such as wavelength, net flux, or background flux. Each row contains data corresponding to one spectral order, and tables holding echelle spectra can contain many rows. Each cell of such a spectral table can contain a one-dimensional data array corresponding to the physical attribute and spectral order of the cell.
the simplest way to convert echelle x1d to IRAF usable formats is to use the hst_calib.ctools.tomultispec command
convert to IRAF multispec files
tomultispec myfile_x1d.fits new_ms
This gives you an image with each spectra in a different row.
You then can use the splot tack to analyze
them.
PHOTFLAM is defined to be the mean flux density Fl in units of erg cm-2 s-1 Å-1 that
produces 1 count per second in the HST observing mode (PHOTMODE) used for the observation. If the Fl spectrum of your source is significantly sloped across the bandpass or contains prominent features, such as strong emission lines, you may wish to recalculate the inverse sensitivity using synphot.
To convert from counts or DN to flux in units of erg cm-2 s-1 Å-1, multiply the total number of counts by the value of the PHOTFLAM header keyword and divide by the value of the EXPTIME keyword (exposure time). You can use the STSDAS task imcalc to convert an entire image from counts to flux units. For example, to create a flux-calibrated output image outimg.fits from an input image inimg.fits[1] with header keywords PHOTFLAM = 2.5E-18 and EXPTIME = 1000.0, you could type:
st> imcalc inimg.fits[1] outimg.fits "im1*2.5E-18/1000.0"
To convert a measured flux F, in units of erg cm-2 s-1 Å-1, to an ST magnitude, plug it into the following equation:
m = -2.5 x log10 (F) + PHOTZPT
where the value of the PHOTZPT keyword is the zero point of the ST magnitude scale. The zero point of the ST magnitude system has
always been and probably always will be equal to -21.10