Table of contents
CSPICE_EKNSEG returns the integer number of segments in the
EK file identified by the input integer file handle.
Given:
handle the handle of an EK file opened for read access.
help, handle
LONG = Scalar
the call:
eknseg = cspice_eknseg( handle )
returns:
eknseg the number of segments in the EK identified by `handle'.
help, eknseg
LONG = Scalar
None.
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) Find the number of segments on an EK.
Use the EK kernel below as test input file for loading the
experiment database. This kernel contains the Deep
Impact spacecraft sequence data based on the integrated
Predicted Events File covering the whole primary mission.
dif_seq_050112_050729.bes
Example code begins here.
PRO eknseg_ex1
;;
;; Open the file named by `EK1', returning the file handle
;; associated with the open file to the variable named
;; handle.
;;
EK1 = 'dif_seq_050112_050729.bes'
cspice_ekopr, EK1, handle
;;
;; Return the number of segments in `EK1'.
;;
nseg = cspice_eknseg( handle )
print, 'Number of segments = ', nseg
;;
;; SAFELY close the file.
;;
cspice_ekcls, handle
END
When this program was executed on a Mac/Intel/IDL8.x/64-bit
platform, the output was:
Number of segments = 2
This routine is used to support the function of summarizing an
EK file. Given the number of segments in the file, a program
can use cspice_ekssum in a loop to summarize each of them.
1) If `handle' is invalid, an error is signaled by a routine in the
call tree of this routine. cspice_eknseg will return the value zero.
2) If an i/o error occurs while trying to read the EK, the error
is signaled by a routine in the call tree of this routine.
cspice_eknseg will return the value zero.
3) If the input argument `handle' is undefined, an error is
signaled by the IDL error handling system.
4) If the input argument `handle' is not of the expected type, or
it does not have the expected dimensions and size, an error is
signaled by the Icy interface.
See the description of `handle' in -I/O.
None.
ICY.REQ
EK.REQ
None.
J. Diaz del Rio (ODC Space)
E.D. Wright (JPL)
-Icy Version 1.0.3, 10-AUG-2021 (JDR)
Edited the -Examples section to comply with NAIF standard. Added
example's problem statement. Updated code example to use an
existing, PDS archived EK.
Added -Parameters, -Exceptions, -Files, -Restrictions,
-Literature_References and -Author_and_Institution sections, and
completed -Particulars section.
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, 01-FEB-2008 (EDW)
Completed the previously empty -I/O section.
-Icy Version 1.0.1, 09-DEC-2005 (EDW)
Added -Examples section.
-Icy Version 1.0.0, 16-JUN-2003 (EDW)
return number of segments in an E-kernel
|