There is a saying: GUI makes simple tasks simpler and more convenient, while CLI makes complex tasks possible.
This is primary aimed for solving a rather simple task, but without writing even simple scripts at the end user side.
This utility automates the calculation, plotting, and export of Power Spectral Density (PPSD) data from seismic waveform files using ObsPy. It is designed to process many datasets using a simple YAML configuration and parallel execution and has a simple tkinter-based GUI.
- Linux building (?)
- Major refactor to automate all the data and station information collection (?)
- Python 3.8.10+
- ObsPy
- PyYAML
- tqdm
If you are on Windows and don't want to handle any python-related installations, please use the provided binary.
If you are on Linux/MacOS or want to install on Windows using source code you could:
- Create a new venv
- Install dependencies:
pip install -r requirements.txt
- Run
python src\gui.py
The utility uses a YAML file to define how each dataset is processed.
An example configuration is provided in the example folder.
You can pass additional plotting parameters to the PPSD.plot() function from ObsPy.
For the full list of supported options, please refer to the ObsPy documentation.
All these parameters are now visible in the GUI.
Added a possibility to plot a custom RMS noise level on the plot.
You can optionally filter PPSD data by time of day using the time_filter configuration option. This is useful for analyzing noise levels during specific time periods (e.g., daytime vs. nighttime).
Example configuration:
datasets:
- folder: data/station
response: response.xml
channels: [BHZ]
time_filter:
night_start: "22:00" # Start time in HH:MM format
night_stop: "06:00" # End time in HH:MM formatNotes:
- Time format:
HH:MMorHH:MM:SS - If
night_start>night_stop, the range spans midnight (e.g., 22:00 to 06:00 means nighttime) - The system calculates PPSD for all data, but only uses filtered .npz files when generating plots
- Omit
time_filterto use all data (default behavior)
Depending on the action used, the script generates the following output:
-
.npzfiles saved to:<folder>/npz_<location>_<channel>/ -
.pngplots saved to:<output_folder>/<trace.id>.png -
.csvexported data (for action "convert") saved to:<folder>/npz_<location>_<channel>_text/export.csv
A simple example is provided in the example folder. This example uses the seismic data from the IU Network
The original data was collected by the Albuquerque Seismological Laboratory / USGS and distributed via the International Federation of Digital Seismograph Networks (FDSN):
Albuquerque Seismological Laboratory/USGS. (1988). Global Seismograph Network (GSN - IRIS/USGS) [Dataset]. International Federation of Digital Seismograph Networks. https://doi.org/10.7914/SN/IU
Seismic waveform and station metadata were accessed using the EarthScope FDSN Web Services, which provide public access to seismic data managed by the IRIS Data Management Center.
-
The waveform file extensions supported are:
.mseed, .miniseed, .msd -
Each dataset must include:
- One waveform folder
- One response file
- One or more channel codes
-
Channels are processed independently, and multiple stations can be run in parallel.
Please feel free to report issues or submit improvements!