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_wncard

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


Abstract


   CSPICE_WNCARD returns the cardinality (current number of intervals)
   of a double precision window.

I/O


   Given:

      window   a 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.

   the call:

      wncard = cspice_wncard( window )

   returns:

      wncard   the cardinality of (number of intervals in) the input window.

               help, wncard
                  LONG = 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) The window cardinality function cspice_wncard is typically used to
      process each of the intervals of a window.

      Given a double precision window, determine its cardinality
      (number of intervals).

      Example code begins here.


      PRO wncard_ex1

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

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

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

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

         endfor

         ;;
         ;; What's the window cardinality of 'win1'?
         ;;
         cardinality = cspice_wncard(win1)

         ;;
         ;; Print the window cardinality (this out to show "3" ).
         ;;
         print, 'Number of intervals in the window: ', cardinality

      END


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


      Number of intervals in the window:            3


Particulars


   This function returns the value of cspice_card(window)/2.

Exceptions


   1)  If the number of elements in `window' is not even, the error
       SPICE(INVALIDSIZE) is signaled by a routine in the call tree
       of this routine.

   2)  If the input argument `window' is undefined, an error is
       signaled by the IDL error handling system.

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

Files


   None.

Restrictions


   None.

Required_Reading


   ICY.REQ
   CELLS.REQ

Literature_References


   None.

Author_and_Institution


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

Version


   -Icy Version 1.0.2, 10-AUG-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.1, 23-SEP-2008 (EDW)

       Eliminated error in English.
       Corrected typo in 'window' -I/O description.

   -Icy Version 1.0.0, 03-DEC-2007 (EDW)

Index_Entries


   cardinality of a d.p. window



Fri Dec 31 18:43:09 2021