org-arl / arlpy

ARL Python Tools
BSD 3-Clause "New" or "Revised" License
118 stars 37 forks source link

AttributeError: bf.steering() is missing #61

Closed delvingdeep closed 3 years ago

delvingdeep commented 3 years ago

I am using latest version 1.7.0, and trying to follow an example for Barlett Beampattern from the official documentation page.

from arlpy import bf
import numpy as np
sd = bf.steering(np.linspace(0, 5, 11), 1500, np.linspace(-np.pi/2, np.pi/2, 181))
bp = bf.bartlett_beampattern(90, 1500, sd, show=True)

There I see usage of bf.steering() for calculating sd but when I try to run it on my local computer it throws an error:

AttributeError: module 'arlpy.bf' has no attribute 'steering'

Also the documents notes from April 2020 contains the same example, but doesn't provide definition for bf.steering. Page 16 : https://arlpy.readthedocs.io/_/downloads/en/latest/pdf/

mchitre commented 3 years ago

Thanks for pointing out the outdated documentation. it should be bf.steering_plane_wave() instead of bf.steering().

I've fixed it in commit a7a834b, so it'll get updated in the next release.