Ground Motion Ground Truth is a software for the generation and deployement datasets of Ground motion time histories and metadata specifically created for Big data and machine learning applications.
In this README you will find how to access and work with the data in Python. Other references (also mentioned throughout the README) include:
For any question / problem / enhancement please open a new Issue (see "Issues" on top of this web page).
If you want to create your datasets, please contact us for the source data, and then have a look at GMGT (collect)
If you want to use the already generated data (interal private useage only), 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 |
| 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.
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