Difference between revisions of "Duration"

From SCECpedia
Jump to navigationJump to search
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. These verification tests are documented here:
  
  

Revision as of 20:19, 6 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. These verification tests are documented here:


Related Entries