Identifier disp_aar Purpose Plot an Auto Analysis Structure (SAAR, LAAR, YAAR) Synopsis disp_aar, aar [, stat] [,plotmode] [,band] [,det] [,scnt] [,sdir] [,line] [,symbols] [,colors] [,xrange] [,yrange] [,psym] [,linstyle] [,plotfile] [,/errbar] [,/firstdet] [,/logflux] [,/nolegend] [,_extra=...]) Arguments Name I/O Type Description ;------------------------------------------------------- ------------ aar I AAR Input SAAR/LAAR/YAAR structure stat O int Error status : 1 for fatal, 0 otherwise plotmode I string Specify the type or mode of plotting. Options: 'stamps' (thumbnails) 'symbols' (up to 12 [user-defined]) 'colors' (up to 12) Default='colors'. band I int scalar/ Select one band (scalar) or array many (array). Example: band=[1,2]. Default is to plot all bands. Illegal option for LAAR. det I int scalar/ Select one detector (scalar) array or many (array). Example: det=[3,14,22]. NOTE: SWS detectors range 1-52; LWS detectors range 0-9. Default is to plot all detectors. scnt I int scalar/ Select one or more scan (scnt). array Range is 0 (first scan) to N. Default it to plot all scans. sdir I int scalar/ Select a scan direction. array SWS: sdir=-1 (down) sdir= 0 (TBD) sdir= 1 (up) LWS: sdir= 0 (down) sdir= 1 (up) Default it to plot all scandir's. line I int scalar/ Plot one or more specific lines. array The tag aar.data.line is used to select data for specific line(s). Default: plot all values of line. The available symbols are TBD: colors I int scalar/ 1 Scalar or array of color(s) to plot. array With plotmode='colors', this option can be used to match specific colors to data subsets specified via the det, scnt, or sdir option. This has the effect of overriding the 12 default color codes which are assigned in order as follows: 1=red 2=pink 3=white 4=cyan1 5=blue 6=grey 7=red1 8=red2 9=green1 10=green2 11=purple 12=cyan2 Default: colors=[1,2,3,4,...12]. symbols I int scalar/ Scalar or array of symbol(s) to plot. array With plotmode='symbols', this option can be used to match specific symbols to data subsets specified via the det, scnt, or sdir option. This has the effect of overriding the 12 default symbol codes which are assigned in order as follows: 1=plus 2=dot 3=square 4=diamond 5=circle 6=down-tri. 7=up-tri. 8=star 9=v-bowtie 10=h-bowtie 11=hexigon 12=hex + x Default: symbols=[1,2,3,4,...12]. xrange I fltarr(2) User defined X scale yrange I fltarr(2) User defined Y scale psym I integer User defined plotting symbol linstyle I integer User defined plotting line style plotfile I string Send the plot to a PostScript file instead of device 'x'. /errbar I switch Plot aar.data.stdev as error bars. /firstdet I switch Plot only 1st detector in each band; this is short-hand for option det=[1,13,25,37,49,51]. (SAAR only.) /logflux I switch Plot log10(flux) instead of linear scale /nolegend I switch Do not draw plot legend, and expand the plot to fill up the plot region. _extra I any Extra keywords to pass to plot/oplot (e.g., xrange,yrange, /line, etc.). Returns None Description Plot the input AAR aarture in various modes to summarize the data contents efficiently. Flux (density) versus wavelength (or frequancy or wavenumber) will be plotted depending on the units in the header keywords TUNIT1 (wave) and TUNIT2 (flux). Data subsets can be identified using different colors (plotmode='colors') [default] or symbols (plotmode='symbols'), or they can be plotted individually using plotmode='stamps' (e.g., "postage stamps", or "thumbnails"). Comments 0) This is a revised routine which combines the "best of" IA3's original PLOT_AAR (N.J.M Sijm), a preliminary plotting routine for LWS AARs (E. Sturm), and preliminary PLOT_AAR ("thumbnails") and PLOT_BAND routines for SWS AARs (Iffat Khan). 1) IDL'S "_extra" is used to pass additional plot options to plot and oplot. This allows, for example, specification of xrange,yrange, linestyle,psym, etc. User beware: This may mess up "nice" plotting otherwise done by default! The "_extra=e" keyword mechanism is used internally to pass additional options to PLOT and OPLOT from the command-line call to DISP_AAR. See the section "Keyword Inheritence" in the IDL User's Manual. 2) Autoscaling: A pass is made through the data to find the minimum and maximum X and Y values required to display all datapoints for plot modes that display all data in a single plot window (plotmode=symbols or plotmode=colors). 3) A legend/legend on the side of the plot indicates which symbol or color specifies which detector, band, or scan. Also, the name of the input AAR and the AOT is displayed. This can be omitted with option /nolegend. 4) WAVE_FORM and SPECT_FORM can convert AAR units. Therefore, there is no need for this routine to do unit conversions. Use get_fits_key to get the values of TUNIT1 (wave) and TUNIT2 (flux) and use these units strings to label the plot axes. 5) NOTE: Real data in the new SAAR aarture *will* contain valid line numbers in the saar.data.line tag, as for LWS. For testing purposes, fudge in line numbers [1,2,3,4,5,6] for regions in test file EE2_AOT2_2 (4, 8, 14, 17, 32, 41 um lines). These are easily seen using an initial call to DISP_AAR such as: idl>disp_aar,ee2_aot2_2,plotmode='stamps' Examples idl>disp_aar, saar01 For the input SWS01 AAR, plot all bands in a single plot on the X Window plot device, using a different color for each detector. Uses defaults: (plotmode='colors'; psym=3 [small dots]). idl>disp_aar, saar01, plotmode='symbols' As above, but use a different (internally defined) symbol for each of the 12 detectors. idl>disp_aar, saar01, plotmode='stamps' Plot all individual detectors for all bands and scans in separate "postage stamp", or "thumbnail" plots. Use the default symbol (psym=3) and linestyle (none). idl>disp_aar, saar01, plotmode='stamps', linsytle=0 Use linstyle=0 (solid) to connect points. idl>disp_aar, saar01, plotmode='stamps', psym=10 Use psym=10 (stair-step) to connect points. idl>disp_aar, saar01, det=[13,18], plotmode='symbols',$ symbols=[4,5] Plot only detectors 13 & 18 using symbols 4 (diamond) and 5 (triangles), without a line connecting the points. idl>disp_aar, saar01, det=[13,28], plotmode='symbols',$ symbols=[4,5], linstyle= 0 Same as above, adding a solid line to connect the points. idl>disp_aar, saar02, line=2 Plot only line 2 data (e.g., a 14 um region) from an SWS02 AAR. Each detector is plotted as a different color with psym=3, all in the same window (default mode). idl>disp_aar, saar02, line=[1,2,3,4], plotmode=stamps Make separate "postage stamp" plots for each of the four lines in an SWS02 AOT for all relevant detectors. idl>disp_aar, saar02, line=[1,2], plotmode=stamps, /firstdet Similar to above, but using only data from the first detector for each line scan. idl>disp_aar, saar02, line=3, plotmode='stamps', /errbar,psym=6 Plot only line 3 data (e.g., a 17 um region) from an SWS02 AOT. Each detector is plotted separately in its own "postage stamp = thumbnail" plot using psym=6 (square) and plotting error bars using the stdev values. idl>disp_aar, saar01, /firstdet, /errbar Plot only the first detector (1,13,25,37) in each band for an SWS02 AOT. Each detector is plotted using a different color, along with error bars. idl>disp_aar, laar02, scnt=2, plotmode='stamps' Plot only scan 2 data for an LWS02 AOT, with each detector's data in a separate "postage stamp" plot. idl>disp_aar, saar02, sdir=1 Plot only "up scans". Dependencies CALLS: band_2_det, get_hdrkey, kwd_notset, oploterr, ploterr, plot_legend, sap_error, sap_keyword_set, set_usersym, shrink_array CALLED FROM: IA, GUI Category ISAP Filename disp_aar.pro Author Iffat Khan (irk) Version 1.1 History 11-Oct-95 Definition of requirements; J. Mazz, E. Sturm, D. Lutz This is a revised routine which combines the "best of" IA3's original PLOT_AAR (N.J.M Sijm), a preliminary plotting routine for LWS AARs (E. Sturm), and preliminary PLOT_AAR (thumbnails) and PLOT_BAND routines for SWS AARs (Iffat Khan). Look in these routines for their early histories (not repeated here). 0.1 12-Oct-95 preliminary design and coding --> irk 0.2 13-Oct-95 revised code --> irk 16-Oct-95 revised/cleaned specs --> mazz (but did not touch code!) 0.3 16-Oct-95 revised code --> irk 18-Oct-95 Extensive testing of v 0.3 --> mazz@mpe via 'testplot.pro' 0.4 18-Oct-95 revised code --> irk 0.5 19-Oct-95 revised code to includ --> irk legends/legends on the plot 20-Oct-95 Extensive testing of v 0.5 --> mazz@mpe via 'testplot.pro' 0.6 25-Oct-95 revised code --> irk 0.7 26-Oct-95 revised code (use SAP-ERROR) --> irk 0.8 08-Nov-95 revised code (use KWD_NOTSET) --> irk change name newplotaar --> disp_aar 0.9 10-Nov-95 revised "Dependencies" in header --> irk 0.9 21-Nov-95 revised code after a minor correction --> irk 1.0 28-Nov-95 implement YAAAR plotting --> irk 1.0 30-Nov-95 improved plot labelling --> irk 1.1 29-Jan-96 avoid call to plot_template (added a few extra lines of code). Replaced read_fits_key with get_hdrkey --> E. Sturm (MPE) 1.1 22-Feb-96 add "comm = ' '" to declare "comm" as string 1.1 15-Aug-96 add "stat=stat" to define error status