Table of contents
CSPICE_EXPOOL queries the kernel pool for the existence of a numeric
kernel variable. The procedure cannot detect the existence of
string valued kernel pool variables.
Given:
name the name of the numeric kernel variable whose existence in the
kernel pool is to be checked.
help, name
STRING = Scalar
the call:
cspice_expool, name, found
returns:
found True whenever the specified variable is included in the pool.
help, found
BOOLEAN = 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) Check for the variables defined in the leapseconds kernel and
a name probably (hopefully) not in the kernel pool.
Use the LSK kernel below as test file to generate the results.
naif0009.tls
Example code begins here.
PRO expool_ex1
;;
;; Load a leapsecond kernel.
;;
cspice_furnsh, 'naif0009.tls'
;;
;; Check for the variables defined in the leapseconds kernel.
;;
lmpoolNames = [ $
"DELTET/DELTA_T_A", $
"DELTET/K", $
"DELTET/EB", $
"DELTET/M", $
"DELTET/DELTA_AT", $
"EVERLASTING_GOBSTOPPER" $
]
for i = 0, n_elements(lmpoolNames)-1 do begin
cspice_expool, lmpoolNames[i], found
if (found) then begin
print, "Found variable name : " + lmpoolNames[i]
endif else begin
print, "Unable to find variable name : " + lmpoolNames[i]
endelse
endfor
END
When this program was executed on a Mac/Intel/IDL8.x/64-bit
platform, the output was:
Found variable name : DELTET/DELTA_T_A
Found variable name : DELTET/K
Found variable name : DELTET/EB
Found variable name : DELTET/M
Found variable name : DELTET/DELTA_AT
Unable to find variable name : EVERLASTING_GOBSTOPPER
This routine determines whether or not a numeric kernel pool
variable exists. It does not detect the existence of
string valued kernel pool variables.
A better routine for determining the existence of numeric kernel
pool variables is the routine cspice_dtpool which determines the
existence, size and type of kernel pool variables.
1) If the input argument `name' is undefined, an error is
signaled by the IDL error handling system.
2) If the input argument `name' is not of the expected type, or
it does not have the expected dimensions and size, an error is
signaled by the Icy interface.
3) If the output argument `found' is not a named variable, an
error is signaled by the Icy interface.
None.
None.
ICY.REQ
KERNEL.REQ
None.
J. Diaz del Rio (ODC Space)
E.D. Wright (JPL)
-Icy Version 1.0.1, 31-MAY-2021 (JDR)
Edited the header to comply with NAIF standard.
Added example's problem statement and a reference to required LSK.
Reformatted example's output.
Extended -Particulars section and updated -Index_Entries to indicate
that the kernel variable is numeric.
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.0, 16-JUN-2003 (EDW)
CONFIRM the existence of a pooled numeric kernel variable
|