#=============================================================================== # beamformers in frequency domain #=============================================================================== b = BeamformerCMF(freq_data=f, grid=g, mpos=m, c=346.04, alpha=1e-8) #=============================================================================== # plot result maps for different beamformers in frequency domain #=============================================================================== figure(1) #no of figure i1 = 1 #no of subplot from time import time for method in ('LassoLars', 'LassoLarsBIC', \ 'OMPCV', 'NNLS'): b.method = method subplot(2, 2, i1) i1 += 1 ti = time() map = b.synthetic(cfreq, 1) print time() - ti mx = L_p(map.max()) imshow(L_p(map.T), vmax=mx, vmin=mx - 15, interpolation='nearest', extent=g.extend()) colorbar() title(b.method) show()
Lbort3Rem = L_p(bort3Rem.synthetic(4000,1)) Lbort4Rem = L_p(bort4Rem.synthetic(4000,1)) Lbort1Full = L_p(bort1Full.synthetic(4000,1)) Lbort2Full = L_p(bort2Full.synthetic(4000,1)) Lbort3Full = L_p(bort3Full.synthetic(4000,1)) Lbort4Full = L_p(bort4Full.synthetic(4000,1)) bcmf1Rem = BeamformerCMF(freq_data=f, grid=g, mpos=m, r_diag=True, c=346.04, steer='classic') bcmf2Rem = BeamformerCMF(freq_data=f, grid=g, mpos=m, r_diag=True, c=346.04, steer='inverse') bcmf3Rem = BeamformerCMF(freq_data=f, grid=g, mpos=m, r_diag=True, c=346.04, steer='true level') bcmf4Rem = BeamformerCMF(freq_data=f, grid=g, mpos=m, r_diag=True, c=346.04, steer='true location') bcmf1Full = BeamformerCMF(freq_data=f, grid=g, mpos=m, r_diag=False, c=346.04, steer='classic') bcmf2Full = BeamformerCMF(freq_data=f, grid=g, mpos=m, r_diag=False, c=346.04, steer='inverse') bcmf3Full = BeamformerCMF(freq_data=f, grid=g, mpos=m, r_diag=False, c=346.04, steer='true level') bcmf4Full = BeamformerCMF(freq_data=f, grid=g, mpos=m, r_diag=False, c=346.04, steer='true location') Lbcmf1Rem = L_p(bcmf1Rem.synthetic(4000,1)) Lbcmf2Rem = L_p(bcmf2Rem.synthetic(4000,1)) Lbcmf3Rem = L_p(bcmf3Rem.synthetic(4000,1)) Lbcmf4Rem = L_p(bcmf4Rem.synthetic(4000,1)) Lbcmf1Full = L_p(bcmf1Full.synthetic(4000,1)) Lbcmf2Full = L_p(bcmf2Full.synthetic(4000,1)) Lbcmf3Full = L_p(bcmf3Full.synthetic(4000,1)) Lbcmf4Full = L_p(bcmf4Full.synthetic(4000,1)) ##============================================================================== ## There are various variations to calculate the psf: Need to be checked individually ## #psfSingle = PointSpreadFunction(grid=g, mpos=m, calcmode='single') ## #LPsfSingle = L_p(psfSingle.psf[:]) ## ## #psfBlock = PointSpreadFunction(grid=g, mpos=m, calcmode='block') ## #LPsfBlock = L_p(psfBlock.psf[:])
r_diag=False, c=346.04, steer='inverse') bcmf3Full = BeamformerCMF(freq_data=f, grid=g, mpos=m, r_diag=False, c=346.04, steer='true level') bcmf4Full = BeamformerCMF(freq_data=f, grid=g, mpos=m, r_diag=False, c=346.04, steer='true location') Lbcmf1Rem = L_p(bcmf1Rem.synthetic(4000, 1)) Lbcmf2Rem = L_p(bcmf2Rem.synthetic(4000, 1)) Lbcmf3Rem = L_p(bcmf3Rem.synthetic(4000, 1)) Lbcmf4Rem = L_p(bcmf4Rem.synthetic(4000, 1)) Lbcmf1Full = L_p(bcmf1Full.synthetic(4000, 1)) Lbcmf2Full = L_p(bcmf2Full.synthetic(4000, 1)) Lbcmf3Full = L_p(bcmf3Full.synthetic(4000, 1)) Lbcmf4Full = L_p(bcmf4Full.synthetic(4000, 1)) ##============================================================================== ## There are various variations to calculate the psf: Need to be checked individually ## #psfSingle = PointSpreadFunction(grid=g, mpos=m, calcmode='single') ## #LPsfSingle = L_p(psfSingle.psf[:]) ## ## #psfBlock = PointSpreadFunction(grid=g, mpos=m, calcmode='block') ## #LPsfBlock = L_p(psfBlock.psf[:])
ind_low=15, ind_high=31) #to save computational effort, only # frequencies with index 15-31 are used #=============================================================================== # beamformers in frequency domain #=============================================================================== b = BeamformerCMF(freq_data=f, grid=g, mpos=m, c=346.04, alpha=1e-8) #=============================================================================== # plot result maps for different beamformers in frequency domain #=============================================================================== figure(1) #no of figure i1 = 1 #no of subplot from time import time for method in ('LassoLars', 'LassoLarsBIC', \ 'OMPCV', 'NNLS'): b.method = method subplot(2,2,i1) i1 += 1 ti = time() map = b.synthetic(cfreq,1) print time()-ti mx = L_p(map.max()) imshow(L_p(map.T), vmax=mx, vmin=mx-15, interpolation='nearest', extent=g.extend()) colorbar() title(b.method) show()