Index Page
cspice_dsksrf
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 

Abstract
I/O
Examples
Particulars
Required Reading
Version
Index_Entries

Abstract


   CSPICE_DSKSRF finds the set of surface ID codes for all surfaces
   associated with a given body in a specified DSK file.

I/O


   Given:

      dsk       SPICE DSK files names.

                [1,c] = size(dsk), char = class(dsk)

                   or

                [1,m] = size(dsk), cell = class(dsk)

      idcode    the SPK ID code of a body for which topographic
                data are present in the specified DSK files.

                [1,1] = size(idcode); int32 = class(idcode)

      room      the maximum number of NAIF IDs to return from 'dsk'.

                [1,1] = size(room), int32 = class(room)

      srfids_i  an optional input describing an array of DSK
                ID codes. Inclusion of this array results in an output
                array consisting of a union of the data retrieved from
                the 'dsk' kernels and the data in 'srfids_i'.

                [n,1] = size(srfids_i), int32 = class(srfids_i)

                   or

                [0,0] = size(srfids_i), int32 = class(srfids_i)

   the call:

      srfids = cspice_dsksrf( dsk, idcode, room, srfids_i )

         or

      srfids = cspice_dsksrf( dsk, idcode, room )

   returns:

      srfids   an array containing the union of `srfids_i'
               and the ID codes of the surfaces associated with the
               body designated by `bodyid', for which segments were
               found in the indicated DSK file.

               [p,1] = size(srfids), int32 = class(srfids)

               The elements of `srfids' are unique; each ID
               code in `srfids' appears only once, even if the DSK
               file contains multiple segments for that ID code.

               See the Examples section below for a complete
               example program showing how to retrieve body and
               surface ID codes from a DSK file.

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.

   Use a simple function to display the DSK IDs found in a DSK or set of
   DSKs, and the time coverage of the data corresponding to those IDs.

   Example (1):

      Examine a DSK file and identify the set of
      central bodies associated with the segments
      in the file. For each body, find the
      set of surfaces associated with that body.

      function dsksrf_t(DSK)

            MAXID  = 1000;

            %
            % Find the set of objects in the DSK file.
            %
            bodids = cspice_dskobj( DSK, MAXID );

            for i=1:numel(bodids)

               fprintf('Body ID:     %d\n'  , bodids(i) )

               %
               % Get the surface IDs for the Ith body.
               %
               srfids = cspice_dsksrf( DSK, bodids(i), MAXID );

               for j=1:numel(srfids)

                  fprintf('   Surface ID:  %d\n'  , srfids(j) )

               end

            end

   Matlab outputs:

     >> dsksrf_t( 'hay_a_amica_5_itokawashape_v1_0_64q.bds' )
     Body ID:     2025143
        Surface ID:  2025143

     The output lists the SPK IDs in the DSK and the surface IDs.

   Example (2):

   Matlab outputs:

     Assign a DSK kernel list as:

     >> dsk= { 'hay_a_amica_5_itokawashape_v1_0_64q.bds',  ...
             'megr90n000eb_LL000E00N_UR090E90N_plate.bds', ...
             'megr90n000eb_LL000E90S_UR090E00S_plate.bds', ...
             'megr90n000eb_LL090E00N_UR180E90N_plate.bds', ...
             'megr90n000eb_LL090E90S_UR180E00S_plate.bds', ...
             'megr90n000eb_LL180E00N_UR270E90N_plate.bds', ...
             'megr90n000eb_LL180E90S_UR270E00S_plate.bds', ...
             'megr90n000eb_LL270E00N_UR360E90N_plate.bds', ...
             'megr90n000eb_LL270E90S_UR360E00S_plate.bds', ...
             'phobos_3_3.bds' };

     >> dsksrf_t(dsk)
     Body ID:     401
        Surface ID:  401
     Body ID:     499
        Surface ID:  499001
     Body ID:     2025143
        Surface ID:  2025143

     The output lists all SPK IDs in the DSK set and all corresponding
     surface IDs.

Particulars


   This routine provides an API via which applications can determine
   the set of surfaces associated with a given body in a specified
   DSK file. This routine is normally used together with cspice_dskobj.

Required Reading


   For important details concerning this module's function, please refer to
   the CSPICE routine dsksrf_c.

   MICE.REQ
   DSK.REQ
   DAS.REQ
   SETS.REQ
   NAIF_IDS.REQ

Version


   -Mice Version 1.0.0, 18-FEB-2016, EDW (JPL), NJB (JPL)

Index_Entries


   get coverage window for dsk object


Wed Apr  5 18:00:31 2017