nappy/contrib/aircraft/aircraftData.py
def _flatten2DTimeAxis(self, timevar, samplingRate):
        """
        Returns a flattened 2D time axis.
        """
        if samplingRate!=1:
            raise "Cannot yet deal with sub-sampling to non 1Hz sampling rates!"

        timevalues=timevar._data
        timeunit=timevar.units
        newTimeValues=[]
        rate=samplingRate

        for t in timevalues:
            for i in range(rate):
                tvalue=t+((1./rate)*i)
                newTimeValues.append(tvalue)

        newTimeAx=cdms.createAxis(newTimeValues)
        newTimeAx.units=timeunit
        newTimeAx.designateTime()
        newTimeAx.id=newTimeAx.long_name=newTimeAx.standard_name="time"
        return newTimeAx

        Returns a flattened 2D time axis.
        
Returns a flattened 2D time axis.
Returns a flattened 2D time axis .
def _flatten2DTimeAxis(self, timevar, samplingRate):
        if samplingRate!=1:
            raise "Cannot yet deal with sub-sampling to non 1Hz sampling rates!"
        timevalues=timevar._data
        timeunit=timevar.units
        newTimeValues=[]
        rate=samplingRate
        for t in timevalues:
            for i in range(rate):
                tvalue=t+((1./rate)*i)
                newTimeValues.append(tvalue)
        newTimeAx=cdms.createAxis(newTimeValues)
        newTimeAx.units=timeunit
        newTimeAx.designateTime()
        newTimeAx.id=newTimeAx.long_name=newTimeAx.standard_name="time"
        return newTimeAx
def _flatten2DTimeAxis ( self , timevar , samplingRate ) : if samplingRate != 1 : raise "Cannot yet deal with sub-sampling to non 1Hz sampling rates!" timevalues = timevar . _data timeunit = timevar . units newTimeValues = [ ] rate = samplingRate for t in timevalues : for i in range ( rate ) : tvalue = t + ( ( 1. / rate ) * i ) newTimeValues . append ( tvalue ) newTimeAx = cdms . createAxis ( newTimeValues ) newTimeAx . units = timeunit newTimeAx . designateTime ( ) newTimeAx . id = newTimeAx . long_name = newTimeAx . standard_name = "time" return newTimeAx
Returns a flattened 2D time axis.
Returns a flattened 2D time axis .
"""
        Returns a flattened 2D time axis.
        """
self
timevar
samplingRate