NSPLOT,H,W,F,q,s,title=title,xtitle=xtitle,ytitle=ytitle, $
/qtitle,/dots,/mark,/bars,/iuesips
The positional parameters are as follows:
H | This will either be a FITS header (e.g., from READMX) or a scale factor record (e.g., the ``h'' vector from IUESPEC). It's for annotation purposes only; to suppress the annotation enter 0. |
W | Wavelength vector (e.g., as read by READMX or IUESPEC). |
F | Fluxes corresponding to W. |
Q | Quality flags corresponding to W and F. These may be either flags (e.g., from READMX) or flags (e.g., from IUESPEC). Flags are plotted separated; they're the bottom plot in the stack. They are optional; if scalar (e.g., 0) or undefined, they will be ignored. |
S | Sigmas or noise vector corresponding to the spectrum (e.g., from READMX). They are optional; if scalar or undefined, they are ignored. Sigmas (or both sigmas and quality flags) may be left off the calling sequence altogether if they are not desired. |
There are a number of keywords that may be included if desired:
TITLE | Sets a main title for the plot(s). It's best to suppress the usual annotation by setting H equal to 0 if you use this keyword. |
XTITLE | Sets an X axis title (default is "Wavelength"). If set to 1, the value of !x.title will be used. |
YTITLE | Sets a Y axis title (default is "Flux"). If set to 1, the value of !y.title will be used. |
QTITLE | Sets the Y axis title for the quality flag plot. Defaults are the Greek nu and epsilon characters for NEWSIPS and IUESIPS, respectively. |
DOTS | If set, and sigmas are given, the sigmas will be plotted as dots above and below the fluxes, rather than in a separate plot. |
BARS | If set, and sigmas are given, the sigmas will be plotted as error bars on the fluxes, rather than in a separate plot. |
MARK | If set, the fluxes with negative quality flags will each be marked with an X. Quality flags are still plotted separately. |
IUESIPS | Normally, the presence of positive values is used to determine whether quality flags are flags or flags. In rare cases, a user may choose to plot a region where there are no positive (i.e., good) flags. This keyword will tell the program to assume the flags are flags. The quality flag plot looks different depending on which type of flags were entered. |
See Table 6.2 for examples.
nsplot,h,w,f,q,s | Make three stacked plots of fluxes, sigmas, and quality flags, with standard annotation taken from the header. |
nsplot,0,w,f,q,s,title='RR Lyrae' | Make the same three plots but suppress the usual annotation and label it ``RR Lyrae'' instead. |
nsplot,h,w,f,0,s | Make two stacked plots of fluxes and sigmas, suppressing quality flag plot, with standard annotation. |
nsplot,h,w,f,q | Make two stacked plots of fluxes and quality flags, suppressing sigma plot, with standard annotation. |
nsplot,h,w,f | Make one plot of fluxes with standard annotation, suppressing plots for both sigmas and quality flags. |
nsplot,h,w,f,q,s,/dots | Make two stacked plots of fluxes and quality flags, and overplot the sigmas as dots above and below the fluxes. |
nsplot,h,w,f,q,s,/bars,/mark | Make two stacked plots of fluxes (with error bars) and quality flags, mark each ``bad'' point with an X. |
The standard annotation includes the camera and image sequence number, the object name, aperture, exposure time, exposure start time, and the current system time.
A more general way to add error bars in either or both the X and Y direction, is to use the program ERRBAR:
ERRBAR,X,Y,DELTAX,DELTAY,psy=psy
X | independent variable, |
Y | dependent variable, |
DELTAX | error estimate for X vector, |
DELTAY | error estimate for Y vector, |
psy | number of IDL plot symbol to use. |
If no values exist for DELTAX, just use a vector of 0's (e.g., errbar,w,f,w*0,error).