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

Table of contents
Abstract
I/O
Parameters
Examples
Particulars
Exceptions
Files
Restrictions
Required_Reading
Literature_References
Author_and_Institution
Version
Index_Entries


Abstract


   CSPICE_WNFETD fetches a particular interval from
   a double precision window.

I/O


   Given:

      window   the scalar window containing zero or more intervals.

               help, window
                  STRUCT = cspice_celld(2*N)

               'window' must be created as a window structure via a
               cspice_celld call.

      n        the scalar integer index of a particular interval within
               'window'.

               help, n
                  LONG = Scalar

               Indices range from 0 to N-1, where N is the number of intervals
               in the window.

   the call:

      cspice_wnfetd, window, n, left, right

   returns:

      left,
      right    the scalar, double precision left and right endpoints of the 'n'
               interval in the input 'window'.

               help, left
                  DOUBLE = Scalar
               help, right
                  DOUBLE = Scalar

Parameters


   None.

Examples


   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.

   1) Given a SPICE window of cardinality 6, fetch the left and right
      endpoints of each of its 3 interval intervals.

      Example code begins here.


      PRO wnfetd_ex1

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

         ;;
         ;; Define a window with three intervals.
         ;;
         darray = [ [ 1.d, 3.0], [ 7.0, 11.0], [23.0, 27.0] ]

         ;;
         ;; Add the window data to the cell.
         ;;
         for i=0,2 do begin

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

         endfor

         ;;
         ;; Calculate the number of intervals in the
         ;; return window 'win1'.
         ;;
         no_intervals = cspice_wncard(win1)

         ;;
         ;; Output the intervals.
         ;;
         print, "Window contents:"
         for i= 0, (no_intervals -1 ) do begin

            cspice_wnfetd, win1, i, left, right
            print, left, right

         endfor

      END


      When this program was executed on a Mac/Intel/IDL8.x/64-bit
      platform, the output was:


      Window contents:
             1.0000000       3.0000000
             7.0000000       11.000000
             23.000000       27.000000


Particulars


   The user must create any needed window structures with
   cspice_celld prior to use regardless of whether the routine
   uses the window as input or returns it as output.

Exceptions


   1)  If `n' is less than one, the error SPICE(NOINTERVAL) is
       signaled by a routine in the call tree of this routine.

   2)  If the interval does not exist, i.e. n > cspice_card(window)/2, the
       error SPICE(NOINTERVAL) is signaled by a routine in the call
       tree of this routine.

   3)  The cardinality of the input `window' must be even. Left
       endpoints of stored intervals must be strictly greater than
       preceding right endpoints. Right endpoints must be greater
       than or equal to corresponding left endpoints. Invalid window
       data are not diagnosed by this routine and may lead to
       unpredictable results.

   4)  If any of the input arguments, `window' or `n', is undefined,
       an error is signaled by the IDL error handling system.

   5)  If any of the input arguments, `window' or `n', is not of the
       expected type, or it does not have the expected dimensions and
       size, an error is signaled by the Icy interface.

   6)  If any of the output arguments, `left' or `right', is not a
       named variable, an error is signaled by the Icy interface.

Files


   None.

Restrictions


   None.

Required_Reading


   ICY.REQ
   CELLS.REQ
   WINDOWS.REQ

Literature_References


   None.

Author_and_Institution


   J. Diaz del Rio     (ODC Space)
   E.D. Wright         (JPL)

Version


   -Icy Version 1.0.3, 17-JUN-2021 (JDR)

       Edited the header to comply with NAIF standard. Added
       example's problem statement.

       Added -Parameters, -Exceptions, -Files, -Restrictions,
       -Literature_References and -Author_and_Institution sections.

       Removed reference to the routine's corresponding CSPICE header from
       -Abstract section.

       Added arguments' type and size information in the -I/O section.

   -Icy Version 1.0.2, 26-NOV-2007 (EDW)

       Implemented use of cspice_wncard function to return
       window cardinality.

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

       Correct Required Reading citation cell.req to cells.req.

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

Index_Entries


   fetch an interval from a d.p. window



Fri Dec 31 18:43:09 2021