Point Spread Function

89 views
Skip to first unread message

Sri Chaitanya Durga Prasad Mojjada

unread,
Sep 14, 2022, 10:21:16 AM9/14/22
to Acoular-users
Hello,

I'm knew to acoular, I would like to plot Point Spread Function to understand the behaviour of the mic array.
Can anyone help me how to use PointSpreadFunction class in acoular , or is there a way to plot the psf and look at the values of Psf?

Thanks & Regards,
Chaitanya

Gert Herold

unread,
Sep 14, 2022, 1:01:07 PM9/14/22
to Acoular-users
# Here is an example of plotting a PSF generated with a circular mic array geometry for 3 frequencies and at the center point of a rectangular grid.
# Hope this helps :)

from pylab import *
from acoular import *
config.global_caching = "none"


m = MicGeom()
phi = linspace(0,2*pi,16, endpoint=False)
m.mpos_tot = array([1.1*cos(phi),1.1*sin(phi),0*phi])

g = RectGrid(x_min=-4., x_max=4.,
             y_min=-4., y_max=4.,
             z=1.0, increment=0.1)

env = Environment(c=343.)

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


index_point = g.size//2
p = PointSpreadFunction(steer=sv, calcmode = 'single',
                        grid_indices=[index_point])


for i,f in enumerate([200, 500, 1000]):
    figure(i)
    p.freq = f
   
    mapLp = L_p(p.psf).reshape(g.shape)
    mx = mapLp.max()
   
    imshow(mapLp, vmax=mx, vmin=mx-20,
           origin='lower', extent=g.extend())
    colorbar()
   
show()


Sri Chaitanya Durga Prasad Mojjada

unread,
Sep 16, 2022, 12:49:51 AM9/16/22
to Acoular-users
Hi Mr.Gert,

Thank you so much for your response.
It helped a lot.

Regards,
Chaitanya

Reply all
Reply to author
Forward
0 new messages