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_ekgd

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


Abstract


   CSPICE_EKGD returns an element of double precision data from a
   specified row in a specified column of the set of rows matching
   the previous cspice_ekfind SELECT query.

I/O


   Given:

      selidx   the scalar integer index for a column of interest satisfying the
               SELECT clause, the column indices range from 0 to N-1 where N
               equals the total number of columns satisfying the SELECT clause.

               help, selidx
                  LONG = Scalar

      row      the scalar integer index for a row in the column identified by
               `selidx', the column indices range from 0 to M-1 where M equals
               the total number of rows satisfying the SELECT clause.

               help, row
                  LONG = Scalar

      elment   the scalar integer index for a element of the data at the
               (selidx, row) position; a scalar value at `selidx', `row' has
               `elment' value zero.

               help, elment
                  LONG = Scalar

   the call:

      cspice_ekgd, selidx, row, elment, ddata, null, found

   returns:

      ddata    the scalar double value of the requested element at data
               location (selidx, row, elment).

               help, ddata
                  DOUBLE = Scalar

      null     a scalar boolean indicating if the `ddata' has a null value.

               help, null
                  BOOLEAN = Scalar

      found    a scalar boolean indicating whether the specified value at
               (selidx, row, elment) was found.

               help, found
                  BOOLEAN = Scalar

Parameters


   None.

