GEMScienceTools / gmpe-smtk

Python and OpenQuake-based Toolkit for Analysis of Strong Motions and Interpretation of GMPEs
GNU Affero General Public License v3.0
43 stars 33 forks source link

Parser for Mexican data in ASA format #76

Closed rcgee closed 6 years ago

rcgee commented 6 years ago

Parser for the Mexican Standard Acceleration file, ASA ver 2.0 created by the CICESE and UNAM networks. See https://aplicaciones.iingen.unam.mx/AcelerogramasRSM/DscAsa.aspx

Each ASA file contains event and station metadata and the acceleration time series for 3 components. Response spectra data are not included.

The structure of this code follows closely "esm_database_parser.py"

Also added simple tests to ensure the metadata is being parsed correctly, using one CICESE and one UNAM test file. Would later like to add tests that check the ValueErrors are being raised correctly when the metadata is missing or when there are problems with the time series

rcgee commented 6 years ago

Thanks for the feedback. I made the changes to help with the Python 3 migration.