Skip to content

Commit

Permalink
fix examples
Browse files Browse the repository at this point in the history
  • Loading branch information
s5suzuki committed Feb 10, 2025
1 parent 0c53399 commit cd17153
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion example/modulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def f(autd: Recorder) -> None:
plt.show()

# plot sound pressure at focus under 200Hz sin modulation with silencer
focus = emulator.center + np.array([0.0, 0.0, 150.0])
focus = emulator.center() + np.array([0.0, 0.0, 150.0])

def f(autd: Recorder) -> None:
autd.send(Silencer())
Expand Down
4 changes: 2 additions & 2 deletions example/rms.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

def plot_focus() -> None:
with Emulator([AUTD3(pos=[0.0, 0.0, 0.0], rot=[1.0, 0.0, 0.0, 0.0])]) as emulator:
focus = emulator.center + np.array([0.0, 0.0, 150.0])
focus = emulator.center() + np.array([0.0, 0.0, 150.0])

def f(autd: Recorder) -> None:
autd.send(Silencer.disable())
Expand Down Expand Up @@ -67,7 +67,7 @@ def f(autd: Recorder) -> None:

def plot_stm() -> None:
with Emulator([AUTD3(pos=[0.0, 0.0, 0.0], rot=[1.0, 0.0, 0.0, 0.0])]) as emulator:
focus = emulator.center + np.array([0.0, 0.0, 150.0])
focus = emulator.center() + np.array([0.0, 0.0, 150.0])

def f(autd: Recorder) -> None:
autd.send(Silencer())
Expand Down
4 changes: 2 additions & 2 deletions example/sound_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

def plot_focus() -> None:
with Emulator([AUTD3(pos=[0.0, 0.0, 0.0], rot=[1.0, 0.0, 0.0, 0.0])]) as emulator:
focus = emulator.center + np.array([0.0, 0.0, 150.0])
focus = emulator.center() + np.array([0.0, 0.0, 150.0])

def f(autd: Recorder) -> None:
autd.send(Silencer.disable())
Expand Down Expand Up @@ -92,7 +92,7 @@ def anim(i: int): # noqa: ANN202

def plot_stm() -> None:
with Emulator([AUTD3(pos=[0.0, 0.0, 0.0], rot=[1.0, 0.0, 0.0, 0.0])]) as emulator:
focus = emulator.center + np.array([0.0, 0.0, 150.0])
focus = emulator.center() + np.array([0.0, 0.0, 150.0])

def f(autd: Recorder) -> None:
autd.send(Silencer())
Expand Down

0 comments on commit cd17153

Please sign in to comment.