This is a compilation of code used for generating figures in the following tutorial:
Stanton TK, Lee W-J, Baik K. (2018). Echo statistics associated with discrete scatterers: A tutorial on physics-based methods. The Journal of the Acoustical Society of America, 144(6): 3124–3171. https://doi.org/10.1121/1.5052255.
This tutorial is open-access without restriction directly from the JASA website. Please email the authors if you have trouble accessing the complete tutorial.
Wu-Jung Lee (@leewujung) and Kyungmin Baik (@nupho27) jointly contributed to this repository. The code here are subject to future revisions while a frozen version of the code at the time of publication is available as supplementary materials at the JASA website.
You can get a copy of the code in the following ways:
-
[Preferred] Use
git clone --recurse-submodules https://github.com/leewujung/echo_stat_tutorial
to clone this repo to your local machine.Note the
--recurse-submodules
option because code from another repobroadband-echo-stats
is used as a submodule to plot Figure 23.If you forgot to use this option, run
git submodule init
to initialize your local configuration file, andgit submodule update
to check out the appropriate submodule commit. -
Download the whole repo as a zip file using the "Clone or download" button on the top-right corner of this page.
Note that the folder
broadband-echo-stats
will be empty after you unzip. This is because the folder was a git submodule linked to a separate repo. You can download the content of this folder via this link and put everything under folderbroadband-echo-stats
. (As you can see, using thegit submodule
utility in 1. below is much more straightforward.)
-
The code are tested with Matlab R2017b and use functions in the Signal Processing Toolbox ver7.5 and Parallel Computing Toolbox ver 6.11.
-
Outputs from
figure_12.m
are used in many later code, so make sure to run this first. It will produce a folder./figs/figure_12
which contains beampattern parameters and impulse response for a few different ka values that will be used for plotting other figures. -
Many of these take a while to run because the Monte Carlo simulation samples are generated on the fly by default (and we are taking a brute force approach here without fancy sampling for simplicity). You can opt out of the simulation part by changing a flag (
mc_opt
) in the code if you have previously-calculated samples already. This applies to the following figures: 13, 15-18, 20, 21, and 23. -
figure_13
uses results fromfigure_15
, so don't be alarmed if you get a warning asking you to run it first. -
In the header of the code that generate figures 12-18, 20, 21, and 23, the note "3D distribution of scatterers" indicates that the scatterers are randomly and uniformly distributed within a thin hemispherical shell (half-space), and the note "2D distribution of scatterers" indicates that the scatterers are randomly and uniformly distributed within a thin arc of constant radius in the half-plane containing the MRA of the beam. See Sec. VII.A.2. in the paper for detail.