Examples


   Any numerical results shown for these examples may differ between
   platforms as the results depend on the SPICE kernels used as input
   and the machine specific arithmetic implementation.

   1) Perform a query on an EK file that contains a database with
      the Supplementary Engineering Data Records of the Viking
      Project in order to retrieve the PLATFORM_CLOCK values (double
      precision) that correspond to the images with IMAGE_NUMBER
      smaller than a given value, ordered by IMAGE_NUMBER.


      Use the EK kernel below to load the information from the
      original Supplementary Engineering Data Record (SEDR) data
      set generated by the Viking Project.

         vo_sedr.bdb


      Example code begins here.


      PRO ekgd_ex1

         ;;
         ;; Local parameters
         ;;
         EKNAME = 'vo_sedr.bdb'

         ;;
         ;; Open an EK file.
         ;;
         cspice_furnsh, EKNAME

         ;;
         ;; The table 'VIKING_SEDR_DATA' has a column
         ;; 'PLATFORM_CLOCK' of double precision values.
         ;;
         ;; Define a set of constraints to perform a query on
         ;; all loaded EK files (the SELECT clause). In this
         ;; case select the column 'PLATFORM_CLOCK' from table
         ;; 'VIKING_SEDR_DATA' sorted by 'IMAGE_NUMBER'.
         ;;
         query = 'Select PLATFORM_CLOCK from VIKING_SEDR_DATA ' +            $
                 ' where image_number < 25860000 order by IMAGE_NUMBER'

         ;;
         ;; 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, 'SELECT clause error: ', errmsg

         endif else begin

            ;;
            ;; Fetch the character data. We know the query returned
            ;; one column and the column contains only scalar data,
            ;; so the index of all elements is 0.
            ;;
            selidx = 0
            eltidx = 0

            ;;
            ;; Loop over each row found matching the query.
            ;;
            for rowno=0, nmrows-1L do begin

               print, format='(A,I3,A,$)', 'Row ', rowno,                    $
                                           ': Double precision data: '

               ;;
               ;; Use cspice_ekgd to retrieve the string from
               ;;
               cspice_ekgd, selidx, rowno, eltidx, ddata, isnull, found

               if ( isnull ) then begin
                  print, '<Null>'
               endif else begin
                  print, format='(F10.6)', ddata
               endelse

            endfor

         endelse

         ;;
         ;; 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:


      Row   0: Double precision data: 119.880000
      Row   1: Double precision data: 119.270000
      Row   2: Double precision data: 119.880000
      Row   3: Double precision data: 119.270000
      Row   4: Double precision data: 119.880000
      Row   5: Double precision data: 119.270000
      Row   6: Double precision data: 120.140000
      Row   7: Double precision data: 119.520000
      Row   8: Double precision data: 120.140000
      Row   9: Double precision data: 120.140000
      Row  10: Double precision data: 120.140000
      Row  11: Double precision data: 221.920000
      Row  12: Double precision data: 221.920000
      Row  13: Double precision data: 221.920000
      Row  14: Double precision data: 120.140000
      Row  15: Double precision data: 120.140000
      Row  16: Double precision data: 120.140000
      Row  17: Double precision data: 120.220000
      Row  18: Double precision data: 120.220000
      Row  19: Double precision data: 120.220000
      Row  20: Double precision data: 120.370000
      Row  21: Double precision data: 120.370000
      Row  22: Double precision data: 120.370000
      Row  23: Double precision data: 120.290000
      Row  24: Double precision data: 120.290000
      Row  25: Double precision data: 120.290000


   2) Perform a query on an EK file that contains a database with
      the Supplementary Engineering Data Records of the Viking
      Project in order to retrieve the IMAGE_TIME values (double
      precision time) that correspond to the images with
      IMAGE_NUMBER smaller than a given value, ordered by
      IMAGE_NUMBER.


      Use the EK kernel below to load the information from the
      original Supplementary Engineering Data Record (SEDR) data
      set generated by the Viking Project.

         vo_sedr.bdb

      Use the LSK kernel below to load the leap seconds and time
      constants required for the conversions.

         naif0012.tls


      Example code begins here.


      PRO ekgd_ex2

         ;;
         ;; Local parameters
         ;;
         EKNAME = 'vo_sedr.bdb'
         LSKNAM = 'naif0012.tls'

         ;;
         ;; Load leapseconds file for time conversion.
         ;;
         cspice_furnsh, LSKNAM

         ;;
         ;; Open an EK file.
         ;;
         cspice_furnsh, EKNAME

         ;;
         ;; The table 'VIKING_SEDR_DATA' has a column
         ;; 'IMAGE_TIME' of time values (stored as double
         ;; precision items).
         ;;
         ;; Define a set of constraints to perform a query on
         ;; all loaded EK files (the SELECT clause). In this
         ;; case select the column 'IMAGE_TIME' from table
         ;; 'VIKING_SEDR_DATA' sorted by 'IMAGE_NUMBER'.
         ;;
         query = 'Select IMAGE_TIME from VIKING_SEDR_DATA ' +                $
                 'where image_number < 25860000 order by IMAGE_NUMBER'

         ;;
         ;; 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, 'SELECT clause error: ', errmsg

         endif else begin

            ;;
            ;; Fetch the character data. We know the query returned
            ;; one column and the column contains only scalar data,
            ;; so the index of all elements is 0.
            ;;
            selidx = 0
            eltidx = 0

            ;;
            ;; Loop over each row found matching the query.
            ;;
            for rowno=0, nmrows-1L do begin

               print, format='(A,I3,A,$)', 'Row ', rowno, ': Time data:  '

               ;;
               ;; Use cspice_ekgd to retrieve the string from
               ;;
               cspice_ekgd, selidx, rowno, eltidx, ddata, isnull, found

               if ( isnull ) then begin

                  print, '<Null>'

               endif else begin

                  cspice_et2utc, ddata, 'C', 3, utcstr
                  print, utcstr

               endelse

            endfor

         endelse

         ;;
         ;; 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:


      Row   0: Time data:  1976 JUN 16 16:50:55.925
      Row   1: Time data:  1976 JUN 16 16:51:00.269
      Row   2: Time data:  1976 JUN 16 20:56:53.051
      Row   3: Time data:  1976 JUN 16 20:56:57.395
      Row   4: Time data:  1976 JUN 17 01:02:50.177
      Row   5: Time data:  1976 JUN 17 01:02:54.521
      Row   6: Time data:  1976 JUN 17 05:08:56.263
      Row   7: Time data:  1976 JUN 17 05:09:00.607
      Row   8: Time data:  1976 JUN 17 06:30:28.424
      Row   9: Time data:  1976 JUN 17 06:30:46.174
      Row  10: Time data:  1976 JUN 17 06:30:55.168
      Row  11: Time data:  1976 JUN 17 11:17:47.471
      Row  12: Time data:  1976 JUN 17 11:18:05.221
      Row  13: Time data:  1976 JUN 17 11:18:14.215
      Row  14: Time data:  1976 JUN 17 13:20:23.634
      Row  15: Time data:  1976 JUN 17 13:20:41.384
      Row  16: Time data:  1976 JUN 17 13:20:50.378
      Row  17: Time data:  1976 JUN 17 15:23:17.717
      Row  18: Time data:  1976 JUN 17 15:23:35.467
      Row  19: Time data:  1976 JUN 17 15:23:44.461
      Row  20: Time data:  1976 JUN 17 17:26:20.760
      Row  21: Time data:  1976 JUN 17 17:26:38.510
      Row  22: Time data:  1976 JUN 17 17:26:47.504
      Row  23: Time data:  1976 JUN 17 19:29:23.803
      Row  24: Time data:  1976 JUN 17 19:29:41.553
      Row  25: Time data:  1976 JUN 17 19:29:50.547


   3) This example demonstrates how to fetch double precision values
      from a column in three different cases: single values,
      variable-size arrays and static-size arrays.

      Create an EK that contains a table TAB that has the following
      columns:

         Column name   Data Type   Size
         -----------   ---------   ----
         DP_COL_1      DP          1
         DP_COL_2      DP          VARIABLE
         DP_COL_3      DP          3

      Issue the following query

          query = 'SELECT DP_COL_1, DP_COL_2, DP_COL_3 FROM TAB'

      to fetch and dump column values from the rows that satisfy the
      query.


      Example code begins here.


      PRO ekgd_ex3

         ;;
         ;; Local parameters
         ;;
         EKNAME     = 'ekgd_ex3.bdb'
         TABLE      = 'TAB'
         COL3SZ     = 3
         MXC2SZ     = 4
         NCOLS      = 3
         NROWS      = 4
         SPICEFALSE = 0B

         ;;
         ;; Local variables
         ;;
         cnames = strarr( NCOLS  )
         cdecls = strarr( NCOLS  )

         col2   = dblarr( MXC2SZ )
         col3   = dblarr( COL3SZ )
         dvals  = dblarr( MXC2SZ )

         ;;
         ;; Open a new EK file.  For simplicity, we will not
         ;; reserve any space for the comment area, so the
         ;; number of reserved comment characters is zero.
         ;; The variable `ifname' is the internal file name.
         ;;
         nresvc  =  0
         ifname  =  'Test EK/Created 13-JUN-2019'

         cspice_ekopn, EKNAME, ifname, nresvc, handle

         ;;
         ;; Set up the column names and declarations
         ;; for the TAB segment.  We'll index all of
         ;; the columns.
         ;;
         cnames[0] = 'DP_COL_1'
         cdecls[0] = 'DATATYPE = DOUBLE PRECISION, INDEXED  = TRUE'

         cnames[1] = 'DP_COL_2'
         cdecls[1] = 'DATATYPE = DOUBLE PRECISION, SIZE = VARIABLE'

         cnames[2] = 'DP_COL_3'
         cdecls[2] = 'DATATYPE = DOUBLE PRECISION, SIZE = 3'

         ;;
         ;; Start the segment.
         ;;
         cspice_ekbseg, handle, TABLE, NCOLS, cnames, cdecls, segno

         ;;
         ;; At the records to the table.
         ;;
         for i=1, NROWS do begin

            ;;
            ;; Append a new record to the EK.
            ;;
            cspice_ekappr, handle, segno, recno

            ;;
            ;; Add DP_COL_1
            ;;
            col1 = [i * 100.0d]

            cspice_ekaced, handle, segno, recno,     cnames[0],              $
                           1,      col1,  SPICEFALSE

            ;;
            ;; Add `i' items to DP_COL_2
            ;;
            for j=0, i-1L do begin
               col2[j] = j + 1 + i*200.0d
            endfor

            cspice_ekaced, handle, segno, recno,     cnames[1],              $
                           i,      col2,  SPICEFALSE

            ;;
            ;; Add 3 items to DP_COL_3
            ;;
            for j=0, 2 do begin
               col3[j] =  i + (j+1)*100.0d
            endfor

            cspice_ekaced, handle, segno, recno,     cnames[2],              $
                           3,      col3,  SPICEFALSE

         endfor

         ;;
         ;; Close the file.
         ;;
         cspice_ekcls, handle

         ;;
         ;; Open the created file. Perform the query and show the
         ;; results.
         ;;
         cspice_furnsh, EKNAME

         query = 'SELECT DP_COL_1, DP_COL_2, DP_COL_3 FROM TAB'

         ;;
         ;; 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, 'SELECT clause error: ', errmsg

         endif else begin

            for row=0, nmrows-1L do begin

               print, ' '
               print, format='(A,I3)', 'ROW  = ', row

               ;;
               ;; Fetch values from column `dp_col_1'.  Since
               ;; `dp_col_1' was the first column selected, the
               ;; selection index `selidx' is set to 0.
               ;;
               selidx = 0
               eltidx = 0
               cspice_ekgd, selidx, row, eltidx, ddata, isnull, found
               dvals[0] = ddata

               print, format='(A,$)', '  COLUMN = DP_COL_1: '

               if ( isnull ) then begin
                  print, '<Null>'
               endif else begin
                  print, dvals[0]
               endelse

               ;;
               ;; Fetch values from column `dp_col_2' in the current
               ;; row.  Since `dp_col_2' contains variable-size array
               ;; elements, we call cspice_eknelt to determine how many
               ;; elements to fetch.
               ;;
               selidx = 1
               nelt = cspice_eknelt( selidx, row )

               eltidx = 0
               isnull = SPICEFALSE

               while ( ( eltidx lt nelt ) && ( ~isnull ) ) do begin

                  cspice_ekgd, selidx, row, eltidx, ddata, isnull, found
                  dvals[eltidx] = ddata

                  eltidx = eltidx + 1

                  ;;
                  ;; If the column entry is null, we'll be kicked
                  ;; out of this loop after the first iteration.
                  ;;
               endwhile

               print, format='(A,$)', '  COLUMN = DP_COL_2: '

               if ( isnull ) then begin
                  print, '<Null>'
               endif else begin

                  for i=0, nelt-1L do begin
                     print, format='(F6.1,$)', dvals[i]
                  endfor

                  print, ' '

               endelse

               ;;
               ;; Fetch values from column `dp_col_3' in the current
               ;; row.  We need not call cspice_eknelt since we know how
               ;; many elements are in each column entry.
               ;;
               selidx = 2
               eltidx = 0
               isnull = SPICEFALSE

               while ( ( eltidx lt COL3SZ ) && ( ~isnull ) ) do begin

                  cspice_ekgd, selidx, row, eltidx, ddata, isnull, found
                  dvals[eltidx] = ddata

                  eltidx = eltidx + 1

               endwhile

               print, format='(A,$)', '  COLUMN = DP_COL_3: '

               if ( isnull ) then begin
                  print, '<Null>'
               endif else begin

                  for i=0, COL3SZ-1L do begin
                     print, format='(F6.1,$)', dvals[i]
                  endfor

                  print, ' '

               endelse

            endfor

            ;;
            ;; We either parsed the SELECT clause or had an error.
            ;;
         endelse

         ;;
         ;; 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:


      ROW  =   0
        COLUMN = DP_COL_1:        100.00000
        COLUMN = DP_COL_2:  201.0
        COLUMN = DP_COL_3:  101.0 201.0 301.0

      ROW  =   1
        COLUMN = DP_COL_1:        200.00000
        COLUMN = DP_COL_2:  401.0 402.0
        COLUMN = DP_COL_3:  102.0 202.0 302.0

      ROW  =   2
        COLUMN = DP_COL_1:        300.00000
        COLUMN = DP_COL_2:  601.0 602.0 603.0
        COLUMN = DP_COL_3:  103.0 203.0 303.0

      ROW  =   3
        COLUMN = DP_COL_1:        400.00000
        COLUMN = DP_COL_2:  801.0 802.0 803.0 804.0
        COLUMN = DP_COL_3:  104.0 204.0 304.0


      Note that after run completion, a new EK file exists in the
      output directory.


   4) Query the EK system and fetch data matching that query.

      The program shown here does not rely on advance
      knowledge of the input query or the contents of any loaded EK
      files.

      To simplify the example, we assume that all data are scalar.
      This assumption relieves us of the need to test the size of
      column entries before fetching them. In the event that a
      column contains variable-size array entries, the entry point
      cspice_eknelt may be called to obtain the size of column entries to
      be fetched. See cspice_eknelt for an example.


      Use the EK kernel below to load the information from the
      original Supplementary Engineering Data Record (SEDR) data
      set generated by the Viking Project.

         vo_sedr.bdb

      Use the LSK kernel below to load the leap seconds and time
      constants required for the conversions.

         naif0012.tls


      Example code begins here.


      PRO ekgd_ex4

         ;;
         ;; Local parameters
         ;;
         EKNAME = 'vo_sedr.bdb'
         LSKNAM = 'naif0012.tls'
         MAXSTR = 1024

         ;;
         ;; Define the types of expression that may appear
         ;; in the SELECT clause of EK queries.
         ;;
         SPICE_EK_EXP_COL  = 0
         SPICE_EK_EXP_FUNC = 1
         SPICE_EK_EXP_EXPR = 2

         ;;
         ;; Define the types of EK columns.
         ;;
         SPICE_CHR  = 0
         SPICE_DP   = 1
         SPICE_INT  = 2
         SPICE_TIME = 3

         ;;
         ;; Load leapseconds file for time conversion.
         ;;
         cspice_furnsh, LSKNAM

         ;;
         ;; Load EK.
         ;;
         cspice_eklef, EKNAME, handle

         ;;
         ;; Setup the query.  Parse the SELECT clause using
         ;; cspice_ekpsel.
         ;;
         query = 'Select IMAGE_NUMBER, IMAGE_ID, '                        +  $
                 'PLATFORM_CLOCK, IMAGE_TIME '                            +  $
                 'from VIKING_SEDR_DATA where IMAGE_NUMBER < 25850000 '   +  $
                 'order by IMAGE_NUMBER'

         cspice_ekpsel, query,  n,    xbegs, xends, xtypes,                  $
                        xclass, tabs, cols,  error, errmsg

         if ( error ) then begin

            print, errmsg

         endif else begin

            ;;
            ;; Submit query to the EK query system.
            ;;
            cspice_ekfind, query, nmrows, error, errmsg

            if ( error ) then begin

               print, errmsg

            endif else begin

               ;;
               ;; Fetch the rows that matched the query.
               ;;
               for row=0, nmrows-1L do begin

                  ;;
                  ;; Fetch data from the ith row.
                  ;;
                  print, ' '
                  print, 'ROW = ', row

                  for colno=0, n-1L do begin

                     ;;
                     ;; Fetch the data from the jth selected
                     ;; column.
                     ;;
                     if ( xclass[colno] eq SPICE_EK_EXP_COL ) then begin

                        outstr  =  tabs[colno] + '.' + cols[colno]
                        print, format='(A,A-31,A,$)', '  ', outstr, ': '

                     endif else begin

                        b  =  xbegs[colno]
                        e  =  xends[colno]
                        print, format='(2A,$)', 'ITEM = ', query(b:e)

                     endelse

                     if ( xtypes[colno] eq SPICE_CHR ) then begin

                        cspice_ekgc, colno, row, 0, MAXSTR, cdata, null, found

                        if ( null ) then begin
                           print, '<Null>'
                        endif else begin
                           print, cdata
                        endelse

                     endif else if ( xtypes[colno] eq SPICE_DP ) then begin

                        cspice_ekgd, colno, row, 0, ddata, null, found

                        if ( null ) then begin
                           print, '<Null>'
                        endif else begin
                           print, ddata
                        endelse

                     endif else if ( xtypes[colno] eq SPICE_INT ) then begin

                        cspice_ekgi, colno, row, 0, idata, null, found

                        if ( null ) then begin
                           print, '<Null>'
                        endif else begin
                           print, idata
                        endelse

                     endif else begin

                        ;;
                        ;; The item is a time value.  Convert it
                        ;; to UTC for output.
                        ;;
                        cspice_ekgd, colno, row, 1, tdata, null, found

                        if ( null ) then begin
                           print, '<Null>'
                        endif else begin
                           cspice_et2utc, tdata, 'C', 3, utcstr
                           print, utcstr
                        endelse

                     endelse

                     ;;
                     ;; We're done with the column having index `colno'.
                     ;;
                  endfor

                  ;;
                  ;; We're done with the row having index `row'.
                  ;;
               endfor

               ;;
               ;; We either processed the query or had an error.
               ;;
            endelse

            ;;
            ;; We either parsed the SELECT clause or had an error.
            ;;
         endelse

         ;;
         ;; 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:


      ROW =        0
        VIKING_SEDR_DATA.IMAGE_NUMBER  :     25837050
        VIKING_SEDR_DATA.IMAGE_ID      : 168C09
        VIKING_SEDR_DATA.PLATFORM_CLOCK:        119.88000
        VIKING_SEDR_DATA.IMAGE_TIME    : 1976 JUN 16 16:50:55.925

      ROW =        1
        VIKING_SEDR_DATA.IMAGE_NUMBER  :     25837051
        VIKING_SEDR_DATA.IMAGE_ID      : 168C10
        VIKING_SEDR_DATA.PLATFORM_CLOCK:        119.27000
        VIKING_SEDR_DATA.IMAGE_TIME    : 1976 JUN 16 16:51:00.269

      ROW =        2
        VIKING_SEDR_DATA.IMAGE_NUMBER  :     25840344
        VIKING_SEDR_DATA.IMAGE_ID      : 168C11
        VIKING_SEDR_DATA.PLATFORM_CLOCK:        119.88000
        VIKING_SEDR_DATA.IMAGE_TIME    : 1976 JUN 16 20:56:53.051

      ROW =        3
        VIKING_SEDR_DATA.IMAGE_NUMBER  :     25840345
        VIKING_SEDR_DATA.IMAGE_ID      : 168C12
        VIKING_SEDR_DATA.PLATFORM_CLOCK:        119.27000
        VIKING_SEDR_DATA.IMAGE_TIME    : 1976 JUN 16 20:56:57.395

      ROW =        4
        VIKING_SEDR_DATA.IMAGE_NUMBER  :     25843638
        VIKING_SEDR_DATA.IMAGE_ID      : 169C01
        VIKING_SEDR_DATA.PLATFORM_CLOCK:        119.88000
        VIKING_SEDR_DATA.IMAGE_TIME    : 1976 JUN 17 01:02:50.177

      ROW =        5
        VIKING_SEDR_DATA.IMAGE_NUMBER  :     25843639
        VIKING_SEDR_DATA.IMAGE_ID      : 169C02
        VIKING_SEDR_DATA.PLATFORM_CLOCK:        119.27000
        VIKING_SEDR_DATA.IMAGE_TIME    : 1976 JUN 17 01:02:54.521

      ROW =        6
        VIKING_SEDR_DATA.IMAGE_NUMBER  :     25846934
        VIKING_SEDR_DATA.IMAGE_ID      : 169C03
        VIKING_SEDR_DATA.PLATFORM_CLOCK:        120.14000
        VIKING_SEDR_DATA.IMAGE_TIME    : 1976 JUN 17 05:08:56.263

      ROW =        7
        VIKING_SEDR_DATA.IMAGE_NUMBER  :     25846935
        VIKING_SEDR_DATA.IMAGE_ID      : 169C04
        VIKING_SEDR_DATA.PLATFORM_CLOCK:        119.52000
        VIKING_SEDR_DATA.IMAGE_TIME    : 1976 JUN 17 05:09:00.607

      ROW =        8
        VIKING_SEDR_DATA.IMAGE_NUMBER  :     25848026
        VIKING_SEDR_DATA.IMAGE_ID      : 169C05
        VIKING_SEDR_DATA.PLATFORM_CLOCK:        120.14000
        VIKING_SEDR_DATA.IMAGE_TIME    : 1976 JUN 17 06:30:28.424

      ROW =        9
        VIKING_SEDR_DATA.IMAGE_NUMBER  :     25848030
        VIKING_SEDR_DATA.IMAGE_ID      : 169C09
        VIKING_SEDR_DATA.PLATFORM_CLOCK:        120.14000
        VIKING_SEDR_DATA.IMAGE_TIME    : 1976 JUN 17 06:30:46.174

      ROW =       10
        VIKING_SEDR_DATA.IMAGE_NUMBER  :     25848032
        VIKING_SEDR_DATA.IMAGE_ID      : 169C11
        VIKING_SEDR_DATA.PLATFORM_CLOCK:        120.14000
        VIKING_SEDR_DATA.IMAGE_TIME    : 1976 JUN 17 06:30:55.168


