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_wnfild

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

Abstract


   CSPICE_WNFILD fills small gaps between adjacent intervals of
   a double precision window.

I/O


   Given:

      smlgap   limiting measure of the small gaps to fill. Adjacent intervals
               separated by gaps of measure less than or equal to `smlgap'
               are merged.

               [1,1] = size(smlgap); double = class(smlgap)

      window_i SPICE window containing zero or more intervals.

               [2n,1] = size(window_i); double = class(window_i)

   the call:

      [window_f] = cspice_wnfild( smlgap, window )

   returns:

      window_f SPICE window containing zero or more intervals, representing
               the original `window_i', after adjacent intervals separated by
               `smlgap' gaps have been merged. `window_f' may overwrite
               `window_i'.

               [2m,1] = size(window_f); double = class(window_f)

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) 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 1.0. From the resulting window, remove gaps smaller than 2.0;
      then, smaller than 3; and, finally, smaller that 10.0.

      Example code begins here.


      function wnfild_ex1()

         %
         % Let `window' contain the intervals
         %
         window = [ [ 1; 3 ]; [ 7; 11 ]; [ 23; 27 ]; [ 29; 29 ]; ];

         %
         % Apply the following series of calls
         %
         window = cspice_wnfild(  1, window );
         fprintf( '1: Removing gaps smaller than or equal to 1.0\n' );
         for i=1:cspice_wncard(window)

            [left, right] = cspice_wnfetd( window, i );
            fprintf( '%16.6f %16.6f\n', left, right  );

         end

         window = cspice_wnfild(  2, window );
         fprintf( '2: Removing gaps smaller than or equal to 2.0\n' );
         for i=1:cspice_wncard(window)

            [left, right] = cspice_wnfetd( window, i );
            fprintf( '%16.6f %16.6f\n', left, right  );

         end

         window = cspice_wnfild(  3, window );
         fprintf( '3: Removing gaps smaller than or equal to 3.0\n' );
         for i=1:cspice_wncard(window)

            [left, right] = cspice_wnfetd( window, i );
            fprintf( '%16.6f %16.6f\n', left, right  );

         end

         window = cspice_wnfild( 10, window );
         fprintf( '4: Removing gaps smaller than or equal to 10.0\n' );
         for i=1:cspice_wncard(window)

            [left, right] = cspice_wnfetd( window, i );
            fprintf( '%16.6f %16.6f\n', left, right  );

         end


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


      1: Removing gaps smaller than or equal to 1.0
              1.000000         3.000000
              7.000000        11.000000
             23.000000        27.000000
             29.000000        29.000000
      2: Removing gaps smaller than or equal to 2.0
              1.000000         3.000000
              7.000000        11.000000
             23.000000        29.000000
      3: Removing gaps smaller than or equal to 3.0
              1.000000         3.000000
              7.000000        11.000000
             23.000000        29.000000
      4: Removing gaps smaller than or equal to 10.0
              1.000000        11.000000
             23.000000        29.000000


Particulars


   This function removes small gaps between adjacent intervals
   by merging intervals separated by gaps of measure less than
   or equal to the limiting measure `smlgap'.

Exceptions


   1)  The cardinality of the input `window_i' 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_i', is
       undefined, an error is signaled by the Matlab error handling
       system.

   4)  If any of the input arguments, `smlgap' or `window_i', is not
       of the expected type, or it does not have the expected
       dimensions and size, an error is signaled by the Mice
       interface.

Files


   None.

Restrictions


   None.

Required_Reading


   MICE.REQ
   WINDOWS.REQ

Literature_References


   None.

Author_and_Institution


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

Version


   -Mice Version 1.1.0, 26-NOV-2021 (EDW) (JDR)

       Changed argument names "window" and "sml" to "window_i" and
       "smlgap" for consistency with other routines.

       Edited the header to comply with NAIF standard. Added
       example's problem statement and reformatted example's output.

       Added -Parameters, -Exceptions, -Files, -Restrictions,
       -Literature_References and -Author_and_Institution sections, and
       completed -Particulars section.

       Eliminated use of "lasterror" in rethrow.

       Removed reference to the function's corresponding CSPICE header from
       -Required_Reading section.

   -Mice Version 1.0.2, 12-MAR-2012 (EDW) (SCK)

       Edited -I/O section to conform to NAIF standard for Mice
       documentation.

   -Mice Version 1.0.1, 11-SEP-2008 (EDW)

       Edit to -I/O return value description.

   -Mice Version 1.0.0, 24-JUL-2007 (EDW)

Index_Entries


   fill small gaps in a d.p. window


Fri Dec 31 18:44:28 2021