Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a consumer that calculates peak displacement P(d) after the sudden motion trigger is tripped #50

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

iannesbitt
Copy link
Collaborator

From @gpetricca:

The definition of P(d) can be found in this paper: https://www.mdpi.com/1424-8220/22/12/4534/pdf as “the maximum peak amplitude of displacement in the first three seconds after the calculated (or observed) arrival of the P waves to the receiving station.”

The new P(d) algorithm in RSUDP should do the following:

  • The trigger algorithm (like the one already built into RSUDP) detects an event (at time Tp). This also triggers the new P(d) algorithm.
  • P(d) would gather data from the detection time (Tp) to Tp+3s.
  • P(d) would then remove the instrument response to get displacement (with something akin to stream.remove_response(inventory=inv, output="DISP").
  • Finally, P(d) would calculate the max amplitude in the Tp to Tp+3s time window.

This will be done in a new consumer class that monitors the trigger messages sent via the queue. When a trigger message is received, the P(d) algorithm will send the P(d) calculation back through the queue and write it to the log output. There may be an option to send the P(d) calculation to an external server, depending on need.

@iannesbitt iannesbitt self-assigned this Dec 6, 2022
@iannesbitt iannesbitt added the enhancement New feature or request label Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant