Index Page
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 

Required Reading


   CSPICE_WNSUMD summarizes the contents of a double precision window. 

   For important details concerning this module's function, please refer to
   the CSPICE routine wnsumd_c.



      window   the scalar SPICE window containing zero or more intervals.

               You must create 'window' as a window structure via a 
               cspice_celld call. 
   the call:

      cspice_wnsumd, window, meas, avg, stddev, shortest, longest


      meas        the double precision scalar total measure of 
                  the intervals in the input  window. This is just 
                  the sum of the measures of the individual intervals. 
      avg         the double precision scalar average measure
                  of the intervals in the input window. 

      stddev      the double precision scalar standard deviation
                  of the measures of the intervals in the input window. 

      longest     the integer scalar indices of the left endpoint
                  of, respectively, the shortest and longest intervals 
                  in the data contained in 'window'.
                     The following algorithm describes the relation of
                     'shortest' and 'longest' to the window data:
                        data_start =
                        data_end   = data_start + window.card - 1

                        array = window.base[ data_start:data_end]

                     The shortest interval:

                        [ array[shortest], array[shortest+1] ]

                     The longest interval:             

                        [ array[longest], array[longest+1] ]


   Any numerical results shown for this example may differ between
   platforms as the results depend on the SPICE kernels used as input
   and the machine specific arithmetic implementation.

      ;; Create a cell containing a double precision 12-vector.
      win1 = cspice_celld( 12 )

      ;; Define an array representing a window with six intervals. 
      ;; The values in 'darray' have correct order for a 
      ;; SPICE window.
      darray = [ [ 1.d,  3.], $
                 [  7., 11.], $
                 [ 18., 18.], $
                 [ 23., 27.], $
                 [ 30., 69.], $
                 [ 72., 80.] ]

      ;; Add the 'darray' data to the cell.
      count = size( darray, /n_elements)/2l

      for i=0l, count -1 do begin

         cspice_wninsd, darray[0,i], darray[1,i], win1


      ;; Calculate the summary for 'win1'.
      cspice_wnsumd, win1,    $
                     meas,    $
                     avg,     $
                     stddev,  $

      ;; 'shortest' and 'longest' refer to the indices of
      ;; the 'cell' data array.

      intrvl_short= shortest/2l 
      intrvl_long = longest/2l

      print, 'Measure           : ', meas
      print, 'Average           : ', avg
      print, 'Standard Dev      : ', stddev
      print, 'Index shortest    : ', shortest
      print, 'Index longest     : ', longest
      print, 'Interval shortest : ', intrvl_short
      print, 'Interval longest  : ', intrvl_long 

      data_start =
      data_end   = data_start + win1.card - 1
      array      = win1.base[ data_start:data_end]

      print, 'Shortest interval : ', [ array[shortest], array[shortest+1] ]
      print, 'Longest interval  : ', [ array[longest],  array[longest+1]  ]
   IDL outputs:

      Measure           :        57.000000
      Average           :        9.5000000
      Standard Dev      :        13.413302
      Index shortest    :            4
      Index longest     :            8
      Interval shortest :            2
      Interval longest  :            4
      Shortest interval :        18.000000       18.000000
      Longest interval  :        30.000000       69.000000


   This routine provides a summary of the input window, consisting 
   of the following items: 

      - The measure of the window. 

      - The average and standard deviation of the measures 
        of the individual intervals in the window. 

      - The indices of the left endpoints of the shortest 
        and longest intervals in the window. 

   All of these quantities are zero if the window contains no

Required Reading



   -Icy Version 1.0.1, 04-DEC-2008, EDW (JPL)

      Edited header to add information to the argument descriptions and
      the code example.

   -Icy Version 1.0.1, 12-SEP-2006, EDW (JPL)

      Correct Required Reading citation CELL.REQ to CELLS.REQ.

   -Icy Version 1.0.0, 08-AUG-2004, EDW (JPL)


   summary of a d.p. window 

Wed Apr  5 17:58:05 2017