|
Imported modules
|
|
import Numeric
import math
import sys
|
|
Functions
|
|
correlation
deunshape
ftest
getneofs
pyclimateversion
ttest
unshape
|
|
|
correlation
|
correlation ( xt, yt )
Returns the correlation of arrays
|
|
|
deunshape
|
deunshape ( array2d, oldshape )
Recover the dimensions of an <unshape()>-ed array.
Arguments:
-
array2d
- 2-dimensional array which dimensions are to be recovered.
-
oldshape
- The shape (a tuple) the array must be returned with.
Returns the array with the specified shape.
|
|
|
ftest
|
ftest (
xa,
xb,
significance=0.05,
)
Two-tailed F-test returning a mask for the significant values
Arguments:
-
xa
- an array with time as first dimension.
-
xb
- another array like
xa. The lenght of the first dimension may differ
but not the others.
Optional arguments:
-
significance
- is the significance level of the t-test
This test is intended to establish if the variances of xa and xb
differ signicatively with a given significance level.
|
|
|
getneofs
|
getneofs ( lbd, percent=70 )
EOF variance percent stopping rule
Argument:
-
lbd
- Numpy 1D array containing the lambdas (eigenvalues) in decreasing
order
Optional Argument:
-
percent
- Percentage of total variance to retain
Returns the number of EOFs to retain to keep at least percent of the
total variance of the field.
|
|
|
pyclimateversion
|
pyclimateversion ()
Returns the currently installed version of PyClimate as a string
|
|
|
ttest
|
ttest (
xa,
xb,
significance=0.05,
)
Performs a t-test returning a mask for the significant values
Arguments:
-
xa
- an array with time as first dimension.
-
xb
- another array like
xa. The lenght of the first dimension may differ
but not the others.
Optional arguments:
-
significance
- is the significance level of the t-test
This test is intended to establish if the mean values of xa and xb
differ significantly with a given significance level. The variances of
the two datasets are assumed to be the same.
|
|
|
unshape
|
unshape ( arraynd, spacelast=1 )
Crashes all but the first dimension of an array in one.
Arguments:
-
arraynd
- N-dimensional NumPy array (N>=2)
-
spacelast
- A bit indicating if the space dimensions are all but
the first (this is the default; 'spacelast'=1) or all
but last
Returns a tuple (array2d, oldshape)
-
array2d
- 2-dimensional array with the first dimension as the
input one and the remaining ones compresed in the
second dimension.
-
oldshape
- Is the shape (a tuple) of <arraynd>. It'll be needed to
recover the shape with <deunshape()>.
|