This page was created by the IDL library routine `mk_html_help2`.

Last modified: Mon Aug 25 17:03:11 2025.

# Directory Listing of Routines

# spedas_gui/display

- SPD_UI_DRAW_EVENT
  This routine handles all events that occur in the draw window
- SPD_UI_DRAW_OBJECT
  This object generates an object graphics tree using the IDLgr* objects that are built
- SPD_UI_DRAW_SAVE
- SPD_UI_MAKE_SPEC
- SPD_UI_ORIENTATION_UPDATE
- SPD_UI_XYCLIP
- SPD_UI_XYZCLIP

# Routine Descriptions

## SPD_UI_DRAW_EVENT

[Next Routine] [List of Routines]

    NAME:
     spd_ui_draw_event

    PURPOSE:
     This routine handles all events that occur in the draw window

    CALLING SEQUENCE:
     info=spd_ui_draw_event(event, info)

    INPUT:
     event - the structure from the draw window event
     info - the main information structure from splash_gui

    OUTPUT:
     info - the updated main information structure

    HISTORY:

    $LastChangedBy: jimm $
    $LastChangedDate: 2014-02-11 10:54:32 -0800 (Tue, 11 Feb 2014) $
    $LastChangedRevision: 14326 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/spedas_gui/display/spd_ui_draw_event.pro $

(See spedas_gui/display/spd_ui_draw_event.pro)

## SPD_UI_DRAW_OBJECT

[Previous Routine] [Next Routine] [List of Routines]

    NAME:
     spd_ui_draw_object

    PURPOSE:
     This object generates an object graphics tree using the IDLgr* objects that are built
     into IDL.  It generates this tree by querying the loaded data object and the window storage
     object to get the settings generated by the panel.  This object also performs other utility
     operations related to drawing.  These include animations of vertical bars and markers, updating
     the legend by performing a lookup in a hashed version of the plotted data, and reporting information
     about the current display.(Cursor segment selected,  range of displayed data, etc...)

     There are a few major functions in this object.
     #1 'update': will update the draw area to correspond to new settings
     #2 'setCursor' : actually makes the draw object do all the animation updates
     #3 'draw' : use it to force the object to redraw the draw area.\
     #4 'getInfo(panelIndex)' : get a struct with information about a panel in the currently drawn display
                                This includes information like the actual range and scaling for each axis, the number of tics, etc...

    NOTES:

     1. In almost all cases ranges will be stored and passed around as 2-element arrays.
        If they are on log scaled axis, the ranges will be in log space, this tends to make some calculations simpler(and others more complex)
        By log space, I mean, if scaling eq 1 then range = alog10(normalRange), if scaling eq 2 then range = alog(normalRange)

     2. The codes used for different scaling values are consistent.  0 indicates linear scaling, 1 indicates base 10 logarithm, 2 indicates natural logarithm

     3. Positions in this code are generally specified in one of three different coordinate systems.
        a.  They are normalized to the draw area.  So [.5,.5] is the center of the draw area.
        b.  They are normalized to the panel.  So [.5,.5] is the center of a panel.
        c.  They are specified in pixels.  Often when pixels are used, the value used may actually be 2x or 4x the actual number of screen pixels to prevent aliasing.

        Somewhat ambiguously, c. is sometimes called points(because it is a scaled number of pixels).  This is not the same as the measurement in note 5.

        Rectangles(like panels) will normally be specified using two variables, which are each 2 element doubles.
        xpos = [xstart,xstop],  ypos = [ystart,stop]  These are absolute locations.
        The alternative representation [xstart,xsize],[ystart,ysize], is rarely, if ever, used as a parameter,
        although sizes are used for various computations throughout the code.

     4. distances that aren't specified in the above coordinates are often specified in pts.
        This is a desktop publishing standard, that ideally is consistent across output devices.  1 pt should be 127/360 mm.
        The goal is to make all output consistent across output devices.

    $LastChangedBy: jimm $
    $LastChangedDate: 2014-02-11 10:54:32 -0800 (Tue, 11 Feb 2014) $
    $LastChangedRevision: 14326 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/spedas_gui/display/spd_ui_draw_object__define.pro $

(See spedas_gui/display/spd_ui_draw_object__define.pro)

## SPD_UI_DRAW_SAVE

