Real time processing of seismic data raspberry

Hii, I am wei sun and I am a master student. I donot have any raspberry instrument. But I want make a small project by using the real time data from the raspberry open stations and I want to apply the preprocessing steps like STA/LTA, alarm system etc to the real time data. Can it be possible, please suggest.

1 Like

Hello we1, welcome to our community!

I feel that the best options for you would be to write a Python program using the ObsPy package (https://docs.obspy.org/), which contains a lot of useful functions to read and elaborate the data coming from our RaspberryShakes.

We also have some resources on our manual, with some ready-to-use code that you can utilize as a starting point:
https://manual.raspberryshake.org/traces.html
https://manual.raspberryshake.org/download.html
https://manual.raspberryshake.org/metadata.html#example-obspy-code-for-removing-response
https://manual.raspberryshake.org/developersCorner.html?#converting-counts-to-metric-units-using-obspy
https://manual.raspberryshake.org/developersCorner.html?#converting-counts-to-pascal-to-decibel-using-obspy

And, lastly, you can take a look at the RSUDP software, that already offers real-time display of data from a local RaspberryShake: rsudp 1.0.3 — rsudp documentation It is provided as-is, so you will have to proceed step by step by applying your own research.

I installed the software as sugested and my test pass is running fine and I am listening the alarm also.

However, I am getting error while doing rs-client -s /path/to/settings.json

2022-09-09 11:02:28 [Init] ERROR: No data received in 10 seconds; aborting.
2022-09-09 11:02:28 [Init] Check that the Shake is forwarding data to:
2022-09-09 11:02:28 [Init] IP address: 142.xx.xx.xx Port: 8888
2022-09-09 11:02:28 [Init] and that no firewall exists between the Shake and this computer.
Traceback (most recent call last):
File “/home/wei/pgms/anaconda3/envs/rsudp/bin/rs-client”, line 8, in
sys.exit(main())
File “/home/wei/pgms/anaconda3/envs/rsudp/lib/python3.7/site-packages/rsudp/client.py”, line 461, in main
run(settings, debug=debug)
File “/home/wei/pgms/anaconda3/envs/rsudp/lib/python3.7/site-packages/rsudp/client.py”, line 153, in run
rsstn=settings[‘settings’][‘station’])
File “/home/wei/pgms/anaconda3/envs/rsudp/lib/python3.7/site-packages/rsudp/raspberryshake.py”, line 171, in initRSlib
set_params() # get data and set parameters
File “/home/wei/pgms/anaconda3/envs/rsudp/lib/python3.7/site-packages/rsudp/raspberryshake.py”, line 219, in set_params
data, (firstaddr, connport) = sock.recvfrom(2048)
File “/home/wei/pgms/anaconda3/envs/rsudp/lib/python3.7/site-packages/rsudp/raspberryshake.py”, line 100, in handler
raise IOError(‘No data received’)
OSError: No data received

Hello we1,

great to hear that the installation went well. However, as I stated, RSUDP software offers real-time display of data from a local RaspberryShake. So it cannot be used to acquire live data from Shakes that are not in your local network.

However, as the code is open-source, you can use it as a starting point to understand what is needed to have a function that will update at intervals that you will be able to set and display the data accordingly. Otherwise, you could write a function that could periodically communicate with our servers, download the data, and display them on a screen, again, at your time interval of choice.

There are multiple approaches to this so you can choose the one that suits you the most.