nappy/contrib/aircraft/aircraftData.py
def _subSampleBySelection(self, var, timeVar, flagVar, samplingRate, flagsToUse):
        """
        Returns a new variable which is 'var' sub-sampled by selecting the value
        at the given samplingRate with data selected according to flagVar
        including the flag values  specified in flagsToUse (defaults are 0 and 1).
        """
        if samplingRate!=1:
            raise "Sampling rates of values other than 1Hz are not yet supported."
        maskedArray=self._getMaskedArray(var[:,0](squeeze=1), flagVar[:,0](squeeze=1), flagsToUse)
        # Now re-construct variable axes etc
        newTimeAxis=self._flatten2DTimeAxis(timeVar, samplingRate)
        newVar=self._recreateVariable(var, maskedArray, newTimeAxis, flagVar, max(flagsToUse), missingValue=maskedArray.fill_value(), sampleBy="selection")
        return newVar

        Returns a new variable which is 'var' sub-sampled by selecting the value
        at the given samplingRate with data selected according to flagVar
        including the flag values  specified in flagsToUse (defaults are 0 and 1).
        
Returns a new variable which is 'var' sub-sampled by selecting the value
at the given samplingRate with data selected according to flagVar
including the flag values  specified in flagsToUse (defaults are 0 and 1).
Returns a new variable which is ' var ' sub - sampled by selecting the value at the given samplingRate with data selected according to flagVar including the flag values specified in flagsToUse ( defaults are 0 and 1 ) .
def _subSampleBySelection(self, var, timeVar, flagVar, samplingRate, flagsToUse):
        if samplingRate!=1:
            raise "Sampling rates of values other than 1Hz are not yet supported."
        maskedArray=self._getMaskedArray(var[:,0](squeeze=1), flagVar[:,0](squeeze=1), flagsToUse)
        newTimeAxis=self._flatten2DTimeAxis(timeVar, samplingRate)
        newVar=self._recreateVariable(var, maskedArray, newTimeAxis, flagVar, max(flagsToUse), missingValue=maskedArray.fill_value(), sampleBy="selection")
        return newVar
def _subSampleBySelection ( self , var , timeVar , flagVar , samplingRate , flagsToUse ) : if samplingRate != 1 : raise "Sampling rates of values other than 1Hz are not yet supported." maskedArray = self . _getMaskedArray ( var [ : , 0 ] ( squeeze = 1 ) , flagVar [ : , 0 ] ( squeeze = 1 ) , flagsToUse ) newTimeAxis = self . _flatten2DTimeAxis ( timeVar , samplingRate ) newVar = self . _recreateVariable ( var , maskedArray , newTimeAxis , flagVar , max ( flagsToUse ) , missingValue = maskedArray . fill_value ( ) , sampleBy = "selection" ) return newVar
Returns a new variable which is 'var' sub-sampled by selecting the value
at the given samplingRate with data selected according to flagVar
including the flag values  specified in flagsToUse (defaults are 0 and 1).
Returns a new variable which is ' var ' sub - sampled by selecting the value at the given samplingRate with data selected according to flagVar including the flag values specified in flagsToUse ( defaults are 0 and 1 ) .
"""
        Returns a new variable which is 'var' sub-sampled by selecting the value
        at the given samplingRate with data selected according to flagVar
        including the flag values  specified in flagsToUse (defaults are 0 and 1).
        """ # Now re-construct variable axes etc
self
var
timeVar
flagVar
samplingRate
flagsToUse