[Previous Routine] [Next Routine] [List of Routines]

    NAME:
      spd_ui_draw_save

    Purpose:
       Outputs current window content into various formats

    $LastChangedBy: jimm $
    $LastChangedDate: 2014-02-11 10:54:32 -0800 (Tue, 11 Feb 2014) $
    $LastChangedRevision: 14326 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/spedas_gui/display/spd_ui_draw_save__define.pro $

(See spedas_gui/display/spd_ui_draw_save__define.pro)

## SPD_UI_MAKE_SPEC

[Previous Routine] [Next Routine] [List of Routines]

     Function: spd_ui_make_spec

     NOTE: This code has been incorporated into the draw object.
     spd_ui_make_spec is no longer called directly

    Purpose:
      helper routine for draw object.  It helps construct the image for spectrograms
      very quickly.

    Inputs:
      x: the 1-d x scaling values for the z components(x-axis)
      y: the 1-d y scaling values for the z components
      z: the 2-d z array of values for the image
      pixx: the desired resolution of the output on the x-axis
      pixy: the desired resolution of the output on the y-axis
      palette: the palette number to be used when creating the image
      zrange: the zrange for the whole panel(may be larger than the range of the z argument)

    Output:
       An rgba image with dimensions: 4 x PixX x PixY

       Notes:
       1. This uses an alpha channel to make all NaNs transparent.
       2. PixX and PixY are not totally necessary because object graphics can
          stretch an image quite well, but selecting the resolution of the screen
          with them prevents any inadvertent errors from showing up during interpolation.
          It might actually be better to render the image at twice the screen resolution
          to prevent aliasing errors.

    $LastChangedBy: jimm $
    $LastChangedDate: 2014-02-11 10:54:32 -0800 (Tue, 11 Feb 2014) $
    $LastChangedRevision: 14326 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/spedas_gui/display/spd_ui_make_spec.pro $

(See spedas_gui/display/spd_ui_make_spec.pro)

## SPD_UI_ORIENTATION_UPDATE

[Previous Routine] [Next Routine] [List of Routines]

    Purpose:
      helper function, just colocates some replicated code to modify the
      canvas size if there is variation when windows or modes are switched.

    $LastChangedBy: jimm $
    $LastChangedDate: 2014-02-11 10:54:32 -0800 (Tue, 11 Feb 2014) $
    $LastChangedRevision: 14326 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/spedas_gui/display/spd_ui_orientation_update.pro $

(See spedas_gui/display/spd_ui_orientation_update.pro)

## SPD_UI_XYCLIP

[Previous Routine] [Next Routine] [List of Routines]

    Procedure: spd_ui_xyclip

    ; NOTE: This code has been incorporated into the draw object.
     spd_ui_xyclip is no longer called directly

    Purpose:
      helper routine for draw object.  It performs some processing
      on the x,y,z trace inputs

    Inputs:
      onePtr: the values being clipped
      twoPtr: the axis for which paired values must also be removed
      zPtr: the z for spectral plots
      range: the range for the clipping
      scale: the scaling for the axis(0:linear,1:log10,2:logN)

    Keywords: fail: 1: indicates that the routine failed

              transposez: if this keyword is set, then one is a y-axis not an x-axis

    Notes:
      Scales & Clips the x,y axes. Mutates onePtr,twoPtr,zPtr

    $LastChangedBy: jimm $
    $LastChangedDate: 2014-02-11 10:54:32 -0800 (Tue, 11 Feb 2014) $
    $LastChangedRevision: 14326 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/spedas_gui/display/spd_ui_xyclip.pro $

(See spedas_gui/display/spd_ui_xyclip.pro)

## SPD_UI_XYZCLIP

[Previous Routine] [List of Routines]

    Procedure: spd_ui_xyclip

    Purpose:
      helper routine for draw object.  It performs some processing
      on the z trace inputs

    Inputs:
      zptr: array of ptrs to z values for this trace(2-d array)
      zrange: the range for the z-axis on this panel
      zscale: scaling for z-axis(0:linear,1:log10,2:logN)

    Keywords: fail: 1: indicates that the routine failed

    Notes:
      Scales & Clips the axes and the z-plot correspondingly
      Mutates Zptr

    $LastChangedBy: jimm $
    $LastChangedDate: 2014-02-11 10:54:32 -0800 (Tue, 11 Feb 2014) $
    $LastChangedRevision: 14326 $
    $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/spedas_gui/display/spd_ui_xyzclip.pro $

(See spedas_gui/display/spd_ui_xyzclip.pro)