rsudp.c_rsam (RSAM analysis)
- class rsudp.c_rsam.RSAM(q=False, interval=5, cha='HZ', deconv=False, fwaddr=False, fwport=False, fwformat='LITE', quiet=False, testing=False, *args, **kwargs)
Added in version 1.0.1.
A consumer class that runs an Real-time Seismic Amplitude Measurement (RSAM). If debugging is enabled and
"quiet"is set totrue, RSAM is printed to the console every"interval"seconds, and optionally forwarded to an IP address and port specified by"fwaddr"and"fwport"with packets formatted as either JSON, “lite”, or CSV.- Parameters:
q (queue.Queue) – queue of data and messages sent by
rsudp.c_consumer.Consumer.quiet (bool) –
Trueto suppress printing of RSAM analysis live to the console,Falseotherwise.interval (float) – window of time in seconds to apply RSAM analysis.
cha (str) – listening channel (defaults to [S,E]HZ)
deconv (str) –
'VEL','ACC','GRAV','DISP', or'CHAN'fwaddr (str) – Specify a forwarding address to send RSAM in a UDP packet
fwport (str) – Specify a forwarding port to send RSAM in a UDP packet
fwformat (str) – Specify a format for the forwarded packet:
'LITE','JSON', or'CSV'
- run()
Reads data from the queue and executes self.codefile if it sees an
ALARMmessage. Quits if it sees aTERMmessage.