Difference between revisions of "Duration"
(Created page with 'Duration calculations are used to define the duration of shaking from an earthquake. Currently, the BBP has 2 codes for calculating Arias intensity and then significant duration…') |
|||
(8 intermediate revisions by 2 users not shown) | |||
Line 8: | Line 8: | ||
== Verification == | == Verification == | ||
+ | We expect to have two implementations of Duration (in C and Python). For the common output types, we will input the same seismogram to both methods and show that the methods produce equivalent results. For input, we use CyberShake seismograms. The Python implementation is taken from rzz2015.py, while the C implementation is derived from Matlab code provided by Nenad Bijelic. These verification tests are documented here: | ||
+ | {| border="1" | ||
+ | ! Input seismogram | ||
+ | ! Python, velocity duration 5-75% | ||
+ | ! C, velocity duration 5-75% | ||
+ | ! Python, velocity duration 5-95% | ||
+ | ! C, velocity duration 5-95% | ||
+ | |- | ||
+ | | [http://hypocenter.usc.edu/research/cybershake/duration_seismograms/Seismogram_PAS_3878_280_0.grm Seismogram_PAS_3878_280_0.grm], RV 0 | ||
+ | | 15.650000 | ||
+ | | 15.650001 | ||
+ | | 22.800000 | ||
+ | | 22.800001 | ||
+ | |- | ||
+ | | [http://hypocenter.usc.edu/research/cybershake/duration_seismograms/Seismogram_PAS_3878_239_58.grm Seismogram_PAS_3878_239_58.grm], RV 36 | ||
+ | | 25.900000 | ||
+ | | 25.900000 | ||
+ | | 64.950001 | ||
+ | | 64.950005 | ||
+ | |- | ||
+ | | [http://hypocenter.usc.edu/research/cybershake/duration_seismograms/Seismogram_PAS_3878_128_1296.grm Seismogram_PAS_3878_128_1296.grm], RV 510 | ||
+ | | 11.950000 | ||
+ | | 11.950000 | ||
+ | | 31.100000 | ||
+ | | 31.100000 | ||
+ | |} | ||
+ | |||
+ | The only differences are due to floating-point error. | ||
== Related Entries == | == Related Entries == | ||
*[[CyberShake]] | *[[CyberShake]] | ||
− | *[[ | + | *[[Broadband Platform]] |
Latest revision as of 21:26, 8 October 2015
Duration calculations are used to define the duration of shaking from an earthquake.
Currently, the BBP has 2 codes for calculating Arias intensity and then significant duration for acceleration seismograms. One is by CG and works on PEER-format seismograms; the other is by SR and is a more general function which takes an array of floats (the seismogram) as input. Both are short Python codes, about 8 lines of code. The BBP does not have any codes to calculate the energy integral or the significant duration for velocity seismograms, or the CAV.
The CyberShake platform prefers a C implementation. If we try to use a Python implementation from the BBP, we either have to call Python from C, or invoke a separate job to calculate the durations. In our design, we would prefer to just call a C function from the already-existing post-processing code, since it will mean we don't have to add another job for each rupture, and we don't have to read the seismogram in from disk an extra time. Additionally, if we use the BBP code, we would have to add an implementation of the energy integral and the CAV anyway. Since the calculation is very simple, it also seems less important to use the identical code.
We plan write a CyberShake C implementation and use SR implementation in the BBP to verify the CyberShake C duration code. Additionally, we plan to store 4 significant durations in the database (acceleration and velocity for 5/75 and 5/95), but the other values (the Arias duration, the energy integral, the CAV, and the 20/80 significant durations) will only exist in output files, much like how we produce PSA and RotD at periods we don't insert into the database.
Verification
We expect to have two implementations of Duration (in C and Python). For the common output types, we will input the same seismogram to both methods and show that the methods produce equivalent results. For input, we use CyberShake seismograms. The Python implementation is taken from rzz2015.py, while the C implementation is derived from Matlab code provided by Nenad Bijelic. These verification tests are documented here:
Input seismogram | Python, velocity duration 5-75% | C, velocity duration 5-75% | Python, velocity duration 5-95% | C, velocity duration 5-95% |
---|---|---|---|---|
Seismogram_PAS_3878_280_0.grm, RV 0 | 15.650000 | 15.650001 | 22.800000 | 22.800001 |
Seismogram_PAS_3878_239_58.grm, RV 36 | 25.900000 | 25.900000 | 64.950001 | 64.950005 |
Seismogram_PAS_3878_128_1296.grm, RV 510 | 11.950000 | 11.950000 | 31.100000 | 31.100000 |
The only differences are due to floating-point error.