general/tools/tplot/wvlt/
wave_signif.pro
NAME: WAVE_SIGNIF PURPOSE: Compute the significance levels for a wavelet transform. CALLING SEQUENCE: result = WAVE_SIGNIF(y,dt,scale,sigtest) INPUTS: Y = the time series, or, the VARIANCE of the time series. (If this is a single number, it is assumed to be the variance...) DT = amount of time between each Y value, i.e. the sampling time. SCALE = the vector of scale indices, from previous call to WAVELET. SIGTEST = 0, 1, or 2. If omitted, then assume 0. If 0 (the default), then just do a regular chi-square test, i.e. Eqn (18) from Torrence & Compo. If 1, then do a "time-average" test, i.e. Eqn (23). In this case, DOF should be set to NA, the number of local wavelet spectra that were averaged together. For the Global Wavelet Spectrum, this would be NA=N, where N is the number of points in your time series. If 2, then do a "scale-average" test, i.e. Eqns (25)-(28). In this case, DOF should be set to a two-element vector [S1,S2], which gives the scale range that was averaged together. e.g. if one scale-averaged scales between 2 and 8, then DOF=[2,8]. OUTPUTS: result = significance levels as a function of SCALE, or if /CONFIDENCE, then confidence intervals OPTIONAL KEYWORD INPUTS: MOTHER = A string giving the mother wavelet to use. Currently, 'Morlet','Paul','DOG' (derivative of Gaussian) are available. Default is 'Morlet'. PARAM = optional mother wavelet parameter. For 'Morlet' this is k0 (wavenumber), default is 6. For 'Paul' this is m (order), default is 4. For 'DOG' this is m (m-th derivative), default is 2. LAG1 = LAG 1 Autocorrelation, used for SIGNIF levels. Default is 0.0 SIGLVL = significance level to use. Default is 0.95 DOF = degrees-of-freedom for signif test. IF SIGTEST=0, then (automatically) DOF = 2 (or 1 for MOTHER='DOG') IF SIGTEST=1, then DOF = NA, the number of times averaged together. IF SIGTEST=2, then DOF = [S1,S2], the range of scales averaged. Note: IF SIGTEST=1, then DOF can be a vector (same length as SCALEs), in which case NA is assumed to vary with SCALE. This allows one to average different numbers of times together at different scales, or to take into account things like the Cone of Influence. See discussion following Eqn (23) in Torrence & Compo. GWS = global wavelet spectrum. If input then this is used as the theoretical background spectrum, rather than white or red noise. CONFIDENCE = if set, then return a Confidence INTERVAL. For SIGTEST=0,2 this will be two numbers, the lower & upper. For SIGTEST=1, this will return an array (J+1)x2, where J+1 is the number of scales. OPTIONAL KEYWORD OUTPUTS: PERIOD = the vector of "Fourier" periods (in time units) that corresponds to the SCALEs. FFT_THEOR = output theoretical red-noise spectrum as fn of PERIOD.
Routines
top source wave_signif
result = wave_signif(y, dt, scale, sigtest, MOTHER=MOTHER, PARAM=PARAM, LAG1=LAG1, SIGLVL=SIGLVL, DOF=DOF, GWS=GWS, CONFIDENCE=CONFIDENCE, FFT_THEOR=FFT_THEOR, PERIOD=PERIOD, SAVG=SAVG, SMID=SMID, CDELTA=CDELTA, PSI0=PSI0)
Parameters
- y
- dt
- scale
- sigtest
Keywords
- MOTHER
- PARAM
- LAG1
- SIGLVL
- DOF
- GWS
- CONFIDENCE
- FFT_THEOR
- PERIOD
- SAVG
- SMID
- CDELTA
- PSI0
File attributes
Modification date: | Thu Feb 13 16:43:12 2014 |
Lines: | 113 |