Documentation for /home/davin/idl/socware/

Generated by IDLdoc

single page | use frames     summary     class     fields     routine details     file attributes

general/misc/

xdegap.pro


Routines

top source xdegap

xdegap, dt, margin, ct0, y, ct_out, y_out, nowarning=nowarning, iindices=iindices, maxgap=maxgap, flag=flag, onenanpergap=onenanpergap, output_message=output_message, display_object=display_object, twonanpergap=twonanpergap, gap_begin=gap_begin, gap_end=gap_end, _extra=_extra

NAME: xdegap PURPOSE: Locates gaps in data, and fills in with NaN This subroutine accepts the time array (can be cline time) t and the multi-dimensional array yarr that matches with the time array. It outputs the same arrays but with a different number of rows depending on how many rows were added. It then figures out where to add rows by checking which time differences are greater than or equal to deltat plus a margin and adds an array of rows of equispaced times of size tstep=gap/(number_of_points_that_fit_with_minimum_cumulative_error). The same number of rows is added to yarr with values equal to FLAGs. NOTE: ARRAYS AND STRUCTURES THAT NEED DEGAPPING ARE REDEFINED TO BE LARGER THAN BEFORE. THUS THE TIME COLUMN THAT HAS BEEN DEGAPPED WILL NOT CORRESPOND TO THE ELEMENTS OF AN ARRAY THAT HAS NOT BEEN DEGAPPED. CAUTION: DEGAP ALL ARRAYS OR STRUCTURES YOU ARE GOING TO USE TOGETHER, I.E., WITH ONE DEGAP CALL. ADDITIONAL NOTE: To conserve memory, see the ONENANPERGAP keyword. CALLING SEQUENCE: xdegap, dt, margin, ct, y, ct_out, y_out [,/nowarning] [,maxgap = ] [,iindices=] [,/onenanpergap] [,/twonanpergap] INPUT: dt = the time interval for tests margin = the margin ct = the input time array y = the input array, can be 1 or 2d (n_elements(ct), m) OUTPUT: ct_out = the output time array, y_out = the input time array KEYWORDS: nowarning = if set, suppresses warnings maxgap = the maximum gap size filled, in seconds iindicies = the indices in the output arrays that contain the original data flag = A numeric user-specified value to use for flagging gaps. Defaults to a floating NaN. If an array is entered, only the first element is considered.If a non-numeric datatype is entered, its value is ignored. onenanpergap = Fill gaps with only one NaN -> useful for conserving memory. Also, for reference concerning post-processing, the INTERPOL function propagates a single NaN just as it would many NaNs. twonanpergap = Fill gaps with only two NaNs, it turns out that onenanpergap does not work well with spectrograms. The exeption is if only one NAN fits in the gap given the input parameters, then only one is used. gap_begin = the double-precision start times of the detected gaps. gap_end = the double-precision end times of the detected gaps. display_object = Object reference to be passed to dprint for output. output_message = Passes any messages generated up to the calling procedure as an array of strings HISTORY: From Vassilis' degap.pro, 2-apr-2007, jmm, jimm@ssl.berkeley.edu bug fix for undefined variable, jmm, 24-jun-2007 Switched maxgap to seconds, jmm, 26-oct-2007 Added comment to test svn version 4_00, jmm, 28-apr-2008 Added ONENANPERGAP kw, W.M.F., 5 May, 2009. Added GAP_BEGIN, GAP_END kwd's, 12 June, 2009. Added _extra keyword, 20-oct-2009, jmm Added output_message keyword Feb-02-2011 prc Added twonanpergap, jmm, 14-aug-2012 $LastChangedBy: aaflores $ $LastChangedDate: 2014-05-29 12:48:05 -0700 (Thu, 29 May 2014) $ $LastChangedRevision: 15260 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/misc/xdegap.pro $

Parameters

dt
margin
ct0
y
ct_out
y_out

Keywords

nowarning
iindices
maxgap
flag
onenanpergap
output_message
display_object
twonanpergap
gap_begin
gap_end
_extra

File attributes

Modification date: Mon Jun 9 05:59:05 2014
Lines: 208