TimeCache, BeamformerTime, TimePower, BeamformerCMF, \ BeamformerCapon, BeamformerMusic, BeamformerDamas, BeamformerClean, \ BeamformerFunctional from numpy import zeros from os import path from pylab import figure, subplot, imshow, show, colorbar, title dataFile = 'example_data.h5' calibFile = 'example_calib.xml' micGeoFile = path.join(path.split(acoular.__file__)[0], 'xml', 'array_56.xml') freqInt = 4000 t1 = MaskedTimeSamples(name = dataFile) t1.start = 0 t1.stop = 16000 invalid = [1, 7] t1.invalid_channels = invalid t1.calib = Calib(from_file = calibFile) m = MicGeom(from_file = micGeoFile) m.invalid_channels = invalid g = RectGrid(x_min = -0.6, x_max = -0.0, y_min = -0.3, y_max = 0.3, z = 0.68, increment = 0.05) f = EigSpectra(time_data = t1, window = 'Hanning', overlap = '50%', block_size = 128, ind_low = 7, ind_high = 15)
# files datafile = 'example_data.h5' calibfile = 'example_calib.xml' micgeofile = path.join( path.split(acoular.__file__)[0],'xml','array_56.xml') #octave band of interest cfreq = 4000 #=============================================================================== # first, we define the time samples using the MaskedTimeSamples class # alternatively we could use the TimeSamples class that provides no masking # of channels and samples #=============================================================================== t1 = MaskedTimeSamples(name=datafile) t1.start = 0 # first sample, default t1.stop = 16000 # last valid sample = 15999 invalid = [1,7] # list of invalid channels (unwanted microphones etc.) t1.invalid_channels = invalid #=============================================================================== # calibration is usually needed and can be set directly at the TimeSamples # object (preferred) or for frequency domain processing at the PowerSpectra # object (for backwards compatibility) #=============================================================================== t1.calib = Calib(from_file=calibfile) #=============================================================================== # the microphone geometry must have the same number of valid channels as the # TimeSamples object has #=============================================================================== m = MicGeom(from_file=micgeofile)
# other imports from numpy import zeros from os import path from pylab import figure, subplot, imshow, show, colorbar, title, tight_layout # files datafile = 'sammy.csv' #calibfile = 'example_calib.xml' micgeofile = path.join(path.split(acoular.__file__)[0], 'xml', 'array_64.xml') #octave band of interest cfreq = 4000 t1 = MaskedTimeSamples(name=datafile) t1.start = 0 t1.stop = 16000 invalid = [1, 7] t1.invalid_channels = invalid m = MicGeom(from_file=micgeofile) m.invalid_channels = invalid g = RectGrid(x_min=-0.6, x_max=-0.0, y_min=-0.3, y_max=0.3, z=0.68, increment=0.05) f = PowerSpectra(time_data=t1, window='Hanning', overlap='50%', block_size=128,