-
Notifications
You must be signed in to change notification settings - Fork 47
Examples
Austin A Holland edited this page Jun 20, 2016
·
8 revisions
All examples will run from a clone of PhasePApy. You simply go to the examples directory and run the python scripts. You must of course have the required libraries. The examples have been tested using python3, but have not been verified using python2 yet.
cd examples
python example_fbpicker.py
This example uses data for an earthquake in Oklahoma with waveform data downloaded from IRIS. It demonstrates establishing a picker object that can be applied consistently to multiple channels of data. The example creates 3 plots for each channel of data. You can turn off particular plots by commenting out the appropriate lines of code.

picks: [UTCDateTime(2016, 6, 9, 11, 15, 34, 710000)]
polarity: ['D']
signal to noise ratio: [ 26.6]
uncertainty: [ 0.02]
...```
### AICDPicker Example
Uses the vertical channel for the same data used in the FBPicker example.
'''python example_aicpicker.py```
### KTPicker Example
Uses the vertical channel for the same data used in the FBPicker example.
```python example_ktpicker.py```
## Associator Examples
Because the associator requires additional software to calculate travel-time tables, we have
included a data directory that includes travel-time tables, and the associated data for the
example event in the SRL paper.
The data and traveltime tables reside in ```examples/data_20130616153750/```
### 1D Associator Example
The traveltime table used in this example was calculated using the standard Oklahoma
Geological Survey velocity model (Darold et al., 2015). The stand-alone version of TauP
was used to create a custom velocity model and then travel times for focal depths of 5.0 km.
```python example_example_1dassociator_OK.py```
### TravelTime Tables
We have developed an example script that then demonstrates the 1D associator including
building the 1D traveltime lookup table using a standard velocity model so that one has an
example of how to build traveltime tables appropriate for their own region. More information
on building traveltime tables is at [TTtables](https://github.com/austinholland/PhasePApy/wiki/TTtables).