Particulars


   This routine allows retrieval of data from double precision columns.

   This routine returns one element at a time in order to save the
   caller from imposing a limit on the size of the column entries
   that can be handled.

   If a SELECT clause returns data consisting of three
   columns (N=3) and four rows (M=4),

              col 0    col 1    col 2

      row 0   val_00   val_01   val_02
      row 1   val_10   val_11   val_12
      row 2   val_20   val_21   val_22
      row 3   val_30   val_31   val_32

   with "col 1" and "col 2" containing double precision data
   and the "val_31" a vector of K doubles, the data position
   relates to the data:

   fetch scalar "val_21"

      `selidx' = 1, `row' = 2, `elment' = 0

   fetch scalar "val_32"

      `selidx' = 2, `row' = 3, `elment' = 0

   fetch the final element of vector "val_31"

      `selidx' = 1, `row' = 3, `elment' = K-1

   `elment' is allowed to exceed the number of elements in
   the column entry; if it does, `found' returns
   as SPICEFALSE. This allows the caller to read data
   from the column entry in a loop without checking the
   number of available elements first.

Exceptions


   1)  If the input argument `elment' is less than 0, the error
       SPICE(INVALIDINDEX) is signaled by a routine in the call tree
       of this routine and `found' is returned False. However, `elment'
       is allowed to be greater than the number of elements in the
       specified column entry; this allows the caller to read data
       from the column entry in a loop without checking the number of
       available elements first. If `elment' is greater than the number
       of available elements, `found' is returned False.

   2)  If `selidx' is outside of the range established by the last query
       passed to the EK search engine, the error SPICE(INVALIDINDEX) is
       signaled by a routine in the call tree of this routine and `found'
       is returned False.

   3)  If `row' is outside of the range established by the last query
       passed to the EK search engine, the error SPICE(INVALIDINDEX) is
       signaled by a routine in the call tree of this routine and `found'
       is returned False.

   4)  If the specified column does not have double precision or time
       type, the error SPICE(INVALIDTYPE) is signaled by a routine in
       the call tree of this routine.

   5)  If this routine is called when no E-kernels have been loaded,
       the error SPICE(NOLOADEDFILES) is signaled by a routine in the
       call tree of this routine.

   6)  If any of the input arguments, `selidx', `row' or `elment', is
       undefined, an error is signaled by the IDL error handling
       system.

   7)  If any of the input arguments, `selidx', `row' or `elment', is
       not of the expected type, or it does not have the expected
       dimensions and size, an error is signaled by the Icy
       interface.

   8)  If any of the output arguments, `ddata', `null' or `found', is
       not a named variable, an error is signaled by the Icy
       interface.

Files


   This routine reads binary "sequence component" EK files.
   In order for a binary EK file to be accessible to this routine,
   the file must be "loaded" via a call to the routine cspice_eklef.

   Text format EK files cannot be used by this routine; they must
   first be converted by binary format by the NAIF Toolkit utility
   SPACIT.

Restrictions


   None.

Required_Reading


   ICY.REQ
   EK.REQ

Literature_References


   None.

Author_and_Institution


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

Version


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

       Edited the -Examples section to comply with NAIF standard. Added
       complete code examples.

       Added -Parameters, -Exceptions, -Files, -Restrictions,
       -Literature_References and -Author_and_Institution sections. Extended
       -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.1, 24-JAN-2010 (EDW)

       Corrected errors in the description of the indices behavior
       as given in 'elment' argument. That description is now
       in the "Particulars" section.

   -Icy Version 1.0.0, 16-JUN-2003 (EDW)

Index_Entries


   fetch element from double precision column entry



Fri Dec 31 18:43:04 2021