shakelib.utils.imt_string¶
- shakelib.utils.imt_string.oq_to_file(oqimt)[source]¶
Convert openquake IMT nomenclature to filename friendly form.
Examples: SA(1.0) (Spectral Acceleration at 1 second) -> psa1p0 SA(0.3) (Spectral Acceleration at 0.3 second) -> psa0p3 SA(15.0) (Spectral Acceleration at 15 seconds) -> psa15p0 SA(3) (Spectral Acceleration at 3 seconds) -> psa3p0 SA(.5) (Spectral Acceleration at 0.5 seconds) -> psa0p5
- Parameters:
oqimt (str) – Openquake IMT nomenclature string.
- Returns:
Filename friendly IMT string.
- Return type:
- Raises:
ValueError – when there is no corresponding filename-friendly IMT representation.