in , , , ,

Use Swarm with Raspberry Shake seismographic data

- Werbung -
Reading Time: 7 minutes

In the previous tutorial, we looked at setting up Raspberry Shake, a geophone-based earthquake detector and checking out data with the web-based ShakeNet service.

See: Build a Seismograph with Raspberry Shake

- Werbung -
- Werbung -

Our shake has been running for a while now and we’ve gathered together some data on earthquake activity in our local area. We don’t live in an earthquake-prone part of the world, but it’s good citizen science and we can tap into other Raspberry Shake devices around the globe.

In this tutorial, we’re going to take a closer look at the data provided by Raspberry Shake devices. We’ll delve into how data is measured, stored, and what you can do with it. We’re going to look at a helicorder and using Swarm to analyse live data.

The main window displays a helicorder from a Raspberry Shake. Select a point on the helicorder to display the Inset panel, here shown in Spectra view, but Wave and Spectrogram views are also used

Open Raspberry Shake

We’re going to use two Raspberry Pi devices in this tutorial. The first is used in our assembled Raspberry Shake unit (currently sitting in our conservatory). The second is used to remotely access the Raspberry Shake and investigate its data. You can perform much of this tutorial using another Linux, Windows, or Apple macOS computer if your only Raspberry Pi is being used as Raspberry Shake.

With both your computer and Raspberry Shake on the same network, Start by opening the web browser and navigate to:


This will open the Raspberry Shake Config window.

Open helicorder

Click on the helicorder icon (shaped as four wavy lines) in the bottom left of the window. You will see 14 blue links, each with a date-stamp followed by either (12) or (00). These represent Raspberry Shake readings for the last seven days, split into 12-hour blocks. The ones marked ‘(00)’ are for the morning hours (midnight to midday), while the ‘12’ ones are for evenings (midday to midnight).

Click on one of the links to view the helicorder for that time frame. It’ll look like the image in Figure 1. The latter shows seismic data for 12 hours. Each line represents 15 minutes of recording, and the lines vary in colour (black, red, blue, and green). Down the left, you will see the time local to your area; to the right, you’ll see UTC (Coordinated Universal Time). Our Shake unit is located near the Prime Meridian, so both times are the same.

The main window displays a helicorder from a Raspberry Shake. Select a point on the helicorder to display the Inset panel, here shown in Spectra view, but Wave and Spectrogram views are also used

Look along the lines to view seismic activity. Lines will typically be stable, and more motion could indicate somebody walking nearby, or other motion. Take a look this Maryland Geological Survey website for more information on how to read helicorder records.

Adjust helicorder scaling

We found our helicorder settings initially too intense (see Figure 2); conversely, you may find the helicorder on your Shake to be too mild. Either way, you won’t be able to determine between different periods of intensity.

Head into your Shake settings and adjust the Helicorder Scaling Value to fine-tune your settings. Click on the Settings icon at http://rs.local and choose the Data tab. Adjust the Helicorder Scaling Value. The default setting is 0.5; adjust it down to 0.1 if the display is too intense, and up to 1.0 if it is too mild. You can fine-tune the levels to your taste as you go.

Figure 2 Our helicorder setting was too intense, requiring the Scaling Value to be reduced so values could be inspected

Click Save and Restart to put the new settings in place.

The helicorder will start displaying new recordings using the new scaling value, but will not retrospectively adjust the previous recordings. So you will need to wait until the end of your 12-hour recording for a fresh helicorder to display wholly adjusted results.

Using Swarm on Raspberry Pi

The helicorder is not updated in real-time. For real-time data, you’ll need to use another app. There are many third-party apps available for data analysis, but Swarm (Seismic Wave Analysis / Real-time Monitoring) is the most commonly used by Raspberry Shake owners.

Swarm was developed by the USGS Volcano Hazards Program and is the most widely used seismological application in the world. Swarm is available for Linux, macOS, and Windows operating systems, and Raspberry Shake provides a version that is preconfigured for Shake devices.

In the case of Swarm, you can also connect to the Raspberry Shake Community server to see waveforms from all of the other Raspberry Shakes in the world.

Download Swarm

