general/misc/
tsub_average.pro
Routines
Routines from tsub_average.pro
result = Avsig(x0, get_sigma=get_sigma, sigma=sigma, no_zeros=no_zeros, sig_mean=sig_mean, dimension=dimension, fractional=fractional, median=median, _extra=_extra)
NAME: avsig PURPOSE: Average and dispersion of an array, zeros can be not included, handles NaN values correctly CALLING SEQUENCE: xbar = Avsig(x, sigma = sigma, no_zeros = no_zeros, $ sig_mean = sig_mean, dimension = dimension, $ fractional = fractional, median = median, $ _extra = _extra) INPUT: x = an array OUTPUT: xbar = mean, total(x)/n_elements(x) KEYWORDS: no_zeros= if set, strip out zeros get_sigma = if set, calculate the standard deviation sigma = standard deviation, sqrt(total((x-xbar)^2/(nx-1))) sig_mean = if set return sigma/sqrt(nx), the standard deviation of the mean of the array, dimension = the dimension of the array to find the mean in, passed into the total command, it must be a scalar.
tsub_average, varname0, nn, new_name=new_name, median=median, display_object=display_object, _extra=_extra
NAME: tsub_averagePURPOSE: Subtracts average or median values from the data in a tplot variable, returns a new variable, only one at a time for nowCALLING SEQUENCE: tsub_average, varname, out_name, new_name=new_name,median=medianINPUT: varname = a tplot variable nameOUTPUT: out_name = variable name of the output tplot variableKEYWORDS: new_name = can be used to input the new variable name, if not input the default is to add a '-d' to the input name (or '-m' for median subtraction) and the name is passed out in this variable display_object = Object reference to be passed to dprint for output.
Routine details
top source Avsig
result = Avsig(x0, get_sigma=get_sigma, sigma=sigma, no_zeros=no_zeros, sig_mean=sig_mean, dimension=dimension, fractional=fractional, median=median, _extra=_extra)
NAME: avsig PURPOSE: Average and dispersion of an array, zeros can be not included, handles NaN values correctly CALLING SEQUENCE: xbar = Avsig(x, sigma = sigma, no_zeros = no_zeros, $ sig_mean = sig_mean, dimension = dimension, $ fractional = fractional, median = median, $ _extra = _extra) INPUT: x = an array OUTPUT: xbar = mean, total(x)/n_elements(x) KEYWORDS: no_zeros= if set, strip out zeros get_sigma = if set, calculate the standard deviation sigma = standard deviation, sqrt(total((x-xbar)^2/(nx-1))) sig_mean = if set return sigma/sqrt(nx), the standard deviation of the mean of the array, dimension = the dimension of the array to find the mean in, passed into the total command, it must be a scalar. fractional = if set, the fractional error is passed out as sigma, don't use this if zero is a valid value of xbar... median = if set, use the median instead of the mean for xbar, it is not recommended fo sigma calculations HISTORY: 12-9-94, jmm, jimm@ssl.berkeley.edu 2-13-95, jmm, added dimension keyword, switched from ok_zeros to no_zeros 5-sep-1996, jmm, switched to double precision 7-oct-2008, jmm, ignores NaN values, added median keyword
Parameters
- x0
Keywords
- get_sigma
- sigma
- no_zeros
- sig_mean
- dimension
- fractional
- median
- _extra
top source tsub_average
tsub_average, varname0, nn, new_name=new_name, median=median, display_object=display_object, _extra=_extra
NAME: tsub_average PURPOSE: Subtracts average or median values from the data in a tplot variable, returns a new variable, only one at a time for now CALLING SEQUENCE: tsub_average, varname, out_name, new_name=new_name,median=median INPUT: varname = a tplot variable name OUTPUT: out_name = variable name of the output tplot variable KEYWORDS: new_name = can be used to input the new variable name, if not input the default is to add a '-d' to the input name (or '-m' for median subtraction) and the name is passed out in this variable display_object = Object reference to be passed to dprint for output. HISTORY: 18-jul-2007, jmm, jimm@ssl.berkeley.edu 02-nov-2007, jmm, Fixed bug for variables with no data. 06-may-2008, jmm, Fixed problem, by changing non-float and non-double datatypes to floats $LastChangedBy: $ $LastChangedDate: $ $LastChangedRevision: $ $URL: $
Parameters
- varname0
- nn
Keywords
- new_name
- median
- display_object
- _extra
File attributes
Modification date: | Thu Feb 13 16:43:48 2014 |
Lines: | 104 |