This page was created by the IDL library routine `mk_html_help2`.

Last modified: Wed Nov 5 03:16:59 2025.

# Directory Listing of Routines

# external/developers/outliers_and_convolution

- CONVOLVE_GAUSSIAN_1D
  Routine convolves scalar or vector field to a given resolution
- OUTLIERS_AND_CONVOLUTION_CRIB
  Crib sheet showing the use and work of the outlier removal and
- REMOVE_OUTLIERS
  Routine eliminates outliers. Quadratic trend is determined in a hollow
- REMOVE_OUTLIERS_REPAIR
  Routine repairs outliers. Quadratic trend is determined in a hollow

# Routine Descriptions

## CONVOLVE_GAUSSIAN_1D

[Next Routine] [List of Routines]

     NAME:
         CONVOLVE_GAUSSIAN_1D

     PURPOSE:
     Routine convolves scalar or vector field to a given resolution
     with a Gaussian kernel

     CATEGORY:
     Data Processing

     CALLING SEQUENCE:
     convolve_gaussian_1d,resol,tarr,varrin,varrout

     INPUTS:
     resol - desired time resolution in seconds
     tarr - time array (1D, double, seconds)
     varrin - input field - 1D or mD array (ntimepoints,m)

     KEYWORDS: none

     PARAMETERS:   eps - truncate Gaussian at this height
         ni - initial length of transform is 2^ni (adjusted depending on data)
         ndump - initial length of leakage-dumping tail (adjusted by code)

     OUTPUTS:
     varrout - output array of the same dimensions that varrin

     DEPENDENCIES: None - can be used alone.

     MODIFICATION HISTORY:
     Written by: Vladimir Kondratovich 2008/10/10.

(See external/developers/outliers_and_convolution/convolve_gaussian_1d.pro)

## OUTLIERS_AND_CONVOLUTION_CRIB

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
         OUTLIERS_AND_CONVOLUTION_CRIB

     PURPOSE:
    	Crib sheet showing the use and work of the outlier removal and
    	convolution routines.

     CATEGORY:
    	Crib sheet

     CALLING SEQUENCE:
    	crib_outliers_and_convolution

     INPUTS:
    	none; the code prompts user to continue by entering .continue command

     KEYWORDS:
    	none

     PARAMETERS: 3 parameters for outlier filtering and convolution are described
    		and set in the code. Another parameter is set in the auxillary
    		routine remove_outliers_repair.pro

     OUTPUTS:
    	graphics

     DEPENDENCIES: convolve_gaussian_1d.pro, remove_outliers.pro, remove_outliers_repair.pro,
     wi_swe_load.pro, get_data.pro, xclip.pro, xdegap.pro, xdeflag.pro.

     MODIFICATION HISTORY:
    	Written by:	Vladimir Kondratovich 2007/12/28.

(See external/developers/outliers_and_convolution/outliers_and_convolution_crib.pro)

## REMOVE_OUTLIERS

[Previous Routine] [Next Routine] [List of Routines]

     NAME:
         REMOVE_OUTLIERS

     PURPOSE:
    	Routine eliminates outliers. Quadratic trend is determined in a hollow
    	vicinity of each point. The data value is compared with the trend
    	value. If the deviation is statistically improbable, the value is
    	repaired. There are 6 options for repair to be set in the subroutine
    	remove_outliers_repair.pro. Routine gives the summary of its work: how
    	many of the total number of numeric values were repaired, and the number
    	of failure cases (when it was impossible to establish a trend).

     CATEGORY:
    	Data Processing

     CALLING SEQUENCE:
    	remove_outliers, epoch, valuesin, d, tmax, nmax

     INPUTS:
    	EPOCH: time array for the data values. Any time units may be used,
    		just do it consistently. Double 1D array.
      VALUESIN: 1D array of values to filter; its numerical values are
    		replaced by filtered data at the end.
    	D: half-size of the hollow vicinity of the point where trend is
    		established (integer)
    	TMAX: maximal time interval covered by the hollow vicinity (double)
    	NMAX: maximal deviation from the trend deemed to be probable
    		(in units of standard deviation). Integer.

     KEYWORDS: None

     PARAMETERS: Repair option set in subroutine remove_outliers_repair.pro.

     OUTPUTS:
    	VALUESIN: Array of filtered values (numerical values of input are replaced).
         The code may produce "division by zero" warnings originated in the svdfit
         routine. They should be ignored.

     DEPENDENCIES: remove_outliers_repair.pro

     MODIFICATION HISTORY:
    	Written by:	Vladimir Kondratovich 2007/12/28.

(See external/developers/outliers_and_convolution/remove_outliers.pro)

## REMOVE_OUTLIERS_REPAIR

[Previous Routine] [List of Routines]

     NAME:
         REMOVE_OUTLIERS_REPAIR

     PURPOSE:
    	Routine repairs outliers. Quadratic trend is determined in a hollow
    	vicinity of each point. The data value is compared with the trend
    	value. If the deviation is statistically improbable, the value is
    	repaired. There are 6 options for repair.

     CATEGORY:
    	Data Processing

     CALLING SEQUENCE:
    	repair, valneib, tneib, valiin, nmax, valiout

     INPUTS:
    	VALNEIB: array of the data values in the hollow vicinity of the point.
      TNEIB: array of the observation times for the above values.
      VALIIN: the value to filter.
      NMAX: maximal probable deviation from the average in units of standard
               deviation

     KEYWORDS: None

     PARAMETERS: The code has one parameter "sch" setting the way outlier is
    		repaired.

     OUTPUTS:
    	VALIOUT: filtered value.

     DEPENDENCIES: None. Called by remove_outliers.pro

     MODIFICATION HISTORY:
    	Written by:	Vladimir Kondratovich 2007/12/28.

(See external/developers/outliers_and_convolution/remove_outliers_repair.pro)