infresnel is a Python package which facilitates computation of the Fresnel number for infrasound applications — specifically, propagation over topography at local to regional scales.
The dimensionless Fresnel number
These are simple equations, but the practical computation of the quantity
-
Obtain
git clone https://github.com/liamtoney/infresnel.git cd infresnel
-
Create environment, install, and activate (install conda first, if necessary)
conda env create conda activate infresnel
-
Run using the Python interpreter
python >>> from infresnel import calculate_paths
Interactive API reference documentation for infresnel can be found here.
Additionally, several interactive notebooks containing usage examples are
included in notebooks
. To open the notebooks, with your conda
environment activated run
jupyter lab notebooks
Alternatively, you can run these notebooks in your browser — without installing infresnel — by navigating to the project's Binder.
infresnel calculates path length differences using elevation profiles. This means that all diffraction is assumed to take place in the vertical plane between source and receiver. One can easily construct scenarios where this assumption is violated. For example, consider a column of rock much taller than it is wide, located directly between source and receiver. For this scenario, infresnel would predict a large path length difference for waves traveling over the top of the column — but in reality, wavefronts diffract laterally around the column. The true travel time from source to receiver is thus much smaller than what infresnel predicts for this scenario.
If you use infresnel in research that leads to a published manuscript, please cite the tool:
Toney, L. (2024). infresnel (v0.3.0). Zenodo. https://doi.org/10.5281/zenodo.11176356
To cite a previous version of infresnel, go to the Zenodo page, select the version, and use the "Cite as" tool there.
infresnel's dependencies are:
- colorcet (for perceptually accurate colormaps to use in the creation of GeoTIFF path length difference grids)
- ipympl
- ipywidgets
- joblib (for parallel processing)
- JupyterLab (for running the
interactive
.ipynb
notebooks) - Matplotlib (for applying colormaps to GeoTIFFs and for generally plotting results)
- Numba (for computational acceleration)
- pip
- PyGMT (for simplified SRTM data downloading and caching)
- rioxarray (for DEM file I/O, reprojection, and elevation profile interpolation)
- tqdm (for displaying progress bars)
These dependencies are listed in environment.yml
, and they are
installed in step 2 above.
You might want to install infresnel into an existing conda environment, instead of making a new one. In this case, after step 1 above run
conda activate <existing_environment>
pip install --editable .
which uses pip to install infresnel's dependencies, if you don't already have them installed in your existing environment.
In either case, your installation will be "editable." This means that you can modify the
source code in your local infresnel
directory — or run a git pull
to update with
any new remote changes — and the installed package will be updated. To instead use a
specific release of infresnel, run
git switch -d vX.Y.Z
between steps 1 and 2, where vX.Y.Z
is the release version (e.g., v0.1.0
). You can
switch back with git switch main
.
If you notice a bug with infresnel (or if you'd like to request/propose a new
feature), please
create an issue on GitHub
(preferred) or email me at liam@liam.earth
. You are also
welcome to create a
pull request.
To install infresnel's development packages, with your conda environment activated run
pip install --requirement requirements.txt
nbdime config-git --enable # Configure Jupyter Notebook diffs
Fee, D., Toney, L., Kim, K., Sanderson, R. W., Iezzi, A. M., Matoza, R. S., De Angelis, S., Jolly, A. D., Lyons, J. J., & Haney, M. (2021). Local explosion detection and infrasound localization by reverse time migration using 3-D finite-difference wave propagation. Frontiers in Earth Science, 9. https://doi.org/10.3389/feart.2021.620813
Maher, S. P., Matoza, R. S., de Groot-Hedlin, C., Kim, K., & Gee, K. L. (2021). Evaluating the applicability of a screen diffraction approximation to local volcano infrasound. Volcanica, 4(1), 67–85. https://doi.org/10.30909/vol.04.01.6785
This work was supported by the Nuclear Arms Control Technology (NACT) program at the Defense Threat Reduction Agency (DTRA). Cleared for release.