Exemplo n.º 1
0
def fbeamformers():
    bb = BeamformerBase(freq_data=f, steer=st, r_diag=True, cached=False)
    be = BeamformerEig(freq_data=f, steer=st, r_diag=True, n=54, cached=False)

    #frequency beamformers to test
    bbase = BeamformerBase(freq_data=f, steer=st, r_diag=True, cached=False)
    bc = BeamformerCapon(freq_data=f, steer=st, cached=False)
    beig = BeamformerEig(freq_data=f,
                         steer=st,
                         r_diag=True,
                         n=54,
                         cached=False)
    bm = BeamformerMusic(freq_data=f, steer=st, n=6, cached=False)
    bd = BeamformerDamas(beamformer=bb, n_iter=10, cached=False)
    bdp = BeamformerDamasPlus(beamformer=bb, n_iter=100, cached=False)
    bo = BeamformerOrth(beamformer=be,
                        eva_list=list(range(38, 54)),
                        cached=False)
    bs = BeamformerCleansc(freq_data=f, steer=st, r_diag=True, cached=False)
    bcmf = BeamformerCMF(freq_data=f,
                         steer=st,
                         method='LassoLarsBIC',
                         cached=False)
    bl = BeamformerClean(beamformer=bb, n_iter=10, cached=False)
    bf = BeamformerFunctional(freq_data=f,
                              steer=st,
                              r_diag=False,
                              gamma=3,
                              cached=False)
    bgib = BeamformerGIB(freq_data=f,
                         steer=st,
                         method='LassoLars',
                         n=2,
                         cached=False)
    return (bbase, bc, beig, bm, bl, bo, bs, bd, bcmf, bf, bdp, bgib)
Exemplo n.º 2
0
    time_data=t1,
    window='Hanning',
    overlap='50%',
    block_size=128,  #FFT-parameters
    ind_low=8,
    ind_high=16)  #to save computational effort, only
# frequencies with indices 8..15 are used

#===============================================================================
# different beamformers in frequency domain
#===============================================================================
bb = BeamformerBase(freq_data=f, grid=g, mpos=m, r_diag=True, c=346.04)
bc = BeamformerCapon(freq_data=f, grid=g, mpos=m, c=346.04, cached=False)
be = BeamformerEig(freq_data=f, grid=g, mpos=m, r_diag=True, c=346.04, n=54)
bm = BeamformerMusic(freq_data=f, grid=g, mpos=m, c=346.04, n=6)
bd = BeamformerDamas(beamformer=bb, n_iter=100)
bo = BeamformerOrth(beamformer=be, eva_list=list(range(38, 54)))
bs = BeamformerCleansc(freq_data=f, grid=g, mpos=m, r_diag=True, c=346.04)
bcmf = BeamformerCMF(freq_data=f, grid=g, mpos=m, c=346.04, \
    method='LassoLarsBIC')
bl = BeamformerClean(beamformer=bb, n_iter=100)
bf = BeamformerFunctional(freq_data=f, grid=g, mpos=m, r_diag=False, c=346.04, \
    gamma=4)

#===============================================================================
# plot result maps for different beamformers in frequency domain
#===============================================================================
figure(1, (10, 6))
i1 = 1  #no of subplot
for b in (bb, bc, be, bm, bl, bo, bs, bd, bcmf, bf):
    subplot(3, 4, i1)
Exemplo n.º 3
0
env = Environment(c=346.04)

st = SteeringVector(grid=g, mics=m, env=env)

f = PowerSpectra(
    time_data=t1,
    window='Hanning',
    overlap='50%',
    block_size=128,  #FFT-parameters
    cached=False)  #cached = False

