seismo_det
Determinism by looking at seismogram attributes
Science Score: 49.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 3 DOI reference(s) in README -
✓Academic publication links
Links to: zenodo.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.1%) to scientific vocabulary
Repository
Determinism by looking at seismogram attributes
Basic Info
- Host: GitHub
- Owner: RebeccaColquhoun
- Language: Jupyter Notebook
- Default Branch: public
- Size: 543 MB
Statistics
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 2
Metadata Files
README.md
Overview
Code to investigate earthquake determinism using early parameters of seismograms.
Table of Contents
Installation
- Clone this repository
git clone git@github.com:RebeccaColquhoun/seismo_det.git - Open
environment.ymland choose the name for your virtual environment - Create a virtual environment with all required Python packages by running the following command in terminal
conda env create -f environment.yml
Structure
Code is provided to download data, pick waveforms and calculate the 4 parameters of interest. It then extracts relevant parameters into DataFrames which can be used for further analysis, plotting etc.
Warm colors show code files. Cool colors show data and results files which are made as the different code files are run. Darker colors are directories, whilst lighter colors are files.
mermaid
flowchart LR
A[seismo_det] --> C[Data]
C[Data] --> K[2018_2018_global_m5]
K[2018_2018_global_m5] -->|e.g.|R[20180131_231321.a]
R[20180131_231321.a] --> S[data]
R[20180131_231321.a] --> T[station_xml_files]
R[20180131_231321.a] --> U[picks.pkl]
R[20180131_231321.a] -->V[eq_object...]
C[Data] --> L[results_database]
C[Data] --> M[2018_2018_global_m5_catalog.xml]
A[seismo_det] --> B[Code]
B[Code] --> E[setup_paths]
B[Code] --> F[1_run_data_download.py]
B[Code] --> G[2_picking.py]
B[Code] --> H[3_calculations.py]
B[Code] --> I[4_make_database.py]
B[Code] --> J{{make figures as desired}}
A[seismo_det] --> D[Figures]
D[Figures] --- N[no_lines...]
D[Figures] --- O[no_lines...grey]
D[Figures] --- P[two_lines...]
D[Figures] --- Q[gradt_speaman...]
style N fill:#bfe0f5
style O fill:#bfe0f5
style P fill:#bfe0f5
style Q fill:#bfe0f5
style M fill:#bfe0f5
style U fill:#bfe0f5
style V fill:#bfe0f5
style E fill:#fce492
style F fill:#fce492
style G fill:#fce492
style H fill:#fce492
style I fill:#fce492
style J fill:#fce492
style C fill:#4ea4d9
style D fill:#4ea4d9
style K fill:#4ea4d9
style L fill:#4ea4d9
style R fill:#4ea4d9
style S fill:#4ea4d9
style T fill:#4ea4d9
style B fill:#e39f46
style A fill:#ffffff
Use for your own data
- Set your desired filepaths for storage in setup_paths.py. Otherwise default values will be used.
- In
1_run_data_download.pyset values for minmag, minyear and maxyear. To download just one year of data set minyear and max_year to be the same. This will structure the data file correctly. If using own data, it must be structured as in Example data - Run
1_run_data_download.py - Run
2_picking.py - Open
3_calculations.pyand set parameter options as desired.
parameters = [[calculation_window, blank_length, 'eq_object_03s_snr_20_blank_0'],]
- Run
3_calculations.py: calculations automatically run on 1 thread. If you want to use multithreading, set numthreads in setuppaths.py to a non-1 value. If you wish to change additional parameter values, these can be passed to functions in3_calculations.pyor edited inearthquake.py - Open
4_make_database.pyand set filenames to those set in3_calculations.py.
e.g. filenames = ['eq_object_03s_snr_20_blank_0_snr20']
- Run
4_make_database.py - To make figures similar to those in the paper, run
figures_2_3.pyandfigures_4_5.py. Set filenames as in step 7.
Example data
A small section of example data has been provided in the data/ subdirectory. The output from running 1_run_data_download and 2_picking for a short window of 2018 is given. You can then run 3_calculations, 4_make_database and run any plotting scripts as desired.
Any data you use must be structured similarly to the data given. Color coding denotes when the file is made if the code is run as in Use for your own data. ```mermaid flowchart LR AA[key] --> X[1rundatadownload] AA[key] --> Z[2picking] AA[key] --> Y[3calculations] AA[key] --> ZZ[4makedatabase] C[Data] --> K[20182018globalm5] K[20182018globalm5] -->|e.g.|R[20180131231321.a] R[20180131231321.a] --> S[data] R[20180131231321.a] --> T[stationxmlfiles] R[20180131231321.a] --> U[picks.pkl] R[20180131231321.a] -->|e.g.|V[eqobject...] C[Data] --> L[resultsdatabasecombined] C[Data] --> M[20182018globalm5catalog.xml] S[data] --> |e.g.|D[EC.PUYO.HHE.mseed] S[data] --> |e.g.|E[EC.PUYO.HHN.mseed] S[data] --> |e.g.|F[EC.PUYO.HHZ*.mseed] T[stationxmlfiles] --> |e.g.|G[EC.PUYO.xml] K[20182018globalm5] --> B[resultsdatabase] B[resultsdatabase] --> |e.g.|H[resultseqobject...] L[resultsdatabasecombined] --> |e.g.|I[resultseqobject...]
style M fill:#bfe0f5
style S fill:#bfe0f5
style D fill:#bfe0f5
style E fill:#bfe0f5
style F fill:#bfe0f5
style G fill:#bfe0f5
style T fill:#bfe0f5
style R fill:#bfe0f5
style K fill:#bfe0f5
style X fill:#bfe0f5
style AA fill:#ffffff
style L fill:#c3caf5
style B fill:#c3caf5
style H fill:#c3caf5
style I fill:#c3caf5
style ZZ fill:#c3caf5
style V fill:#bff5ce
style Y fill:#bff5ce
style Z fill:#86ab90
style U fill:#86ab90
```
Citing
If you use this code please cite Colquhoun & Hawthorne (2024). This paper is submitted. If you would like to cite the code in the meantime, please use the Zenodo doi.
Preprint available on ESS open archive: https://doi.org/10.22541/essoar.172363859.94193943/v1
Issues
If you have any questions about the code please email rebeccalcolquhoun"at"gmail.com. If there are any issues or bugs in the code, please raise an issue.
Owner
- Name: Rebecca Colquhoun
- Login: RebeccaColquhoun
- Kind: user
- Company: University of Oxford
- Website: rebecca.colquhoun.github.io
- Twitter: RebeccaC13
- Repositories: 2
- Profile: https://github.com/RebeccaColquhoun
DPhil in Earthquake Mechanics
GitHub Events
Total
- Push event: 1
Last Year
- Push event: 1