CSPICE_CELLI creates an integer Icy data cell of defined
size a scalar integer describing the number of elements in the
cell's integer data array.
cell = cspice_celli( size )
cell a scalar IDL structure composed of fields
corresponding to a CSPICE cell.
OFFSET A 9-vector of IDL_MEMINT offsets for each of the
structure fields with respect to the beginning of the
Element 0 of the array contains the offset to the DTYPE
field; element 1 of the array contains the offset to
the LENGTH field, etc.
This array has no function in a cell sense.
The Icy cell implementation uses the 'OFFSET'
values to locate data fields within the IDL structure.
DTYPE Data type of cell: an integer scalar defining the type
of data stored in the cell data array.
LENGTH For character cells, the integer scalar declared length
of the cell's string array.
SIZE An integer scalar defining the maximum number of data
items that can be stored in the cell's data array.
CARD The cell's "cardinality": the integer scalar defining
the number of data items currently present in the cell
Note CARD <= SIZE.
This field has value 0 after cell creation.
ISSET A boolean scalar flag indicating whether the cell is a
SPICE set. Sets have no duplicate data items, and their
data items are stored in increasing order.
ADJUST A boolean scalar flag indicating whether the cell's
data area has adjustable size. Adjustable size cell
data areas are not currently implemented.
INIT A boolean scalar flag indicating whether the cell is
BASE The array of type DTYPE with 'SIZE' + 'DATA' elements
(an N-vector, N = SIZE + DATA)
DATA The offset from the first element of the 'BASE' array
to the cell data. This field has value
SPICE_CELL_CTRLSZ (defined in SpiceCel.h), referred to
as the control segment size.
;; Create a cell containing an integer 8-vector.
cell = cspice_celli( 8 )
help, cell, /struct
** Structure <304fa10>, 10 tags, length=116, data length=115, refs=1:
OFFSET LONG Array
DTYPE LONG 2
LENGTH LONG 0
SIZE LONG 8
CARD LONG 0
ISSET BYTE 1
ADJUST BYTE 0
INIT BYTE 0
BASE LONG Array
DATA LONG 6
Note the length of the BASE field equals the defined SIZE, 8,
plus the value of the DATA offset, 6.
Access to the cell data array is best done using the Icy calls, but
if necessary a user can directly manipulate the data.
Extract the data array:
;; Where 'array' has cardinality 'CARD', assumed as non-zero
;; for this example.
data_start = cell.data
data_end = data_start + cell.card - 1
array = cell.base[ data_start:data_end]
A cell as used in Icy is a structure similar to the CSPICE expression
of a cell; all fields present in the CSPICE cell exist in the Icy version.
The DATA field defines the offset from the start of the BASE array to
the beginning of the cell array data. The first DATA elements of BASE
serve as control information.
-Icy Version 1.0.2, 19-JAN-2009, EDW (JPL)
Edited Examples sections to show use of the cardinality field,
".card," (correct) instead of the size field, ".size," (incorrect).
Eliminated the code showing direct writes to the cell data field.
Users should call Icy routines to change cell data.
-Icy Version 1.0.1, 12-SEP-2006, EDW (JPL)
Correct Required Reading citation CELL.REQ to CELLS.REQ.
-Icy Version 1.0.0, 01-AUG-2004, EDW (JPL)
create an integer cell