Table of contents
CSPICE_EKUEF unloads an EK file, making its contents inaccessible to the
EK reader routines, and clearing space in order to allow other
EK files to be loaded.
Given:
handle a scalar integer file handle for an EK file loaded in the kernel
subsystem by cspice_eklef.
help, handle
LONG = Scalar
the call:
cspice_ekuef, handle
unloads from the kernel subsystem the EK file indicated to by
`handle'.
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) Load two EK files and perform a query on them. During query
execution, all files will be searched. Unload the previous
file before each new file is loaded. Unloading files prevents
them from being searched during query execution.
Use the EK kernel below to load the Cassini Science Plan
SPICE E-Kernel File based upon the integrated science
plan #78.
S78_CIMSSSUPa.bep
Use the EK kernel below to load the data based upon the
integrated science plan #79.
S79_CIMSSSUPa.bep
Example code begins here.
PRO ekuef_ex1
;;
;; Set up the array holding the EK file names.
;;
eknams = ['S78_CIMSSSUPa.bep', 'S79_CIMSSSUPa.bep']
;;
;; The EK files contain a table 'CASSINI_SP_OBSERVATION',
;; that contains columns named:
;;
;; NOTES, OBSERVATION_ID, OBSERVATION_TITLE,
;; OBS_DESCRIPTION, SCIENCE_OBJECTIVE, SEQUENCE,
;; SUBSYSTEM
;;
;; Define a set of constraints to perform a query on all
;; loaded EK files (the SELECT clause).
;;
query = 'Select SUBSYSTEM, SCIENCE_OBJECTIVE, OBSERVATION_ID ' + $
'from CASSINI_SP_OBSERVATION order by SUBSYSTEM'
;;
;; Load the EK files. This call could be replaced by a call
;; to cspice_furnsh.
;;
for i=0L, 1L do begin
cspice_eklef, eknams[i], handle
print, format='(2A)', 'Loading EK: ', eknams[i]
;;
;; Query the EK system for data rows matching the
;; SELECT constraints.
;;
cspice_ekfind, query, nmrows, error, errmsg
;;
;; Check whether an error occurred while processing the
;; SELECT clause. If so, output the error message.
;;
if ( error ) then begin
print, format='(2A)', 'SELECT clause error: ', errmsg
endif else begin
;;
;; If no error, `nmrows' contains the number of rows
;; matching the constraints specified in the query
;; string.
;;
print, format='(A,I3)', 'Number of matching rows: ', nmrows
endelse
;;
;; Unload the current file. Unloading files prevents
;; them from being searched during query execution.
;;
cspice_ekuef, handle
print, format='(2A)', 'Unloading EK: ', eknams[i]
print
endfor
END
When this program was executed on a Mac/Intel/IDL8.x/64-bit
platform, the output was:
Loading EK: S78_CIMSSSUPa.bep
Number of matching rows: 4
Unloading EK: S78_CIMSSSUPa.bep
Loading EK: S79_CIMSSSUPa.bep
Number of matching rows: 5
Unloading EK: S79_CIMSSSUPa.bep
This routine removes information about an EK file from the
EK system, freeing space to increase the number of other EK
files that can be loaded. The file is also unloaded from
the DAS system and closed.
1) Unloading a file that is not loaded has no effect.
2) If the input argument `handle' is undefined, an error is
signaled by the IDL error handling system.
3) 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.
This routine unloads a binary EK file from the EK query system.
None.
EK.REQ
ICY.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 complete
code example.
Remove note suggesting the use of cspice_unload instead of this
routine, as it does not hold for all cases.
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 argument's type and size information in the -I/O section.
-Icy Version 1.0.0, 16-JUN-2003 (EDW)
unload EK file
|