def _check_decim(info, decim, offset):
 if ((decim < 1) or (decim != int(decim))):
  raise ValueError('decim must be an integer > 0')
 decim = int(decim)
 new_sfreq = (info['sfreq'] / float(decim))
 lowpass = info['lowpass']
 if ((decim > 1) and (lowpass is None)):
  warn(('The measurement information indicates data is not low-pass filtered. The decim=%i parameter will result in a sampling frequency of %g Hz, which can cause aliasing artifacts.' % (decim, new_sfreq)))
 elif ((decim > 1) and (new_sfreq < (2.5 * lowpass))):
  warn(('The measurement information indicates a low-pass frequency of %g Hz. The decim=%i parameter will result in a sampling frequency of %g Hz, which can cause aliasing artifacts.' % (lowpass, decim, new_sfreq)))
 offset = int(offset)
 if (not (0 <= offset < decim)):
  raise ValueError(('decim must be at least 0 and less than %s, got %s' % (decim, offset)))
 return (decim, offset, new_sfreq)

def _check_decim ( info , decim , offset ) : if ( ( decim < 1 ) or ( decim != int ( decim ) ) ) : raise ValueError ( 'decim must be an integer > 0' ) decim = int ( decim ) new_sfreq = ( info [ 'sfreq' ] / float ( decim ) ) lowpass = info [ 'lowpass' ] if ( ( decim > 1 ) and ( lowpass is None ) ) : warn ( ( 'The measurement information indicates data is not low-pass filtered. The decim=%i parameter will result in a sampling frequency of %g Hz, which can cause aliasing artifacts.' % ( decim , new_sfreq ) ) ) elif ( ( decim > 1 ) and ( new_sfreq < ( 2.5 * lowpass ) ) ) : warn ( ( 'The measurement information indicates a low-pass frequency of %g Hz. The decim=%i parameter will result in a sampling frequency of %g Hz, which can cause aliasing artifacts.' % ( lowpass , decim , new_sfreq ) ) ) offset = int ( offset ) if ( not ( 0 <= offset < decim ) ) : raise ValueError ( ( 'decim must be at least 0 and less than %s, got %s' % ( decim , offset ) ) ) return ( decim , offset , new_sfreq )
check decimation parameters .