Ground Motion Ground Truth is a software for the generation and deployment of datasets of Ground motion time histories and metadata, specifically created for Big data and machine learning applications.
For any question / problem / enhancement please open a new Issue (see "Issues" on top of this web page).
If you want to create your harmonized dataset form your source, please contact us for the source data, and then have a look at GMGT (collect)
If you want to skip the dataset generation, the GFZ section 2.6 hosts (for private usage only) already created datasets. Please refer to GMGT (download)
We assume in the following that you have generated or downloaded the GMGT datasets into a datasests directory.
The datasets directory - if all the script of the collect directory are executed,
will contain the following files:
| Dataset | #waveforms |
|---|---|
| ngawest2.hdf | 2,012 |
| esm.hdf | 45,586 |
| kik2.hdf | 899,875 |
| knet2.hdf | 499,196 |
| Total: | 1,466,699 |
where each hdf file denotes a GMGT dataset, composed of
time histories (accelerometers in m/sˆ2) and relative
metadata all in a single hdf file.
Each time history is a numpy container of 1 to 3 numeric arrays (denoting
each recording component) and a dt (denoting the sampling interval), whereas
the metadata is a tabular structure with the following fields:
Users are supposed to select the time histories based on the metadata, and work with the data, as explained in the associated python module and notebook (see below for details)
Hint: For processing large datasets, we recommend executing Python modules as scripts instead of Jupyter notebooks, which are better suited for illustrative examples and exploratory analysis; running heavy computations in a script is more efficient
-
Clone the repository
git clone https://github.com/rizac/gmgt.git cd gmgt -
If you already have your Python virtual environment and setup, you can copy the file
gmgt.pyin your Python module, or even its content directly in your code. This is a very "quick and dirty" approach: it's fast, but you need to be sure that all requirements are already installed. -
Otherwise, you can create a new fresh virtual env (it can be done inside the
gmgtcloned directory for instance):python3 -m venv .env # create a venv. Please use Ptyhon 3.11+ source .env/bin/activate # Linux/macOS # .\env\Scripts\activate # Windows PowerShell (not tested)and then install this package (from within the gmgt directory):
pip install .Then you can start coding (Jupyter, Python module) after activating the virtual environment each time (type
deactivateto deactivate the ven). In your code, you just have to import:from gmgt import get_records
For illustrative purposes (or if you really want to stick to Notebooks to process the data) we provided also a Python notebook