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_kinfo

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


Abstract


   CSPICE_KINFO returns information on a loaded kernel specified
   by name.

I/O


   Given:

      file   the scalar string path name for the kernel of interest

   the call:

      cspice_kinfo, file, filtyp, srcfil, handle, found

   returns:

      filtyp   the type name of the kernel specified by 'file'.

               help, filtyp
                  STRING = Scalar

               help, file
                  STRING = Scalar

               'filtyp' will be empty if file is not on the list of kernels
               loaded via cspice_furnsh.


      srcfil   the name of the source file used to specify `file' as one to
               load.

               help, srcfil
                  STRING = Scalar

               If `file' was loaded directly via a call to cspice_furnsh,
               `srcfil' will be empty. If file is not on the list of kernels
               loaded via cspice_furnsh, `srcfil' will be empty.

      handle   the integer handle attached to `file' if it is a binary kernel.

               help, handle
                  LONG = Scalar

               If `file' is a text kernel or meta-text kernel handle will be
               zero. If `file' is not on the list of kernels loaded via
               cspice_furnsh, `handle' has value zero.

      found    returns true if the specified file exists.

               help, found
                  BOOLEAN = Scalar

               If there is no such file, `found' will be set to false.

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) Load a meta-kernel listing a path to an SPK file, and verify
      that the kernel system loaded the SPK file of interest.

      Use the meta-kernel shown below to load the required SPICE
      kernels.


         KPL/MK

         File name: kinfo_ex1.tm

         This meta-kernel is intended to support operation of SPICE
         example programs. The kernels shown here should not be
         assumed to contain adequate or correct versions of data
         required by SPICE-based user applications.

         In order for an application to use this meta-kernel, the
         kernels referenced here must be present in the user's
         current working directory.

         The names and contents of the kernels referenced
         by this meta-kernel are as follows:

            File name                     Contents
            ---------                     --------
            de421.bsp                     Planetary ephemeris


         \begindata

            KERNELS_TO_LOAD = ( 'de421.bsp' )

         \begintext

         End of meta-kernel


      Example code begins here.


      PRO kinfo_ex1

         ;;
         ;; Load a meta kernel listing a path to an SPK file.
         ;;
         cspice_furnsh, 'kinfo_ex1.tm'

         ;;
         ;; Use cspice_kinfo to ensure the kernel system loaded
         ;; the SPK file of interest.
         ;;
         file = 'de421.bsp'

         cspice_kinfo, file, filtyp, srcfil, handle, found

         ;;
         ;; Take appropriate action depending on the returned
         ;; state of found. If found has value false, then
         ;; file is not loaded.
         ;;
         if ( found ) then begin
            print, 'File type: ', filtyp
            print, 'Source   : ', srcfil
         endif

         ;;
         ;; It's always good form to unload kernels after use,
         ;; particularly in IDL due to data persistence.
         ;;
         cspice_kclear

      END


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


      File type: SPK
      Source   : kinfo_ex1.tm


Particulars


   This routine allows you to request information directly
   for a specific SPICE kernel.

Exceptions


   1)  If the specified file is not on the list of files that
       are currently loaded via the interface cspice_furnsh, `found'
       will be False, `handle' will be set to zero and `filtyp'
       and `srcfil' will be set to blanks.

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

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

   4)  If any of the output arguments, `filtyp', `srcfil', `handle'
       or `found', is not a named variable, an error is signaled by
       the Icy interface.

Files


   None.

Restrictions


   None.

Required_Reading


   ICY.REQ
   DSK.REQ
   KERNEL.REQ

Literature_References


   None.

Author_and_Institution


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

Version


   -Icy Version 1.1.0, 10-AUG-2021 (JDR)

       Changed the output argument name "source" to "srcfil" for
       consistency with other routines.

       Edited the -Examples section to comply with NAIF standard. Added
       example's problem statement and meta-kernel. Added cspice_kclear
       to example.

       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.0, 16-JUN-2003 (EDW)

Index_Entries


   Fetch information about a loaded SPICE kernel



Fri Dec 31 18:43:05 2021