bb = BeamformerBase(freq_data=f, steer=st, r_diag=True, cached=False)
bc = BeamformerCapon(freq_data=f, steer=st, cached=False)
be = BeamformerEig(freq_data=f, steer=st, r_diag=True, n=54, cached=False)
bm = BeamformerMusic(freq_data=f, steer=st, n=6, cached=False)
bd = BeamformerDamas(beamformer=bb, n_iter=100, cached=False)
bdp = BeamformerDamasPlus(beamformer=bb, n_iter=100, cached=False)
bo = BeamformerOrth(beamformer=be, eva_list=list(range(38, 54)), cached=False)
bs = BeamformerCleansc(freq_data=f, steer=st, r_diag=True, cached=False)
bcmf = BeamformerCMF(freq_data=f,
                     steer=st,
                     method='LassoLarsBIC',
                     cached=False)
bl = BeamformerClean(beamformer=bb, n_iter=100, cached=False)
bf = BeamformerFunctional(freq_data=f,
                          steer=st,
                          r_diag=False,
                          gamma=4,
                          cached=False)
bgib = BeamformerGIB(freq_data=f,
                     steer=st,
Exemplo n.º 4
0
psf32Res = psf32.psf[:]

psf64 = PointSpreadFunction(grid=g, mpos=m, c=346.04, precision='float64')
psf64Res = psf64.psf[:]

bb32 = BeamformerBase(freq_data=f, grid=g, mpos=m, r_diag=True, c=346.04, precision='float32')
bb32Res = bb32.synthetic(cfreq,1)

bb64 = BeamformerBase(freq_data=f, grid=g, mpos=m, r_diag=True, c=346.04, precision='float64')
bb64Res = bb64.synthetic(cfreq,1)

bf = BeamformerFunctional(freq_data=f, grid=g, mpos=m, r_diag=False, c=346.04, gamma = 60, precision='float32')
bfRes = bf.synthetic(cfreq,1)

# 32 Bit PSF precision
bd3232 = BeamformerDamas(beamformer=bb32, n_iter=100, psf_precision='float32')
bd3232Res = bd3232.synthetic(cfreq,1)
bc3232 = BeamformerClean(beamformer=bb32, psf_precision='float32')
bc3232Res = bc3232.synthetic(cfreq,1)
bdp3232 = BeamformerDamasPlus(beamformer=bb32, n_iter=100, psf_precision='float32')
bdp3232Res  = bdp3232.synthetic(cfreq,1)

#64 Bit
bd3264 = BeamformerDamas(beamformer=bb32, n_iter=100, psf_precision='float64')
bd3264Res = bd3264.synthetic(cfreq,1)
bc3264 = BeamformerClean(beamformer=bb32, psf_precision='float64')
bc3264Res = bc3264.synthetic(cfreq,1)
bdp3264 = BeamformerDamasPlus(beamformer=bb32, n_iter=100, psf_precision='float64')
bdp3264Res  = bdp3264.synthetic(cfreq,1)

# 32 Bit PSF precision
bcpsf3Rem = BeamformerClean(beamformer=bb3Rem)
bcpsf4Rem = BeamformerClean(beamformer=bb4Rem)
bcpsf1Full = BeamformerClean(beamformer=bb1Full)
bcpsf2Full = BeamformerClean(beamformer=bb2Full)
bcpsf3Full = BeamformerClean(beamformer=bb3Full)
bcpsf4Full = BeamformerClean(beamformer=bb4Full)
Lbcpsf1Rem = L_p(bcpsf1Rem.synthetic(4000, 1))
Lbcpsf2Rem = L_p(bcpsf2Rem.synthetic(4000, 1))
Lbcpsf3Rem = L_p(bcpsf3Rem.synthetic(4000, 1))
Lbcpsf4Rem = L_p(bcpsf4Rem.synthetic(4000, 1))
Lbcpsf1Full = L_p(bcpsf1Full.synthetic(4000, 1))
Lbcpsf2Full = L_p(bcpsf2Full.synthetic(4000, 1))
Lbcpsf3Full = L_p(bcpsf3Full.synthetic(4000, 1))
Lbcpsf4Full = L_p(bcpsf4Full.synthetic(4000, 1))

bd1Rem = BeamformerDamas(beamformer=bb1Rem, n_iter=100)
bd2Rem = BeamformerDamas(beamformer=bb2Rem, n_iter=100)
bd3Rem = BeamformerDamas(beamformer=bb3Rem, n_iter=100)
bd4Rem = BeamformerDamas(beamformer=bb4Rem, n_iter=100)
bd1Full = BeamformerDamas(beamformer=bb1Full, n_iter=100)
bd2Full = BeamformerDamas(beamformer=bb2Full, n_iter=100)
bd3Full = BeamformerDamas(beamformer=bb3Full, n_iter=100)
bd4Full = BeamformerDamas(beamformer=bb4Full, n_iter=100)
Lbd1Rem = L_p(bd1Rem.synthetic(4000, 1))
Lbd2Rem = L_p(bd2Rem.synthetic(4000, 1))
Lbd3Rem = L_p(bd3Rem.synthetic(4000, 1))
Lbd4Rem = L_p(bd4Rem.synthetic(4000, 1))
Lbd1Full = L_p(bd1Full.synthetic(4000, 1))
Lbd2Full = L_p(bd2Full.synthetic(4000, 1))
Lbd3Full = L_p(bd3Full.synthetic(4000, 1))
Lbd4Full = L_p(bd4Full.synthetic(4000, 1))
bcpsf3Rem = BeamformerClean(beamformer=bb3Rem)
bcpsf4Rem = BeamformerClean(beamformer=bb4Rem)
bcpsf1Full = BeamformerClean(beamformer=bb1Full)
bcpsf2Full = BeamformerClean(beamformer=bb2Full)
bcpsf3Full = BeamformerClean(beamformer=bb3Full)
bcpsf4Full = BeamformerClean(beamformer=bb4Full)
Lbcpsf1Rem = L_p(bcpsf1Rem.synthetic(4000,1))
Lbcpsf2Rem = L_p(bcpsf2Rem.synthetic(4000,1))
Lbcpsf3Rem = L_p(bcpsf3Rem.synthetic(4000,1))
Lbcpsf4Rem = L_p(bcpsf4Rem.synthetic(4000,1))
Lbcpsf1Full = L_p(bcpsf1Full.synthetic(4000,1))
Lbcpsf2Full = L_p(bcpsf2Full.synthetic(4000,1))
Lbcpsf3Full = L_p(bcpsf3Full.synthetic(4000,1))
Lbcpsf4Full = L_p(bcpsf4Full.synthetic(4000,1))

bd1Rem = BeamformerDamas(beamformer=bb1Rem, n_iter=100)
bd2Rem = BeamformerDamas(beamformer=bb2Rem, n_iter=100)
bd3Rem = BeamformerDamas(beamformer=bb3Rem, n_iter=100)
bd4Rem = BeamformerDamas(beamformer=bb4Rem, n_iter=100)
bd1Full = BeamformerDamas(beamformer=bb1Full, n_iter=100)
bd2Full = BeamformerDamas(beamformer=bb2Full, n_iter=100)
bd3Full = BeamformerDamas(beamformer=bb3Full, n_iter=100)
bd4Full = BeamformerDamas(beamformer=bb4Full, n_iter=100)
Lbd1Rem = L_p(bd1Rem.synthetic(4000,1))
Lbd2Rem = L_p(bd2Rem.synthetic(4000,1))
Lbd3Rem = L_p(bd3Rem.synthetic(4000,1))
Lbd4Rem = L_p(bd4Rem.synthetic(4000,1))
Lbd1Full = L_p(bd1Full.synthetic(4000,1))
Lbd2Full = L_p(bd2Full.synthetic(4000,1))
Lbd3Full = L_p(bd3Full.synthetic(4000,1))
Lbd4Full = L_p(bd4Full.synthetic(4000,1))