Table of contents
CSPICE_WNFILD fills small gaps between adjacent intervals
of a double precision window.
Given:
smlgap the scalar double precision limiting measure of the small
intervals to fill.
help, smlgap
DOUBLE = Scalar
Adjacent intervals separated by gaps of measure less than or
equal to `smlgap' are merged.
window a scalar, double precision window containing zero or more
intervals.
help, window
STRUCT = cspice_celld(2*N)
'window' must be created as a window structure via a
cspice_celld call.
the call:
cspice_wnfild, smlgap, window
returns:
window on output, is the original window, after adjacent intervals
separated by `smlgap' gaps have been merged.
help, window
STRUCT = cspice_celld(2*N)
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) Given a double precision window, containing the following four
intervals:
[ 1.0, 3.0 ], [ 7.0, 11.0 ], [ 23.0, 27.0 ], [ 29.0, 29.0 ]
merge any adjacent intervals separated by a gap equal to or less
than 3.0.
Example code begins here.
PRO wnfild_ex1
;;
;; Create a cell containing a double
;; precision 8-vector.
;;
win1 = cspice_celld( 8 )
;;
;; Define a window with four intervals.
;;
darray = [ [ 1.d, 3.0], [ 7.0, 11.0], [23.0, 27.0], [29.d, 29.d] ]
;;
;; Add the window data to the cell.
;;
for i=0, 3 do begin
cspice_wninsd, darray[0,i], darray[1,i], win1
endfor
;;
;; Fill the gaps:
;;
cspice_wnfild, 3.d0, win1
;;
;; Calculate the number of intervals in the
;; return window `win1'.
;;
no_intervals = cspice_wncard(win1)
;;
;; Output the intervals.
;;
for i= 0, (no_intervals -1 ) do begin
cspice_wnfetd, win1, i, left, right
print, left, right
endfor
END
When this program was executed on a Mac/Intel/IDL8.x/64-bit
platform, the output was:
1.0000000 3.0000000
7.0000000 11.000000
23.000000 29.000000
Note that the call combined adjacent intervals separated by a
gap of less than or equal to 3.0. In this case the intervals:
[ 23, 27 ] [ 29, 29 ]
combine to:
[23, 29]
The user must create any needed window structures with
cspice_celld prior to use regardless of whether the routine
uses the window as input or returns it as output.
This routine removes small gaps between adjacent intervals
by merging intervals separated by gaps of measure less than
or equal to the limiting measure `smlgap'.
1) The cardinality of the input `window' must be even. Left
endpoints of stored intervals must be strictly greater than
preceding right endpoints. Right endpoints must be greater
than or equal to corresponding left endpoints. Invalid window
data are not diagnosed by this routine and may lead to
unpredictable results.
2) If `smlgap' is less than or equal to zero, this routine has
no effect on the window.
3) If any of the input arguments, `smlgap' or `window', is
undefined, an error is signaled by the IDL error handling
system.
4) If any of the input arguments, `smlgap' or `window', is not of
the expected type, or it does not have the expected dimensions
and size, an error is signaled by the Icy interface.
None.
None.
ICY.REQ
CELLS.REQ
WINDOWS.REQ
None.
J. Diaz del Rio (ODC Space)
E.D. Wright (JPL)
-Icy Version 1.1.0, 10-AUG-2021 (JDR)
Changed the input argument name "small" to "smlgap" for
consistency with other routines.
Edited the header to comply with NAIF standard. Added
example's problem statement.
Extended -Particulars section.
Added -Parameters, -Exceptions, -Files, -Restrictions,
-Literature_References and -Author_and_Institution sections.
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.2, 26-NOV-2007 (EDW)
Implemented use of cspice_wncard function to return
window cardinality.
-Icy Version 1.0.1, 12-SEP-2006 (EDW)
Correct Required Reading citation cell.req to cells.req.
-Icy Version 1.0.0, 08-AUG-2004 (EDW)
fill small gaps in a d.p. window
|