quakeio
Project description
quake-io
QuakeIO is a library of utilities for parsing ground motion files. Interfaces are provided for Python, Matlab, and the command line.
Formats
Format | Read | Write | Reference |
---|---|---|---|
[quakeio.]json |
☑ | ☑ | schema |
csmip |
☐ | ☐ | |
csmip.v2 |
☑ | ☐ | CSMIP |
eqsig |
☑ | ☑ | eqsig |
PEER.NGA |
☑ | ☐ | |
plain.tsv |
☐ | ☐ | |
opensees |
☐ | ☑ | |
plain.csv |
☐ | ☐ | |
mdof |
☐ | ☐ | |
SimCenter.Event | ☐ | ☐ |
Install
Run the following command:
pip install quakeio
Python API
import quakeio
# Read event
csmip_event = quakeio.read("event.zip")
## Extract record and rotate
record = rec = csmip_event["bent_4_north_column_grnd_level"]
angle = 21/7
record.rotate(angle)
## Extract rotated series
series = record['tran'].accel
# Write output
quakeio.write("out.txt", series, write_format="opensees")
Command Line Interface
usage: quakeio FILE [-f FORMAT] [-t FORMAT]
Options:
-c/--calculate COMMAND
-f/--from FORMAT
-t/--to FORMAT
$ quakeio chan001.v2 --from csmip.v2 --to opensees
$ cat chan001.v2 | quakeio -f csmip.v2 -t html | pandoc -f html -t pdf
$ cat chan001.v2 \
| quakeio -a rot:30 -f csmip.v2 -t html -x [*].data \
| pandoc -f html -t pdf
MATLAB Interface
Motion = quakeIO.read('csmip.zip')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
quakeio-0.1.1.tar.gz
(9.6 MB
view hashes)