Identifier   plotspd

 Purpose      Plots the data of a SPD structure

 Synopsis     plotspd, SPD [,DET=det | ,BAND=band] [,XAXIS=xaxis] [YAXIS=yaxis]
                           [,RANGE=range] [,ITK=itk] [,/MPLOT] [,/OPLOT] 
                           [,PSYM=psym |,/PSYM] [,LINE=line] [,COLOR=color]
                           [,/STATUS |,/FLAG, | ,RESET=reset]  [,SORT=sort]
                           [,/NOBANNER] |,/NOTEMPL] [,/NOERASE]
                           [,/NOOFFSET | OFFSET=offset] [,_extra=e]

 Arguments    Name  I/O Type:       Description:
              ----------------------------------------------------------
              SPD    I  struc       The SPD structure data, which
                                    contains the data to be plotted
              det    I  intarr      Select detector(s) (1..52)
                                    If option det is specified, the option
                                    option band is disabled!
              band   I  integer     Select detectorband (1..6)
                                    All det of the the band is plotted
                                    (option det is disabled):
              xaxis  I  string      Select X-xaxis in units [def='ITK']
                                    ('ITK','WAVE','GRPOS','FPPOS','') 
              yaxis  I  string      Select Y-xaxis in units [def='FLUX']
                                    ('FLUX','ITK','WAVE','GRPOS','FPPOS') 
              range  I  intarr(2)   X-axis INDEX start/end value
                                    [default=whole range]
              itk    I  intarr(2)   ITK range selection
              /mplot I  --          If set, instead of overplot the selected
                                    detectors, or whole band in one plot,
                                    display every detector in a separate plot
              /sort  I  --          Sort the data in 'wave' and 'grpos' mode if
                                    this key is set (default nosort)
              psym   I  intarr      If set, draws a symbol for every datapoint,
                                    symbol is differend for differend det
                                    [default psym=3 (.)]
              line   I  intarr      If set, a linestyle is set 
                                    (0 is solid, 1..5 is dashed)
              color  I  intarr      A specific color can be choosen
                                    (color=0 means color=!p.color)
              /oplot    I  --       If set, a overplot is done
              /status   I  --       Draw STATUS line below the plot
              reset     I  intarr   Colorline definition to show the resets
              /flag     I  --       Draw FLAG line below the plot (if no 
                                    STATUS is defined)
              /all      i  --       Show all data (even /nodata)
              /nobanner I  --       If set No banner is plotted, data plot on 
                                    full x-size of the screen.
              /notempl  I  --       Normaly the SPD is placed on a template
                                    (create a window, with a banner and place
                                    for status/flag information field)
                                    Overrule this function by this option
              /nooffset I  --       Normaly the first x axis datapoint is set 
                                    to 0, this option overrules this
              offset    I  integer  Set the x-axis offset 
              _extra    I  any      Extra plot keyword(s)

 Returns      none

 Description  This routine plots the data of the SPD.
              Additional information is placed in a banner near the plot.

 Comment      - PLOTSPD scales the xaxis using the following equation:
                offset= SPD.DATA(0)
                XAXIS(*)=(SPD.DATA(*) - offset)/24
                  
              - MPLOT option in IDL is only active when !p.region=0
                so for /MPLOT the banner is switched off.

              - For XAXIS='grpos' grpos(0) for band 1,2 and
                                  grpos(1) for band 3,4,5,6

 Example      PLOTSPD, SPD, XAXIS='WAVE', DET=[1,2]
                ;Plots the FLUX against the WAVE axis of the SPD data 

              PLOTSPD,SPD,/STATUS,XAXIS='WAVE',YAXIS='GRANG(1)'

              PLOTSPD,SPD,BAND=2,/MPLOT
                ;Plots all detectors from band 2 in single plots.
                ;12 Single plots are made on the whole screen (no banner).

              PLOTSPD,SPD,DET=22,PSYM=4
              PLOTSPD,SPD,DET=33,PSYM=2,/OPLOT
                ;When a oplot is made the legend gets a extra line which
                ;declares the plotsymbol,line and color for the overplotted 
                ;data

              PLOTSPD,SPD,DET=12,RANGE=[20,-50],XAXIS=''
                ;Plots the data of detector 12 from position 20 till the last 
                ;minus 50 and use no SPD xaxix (used a INDGEN xaxis)

              PLOTSPD,SPD,DET=[1,13,25,37],RANGE=[3,0]
                ;Plots the data of 4 detectors in one plot with differend 
                ;symbols and the first 3 sec SPD data is skipped, this is
                ;needed for the scaling when the data in the first part is not
                ;correct.

              PLOTSPD,SPD,DET=[1,13,25,37],RANGE=[3,0],PSYM=0
                ;Draw the data with a line instead of a symbol
              
              LOADCT,12                  ;Load colortable 12
              PLOTSPD,SPD,DET=[12,22,47],PSYM=4,COLOR=[166,102,36],RANGE=[3,0]
                ;Plot the data for each detector with the same symbol and with
                ;a differend color(red,blue,green)
                ;For information about the rexlation between number and color
                ;use the IDL utility PALETTE.

              PLOTSPD,SPD,YSTYLE=2,TITLE='SPD of file: ITL_MPE_TPF_1A.LTDF"
               ;This example shows the use of the extra standard IDL PLOT key-
               ;words which can be give to the routine PLOTSPD

              PLOT_TEMPLATE,/CREATE                     ;Create a new IA window
              PLOTSPD,SPD,DET=[12,22,47],/NOTEMPLATE
                 ;Plot the figure in a separate window, without any extra space
                 ;for a banner of status- or flag lines.
                 ;The information about color/line/symbol per detector is placed
                 ;in the right upper corner of the plot.

              PLOTSPD,SPD,RESET=[2,3,4,6,8]
                 ;Plot a SPD with the statusline below the plot.
                 ;The resetline in the status plot is a colorline (with 
                 ;differend colors for <2,2,3,4,6,8 and >8 reset time).

              !P.MULTI= [0,1,2]         
              PLOTERD,ERD,RANGE=[320,340],XRANGE=[320,342]
              PLOTSPD,SPD,RANGE=[320,340],XRANGE=[320,342],PSYM=2
              !P.MULTI=0
                 ;Two differend type of plots in separate frames
              
              PLOTERD,ERD,RANGE=[320,340],XRANGE=[320,342]   
              PLOTSPD,SPD,RANGE=[320,340],XRANGE=[320,342],/OPLOT,PSYM=2
                 ;Two differend type of plots in ONE frame

              !P.CHARSIZE=0.8    ;Set for hardcopy smaller character
              START_HARDCOPY
              PLOTSPD,SPD
              STOP_HARDCOPY

              PLOTSPD,SPD,XAXIS='WAVE',ITK=[2000,4000], det=[13,1],/status
                 ;Selection on ITK, display xaxis type 'wave'
                 ;Plot Status line of detector 13 in Wave units

              PLOTSPD,SPD,/FLAG,/STATUS,BAND='1E',DET=[2,4]
                 ;Data selection on band 1e, detector selection 2 and 4 


 Category     PLOT

 Filename     plotspd.pro (module: plotspd)

 Author       N.J.M. Sijm

 Version      5.2

 History      0.0   26-05-94  NS  Creation
              5.0   06-02-96  NS  Impl. AOT band selection /new fill_axis
              5.1   04-07-96  NS  solve XAXIS='GRPOS',XRANGE=[1300,1800]
              5.2   21-11-96  NS  solve spr__s0114