IDAC is a suite of functions to
- Generate a synthetic dataset by propagating a variety of source time functions through realistic atmospheres
- Classify infrasound signals by training machine learning (ML) models
- Predict real (or synthetic) data in near real time
The motivation of the repository was to identify large nuclear blast waves from single sensor infrasound microphones but other applications including volcano monitoring are feasable.
IDAC depends on a number of softwares and codes. Testing is currently focusing on linux and mac os systems.
The software AVOG2S generates atmospheres using climatological and reanalysis models. AVOG2S can be installed easily on Linux and Mac Os via git and homebrew.
- First install git (only needed once, if not already installed):
sudo apt-get install git
- install homebrew by typing (only needed once, if not already installed):
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
2b. add brew to your PATH:
echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> ~/.bash_profile eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
- tap the Alaskan Volcano Observatories's (AVO) repository (only needed once)
brew tap ibrewster/avo
- install the AVOG2S formula using homebrew
brew install avog2s
NCPAProp is used to propagate source time functions (e.g. blast waves) through the modeled atmospheres.
NCPAProp relies on several libraries, which must be downloaded and compiled by source.
First download the FFTW library and extract the tar.gz file to a temporary directory (e.g. Desktop). Then open a terminal and cd
to the extracted files and run:
./configure
make
make install
Note you may need sudo privalges to install.
Second we need download the latest version of GSL. After download, extract the files to a temporary directory (e.g. Desktop).
To install NCPAProp:
-
Download the NCPAProp software from its github repo: NCPAprop
-
Open a terminal and
cd
into the directory where the code was downloaded and run./configure
with appropriate parameters. We recommend the following parameters, which install required PETSc and SLEPc libraries locally within the ncpaprop installation:
./configure --with-localpetsc --enable-autodependencies
For more information on how to use ./configure
see the NCPAprop manual and search for /configure or installation overview. As a side note, the NCPAprop manual is a wonderful reference to better understand how waveforms are propagated.
- Run
make
Idac is a python module, meaning it can (and should) be imported directly to a python environment (e.g. import idac as ida
).
First navigate to the IDAC repository and download the source code. There are numerous ways to do this, the easiest being to click on the green "code" button > 'Download Zip'. Then, unzip the module in an appropriate directory. For example, "python_modules" or "github_packages" are good directory names if you have other python/github projects. We do not recommend unpacking to your "Desktop" or other similar temporary locations.
Before installing IDAC, we must ensure the environment is set up correctly.
IDAC requires several python modules, which are listed below. The easiest way to install these dependencies is to build the environment from either the idac_linux_environment.yml or idac_mac_environment file in the root directory of the idac repository.
To build the environment from a .yml file, make sure you have conda installed, then from the idac_linux_environment.yml file:
- Open a terminal and
cd
into the directory where the idac repo is downloaded. - build the environment with:
conda env create -f idac_linux_environment.yml
- After building the environment, be sure to activate it with:
conda activate idac
If you are running a different operating system, or you prefer to build the environment manually:
- Create an environment with the 'correct' version of python
conda create --name idac python=3.5
- Install obspy with:
conda install obspy
- Install pandas with:
conda install pandas
- Install scikitlearn with
conda install scikit-learn
Once the environment has been set-up, we can install IDAC using pip. First activate the idac environment:
conda activate idac
Then install the module with pip:
pip install /path/to/idac/directory
The following tutorial walks you through a simple case 'start to finish' workflow, which highlights the functionality of IDAC. WARNING, IDAC functions typically write files to your local disk. If care isn't taken, IDAC can write many GBs of data and fill up your disk space.