ocw/utils.py
def calculate_temporal_trends(dataset):
    ''' Calculate temporal trends in dataset.values
    :param dataset: The dataset from which time values should be extracted.
    :type dataset: :class:`dataset.Dataset`

    :returns: Arrays of the temporal trend and standard error
    :rtype: :class:`numpy.ma.core.MaskedArray`
    '''

    nt, ny, nx = dataset.values.shape
    x = np.arange(nt)

    trend = np.zeros([ny, nx])-999.
    slope_err = np.zeros([ny, nx])-999.
    for iy in np.arange(ny):
        for ix in np.arange(nx):
            if dataset.values[:,iy,ix].count() == nt:
                trend[iy,ix], slope_err[iy,ix] = calculate_temporal_trend_of_time_series(
                                               x, dataset.values[:,iy,ix])

    return ma.masked_equal(trend, -999.), ma.masked_equal(slope_err, -999.)
 Calculate temporal trends in dataset.values
    :param dataset: The dataset from which time values should be extracted.
    :type dataset: :class:`dataset.Dataset`

    :returns: Arrays of the temporal trend and standard error
    :rtype: :class:`numpy.ma.core.MaskedArray`
    
Calculate temporal trends in dataset.values
Calculate temporal trends in dataset . values
def calculate_temporal_trends(dataset):
    nt, ny, nx = dataset.values.shape
    x = np.arange(nt)
    trend = np.zeros([ny, nx])-999.
    slope_err = np.zeros([ny, nx])-999.
    for iy in np.arange(ny):
        for ix in np.arange(nx):
            if dataset.values[:,iy,ix].count() == nt:
                trend[iy,ix], slope_err[iy,ix] = calculate_temporal_trend_of_time_series(
                                               x, dataset.values[:,iy,ix])
    return ma.masked_equal(trend, -999.), ma.masked_equal(slope_err, -999.)
def calculate_temporal_trends ( dataset ) : nt , ny , nx = dataset . values . shape x = np . arange ( nt ) trend = np . zeros ( [ ny , nx ] ) - 999. slope_err = np . zeros ( [ ny , nx ] ) - 999. for iy in np . arange ( ny ) : for ix in np . arange ( nx ) : if dataset . values [ : , iy , ix ] . count ( ) == nt : trend [ iy , ix ] , slope_err [ iy , ix ] = calculate_temporal_trend_of_time_series ( x , dataset . values [ : , iy , ix ] ) return ma . masked_equal ( trend , - 999. ) , ma . masked_equal ( slope_err , - 999. )
Calculate temporal trends in dataset.values
Calculate temporal trends in dataset . values
''' Calculate temporal trends in dataset.values
    :param dataset: The dataset from which time values should be extracted.
    :type dataset: :class:`dataset.Dataset`

    :returns: Arrays of the temporal trend and standard error
    :rtype: :class:`numpy.ma.core.MaskedArray`
    '''
Arrays of the temporal trend and standard error
Arrays of the temporal trend and standard error
:class:`numpy.ma.core.MaskedArray`
dataset
The dataset from which time values should be extracted.
The dataset from which time values should be extracted .