RMS value for Observatory

I’m wondering if anyone did something like this and if not, perhaps some suggestions to get started. Our astronomical observatory is close to the shore and at time we have heavy surf, which is picked up by our Raspberry Shake (and the reason we got one). We want to add a field to an images FITS header that give an indication of the surf ‘noise’ that may have contributed to that image. Is it possible to calculate something like the RMS for the last, say 10mins? Or would some other parameter be better? How would I extract that data from the Shake?

Mahalo,

Sifan

Hello sifank, welcome to the community! And with a great combo between astronomy and seismology! (I’m a fan of both)

There are other users, if my memory serves well, who measure the same values of surf if their location is prone to that phenomenon.

If you are familiar with Python code, It is possible to calculate it using a mix of numpy and obspy modules. You could calculate also the average over those 10 minutes, or only the peak displacement value registered from your Shake. I assume that you could then take that value and in some way put it into the FITS of an astro image.

On how to access and extract data from the Shake, these two sections on our manual will help you:
https://manual.raspberryshake.org/traces.html
https://manual.raspberryshake.org/download.html

The only thing I want to notify is that if you acquire data from the network and then process them with Python, there will be a lag of ~30 minutes between the moment the data are recorded from the Shake and the moment the data are available online.

However, if you will be putting the RMS value in the FITS in a second time, this will not affect you.

Mahalo Stormchaser!

The files under {shake}:/opt/data/archive are miniSEED files, right? If retrieving the latest dated file directly from my shake, how current will that information be?

I am very familiar with python and will look into obspy and see what I can do.

Mahalo! (Thank you)

1 Like

Mahalo sifank!

Yes, exactly. Those are the miniSEED files that are stored inside the Shake before being uploaded. Their number depends on how many days you decided to store on the Shake itself (you can change it from the Settings icon):

http://rs.local/ --> Settings icon --> DATA --> Waveform Data Saving

They are updated every minute, so if you access those the information will practically be in real-time.

Perfect then! With Python you will be able to do it without too many issues. Here are some resources on our manual to get you started:

https://manual.raspberryshake.org/metadata.html?y#example-obspy-code-for-removing-response

https://manual.raspberryshake.org/developersCorner.html?#converting-counts-to-metric-units-using-obspy

And here’s the general link to the obspy package: https://docs.obspy.org/contents.html

You’re welcome! Looking forward to the results!

Hello again sifank,

on an aftertought, you could also use our RSUDP software (https://github.com/raspishake/rsudp) and add a calculation module to it to get the RMS value in real time, since this program connects straight up to the Shake to receive a constant live stream of data.

Another solution could also be writing your own Python code to attach the RMS calculation to the UDP stream, calculating the value again in real time as the data arrives ever 1/4 second. More details are on our manual here: https://manual.raspberryshake.org/udp.html

Just a couple more ideas for you to peruse.