Visit rs.local in your web browser and click the SWARM Download button. Open a Terminal window and navigate to the Downloads folder:

- Werbung -
cd Downloads/ 

Now unzip the downloaded swarm folder and move the unzipped folder to your home folder:

unzip swarm-3.0.1 mv swarm-3.0.1 ~ 

(If Swarm has been updated, replace the file name with the appropriate latest version.)

Open Swarm

Now open the swarm folder in your home folder and run the file script to start the program.

cd ~/swarm-3.0.1 sh 

If you are using a Windows computer, you will need to install Java first and then run Swarm by double-clicking the swarm_console.bat file.

Access your Raspberry Shake in Swarm

When you first open Swarm, it will display a blank blue window; to the left, a sidebar will display myShake and RS Community folders. Double-click myShake to reveal further subfolders, then click the ‘+’ sign next to AM to reveal the StationCode for your Raspberry Shake. Ours is R2E51.

Double-click on the StationCode and the main window will display a helicorder. This time, however, the lines will be blue, with darker blue and red colours used to indicate heavy periods of activity. Each line represents a half-hour of activity, and the helicorder displays live data.

The inset window

Click on any part of the helicorder to open the Inset window. This shows a zoomed-in area of the helicorder. The first time you click on it, it will be in Wave view (this is the helicorder wave expanded to make it easier to view). Right-click with the mouse to switch to Spectra view; right-click again to view a Spectrogram. Icons in the Status bar above the helicorder are also used to change views.

Spectrogram view

The Spectrogram view (Figure 3) displays the frequency of waveforms concerning time and amplitude (or power). The X-axis (horizontal) of the spectrogram relates to time (as with a regular helicorder plot); the Y-axis (vertical) relates to the frequency of the wave. A third data point is displayed via the colour of the points on the graph: blue is for the weakest energy, and red is for the strongest. So you can see the strength of seismic activity in specific GHz bands. The Spectrogram is a very powerful tool for understanding the seismic activity.

Ben Ferraiuolo has written a great article called ‘How to understand spectrograms’, which can be used to get a better understanding of how to interpret this data.

Figure 3 The Spectrogram displays the frequency of waveforms concerning time, and the colour of the data points indicates the amplitude (power) in that frequency

Helicorder view settings

All the settings for the helicorder view can be manipulated in the helicorder view settings dialog, which can be opened by clicking on the Helicorder View Settings button in the status bar. The ‘X, minutes’ option adjusts the length of time each horizontal waveform represents (the default is 15 minutes), while the ‘Y, hours’ option determines how many hours are represented on a screen (24 by default).

The Zoom option adjusts how many seconds are displayed in the Inset panel (the default is 30; set this higher to get a wider view of data when you click on the helicorder.) The Clipping option determines the level at which the red threshold is exceeded. Finally, the ‘Refresh, seconds’ option is used to adjust the update frequency (by default, the heliograph is updated every 15 seconds).

Wave clipboard

You may find it useful to compare different sections of the helicorder, or the same time using different views: plot, spectrogram, and so on. The Wave Clipboard is used to hold different clips from several areas at once (even across different Raspberry Shake models). Choose Window > Wave Clipboard to view the current selection (which should be empty).

Head back to the helicorder and click on an area of interest to open the Inset Panel. Right-click to get a View mode and click the ‘Copy inset to clipboard’ button. The Wave Clipboard will return to focus and now display the clipped wave. You can add multiple waves to the Wave Clipboard and remove them using the ‘X’ delete icon to the right of each wave.

View another Raspberry Shake

By now you should have a good understanding of how Swarm is used to distil seismic data. However, you can also use it to access other Raspberry Shake devices that are sharing their data publicly.

Double-click RS Community in the Data Chooser sidebar and expand (with ‘+’) the Networks folder and the AM folder. This will display all Raspberry Shake devices on the network.

Choose your Raspberry Shake underneath myShake and the Data Choose will display a list of devices, sorted by distance to yours. Select one of the devices and click the Map icon (at the bottom of the Data Chooser) to view its location. Double-click the device (or click the helicorder icon at the bottom of Data Chooser) to view its data.

- Werbung -


- Werbung -

What do you think?

Schreibe einen Kommentar