| plratio | stsdas.hst_calib.synphot | plratio |
plratio -- Plot the ratio of observed to predicted spectrophotometry and photometry.
plratio obsmode spectrum form spfile
This task will calculate and plot the ratio of observed spectrophotometric data to a synthetic HST spectrum. It also optionally plots the ratios of photometric observations to the synthetic photometry computed from the synthetic HST spectrum. This task produces plots similar to those produced by plspec, except that it plots ratios of the observed data (the spectrophotometric and photometric tables) to the predicted data (the combination of obsmode and spectrum) instead of plotting the data themeselves. The task also plots chi quared error of the fit, and the bias and root mean squared errors in magnitudes.
Spectrophotometric ratios are plotted as histograms if the form is counts or obmag and as continuous curves if the form is not. Photometric ratios are plotted as horizontal lines whose midpoints are marked by a circle. The horizontal line has its x value set to the pivot wavelength of the observation mode passband and its y value set to the ratio of the effective stimulus taken from the photometric table to the effective stimulus calculated from the spectrum and obsmode. The length of the line is set to the full width half maximum of the equivalent gaussian of the observation mode passband. The observation mode passbands are overplotted at the base of the plot.
Which plots are produced are controlled by the task parameters spfile and pfile. If spectophotometric ratios are not desired, spfile should be set to "none" or left blank. If photometric ratios are not desired, pfile should be set to "none" or left blank. Spectrophotometric ratios are computed for every combination of synthetic spectra and spectrophotometric files. Synthetic spectra are matched to rows in the photometic table by matching the obsmode and spectrum parameters to the OBSMODE and TARGETID columns in the photometric table. The strings must be exactly the same in order to make the match.
The obsmode string may be set to "none". In this case, the task uses an observation mode that is one over the wavelength set of the spectrum. If photometric errors are being computed, however, the form must be set to counts or obmag, because otherwise the task cannot compute the effective stimulus of the synthetic spectrum.
Each command may either be a simple bandpass, which is represented by a comma separated string of keywords uniquely specifying an observing mode of the telescope or a more complex command, described in the help file for calcband. The keywords which make up the observing mode are explained further in the obsmode task. If this parameter is left blank or set to "none", a default observation mode that is everywhere one will be used.
The commands that can be passed to this parameter are described in detail in the help file for the calcspec task.
FNU erg / s / cm^2 / Hz FLAM erg / s / cm^2 / A PHOTNU photons / s / cm^2 / Hz PHOTLAM photons / s / cm^2 / A COUNTS photons / s ABMAG -2.5 log_10 (FNU) - 48.60 STMAG -2.5 log_10 (FLAM) - 21.10 VEGAMAG -2.5 log_10 (F/F_vega) OBMAG -2.5 log_10 (COUNTS) JY 10^-23 erg / s / cm^2 / Hz MJY 10^-26 erg / s / cm^2 / HzA standard magnitude system is VEGAMAG, for which Vega by definition has magnitude 0 at all wavelengths. The AB and ST magnitude systems are based on constant flux per unit frequency and per unit wavelength, respectively. The zero points for these two systems are set for convenience so that Vega has magnitude 0 in both systems for the Johnson V passband.
.1,.2,.3,.4 A list of single values .1-.4x.1 The same list expressed as a range -1 - -4 A range with an implicit step size of -1 1-9,10-20x2 A list of more than one range
If no wavelength table is specified, the task generates a wavelength set which covers the range between the left and right plot limits. If there is no wavelength table, and plot limits are not specified, a default wavelength set is used. The default wavelength set covers the wavelength range where the spectrum is non-zero. Wavelengths are spaced logarithmically over this range. If more than one spectrum is plotted, the range is computed based on the first spectrum. If the wavelength range of the spectra differ significantly, a wavelength table should be specified explicitly or plot limits should be set.
area = 45238.93416: HST telescope area in cm**2.
grtbl = "mtab$*.tmg": HST graph table. Uses the
most recent version by default.
cmptbl = "mtab$*.tmc": Instrument component table.
The most recent version is used by default.
1. Calculate the ratio of a 15000 K blackbody spectrum to that of Vega. We first renormalize the blackbody spectrum to have magnitude 0 in the V passband (to match the absolute flux level of Vega). The ratio is plotted in units of flam.
sy> plratio none "rn(bb(15000),band(v),0,vegamag)" flam \ >>> crcalspec$alpha_lyr_stis_002.fits
Written by B.Simon based on XCAL code written by Keith Horne