Getting Shake software without burning an image


I am working with MATLAB and I am running into a few issues.

MATLAB has a support package to work with raspberry pi and I was attempting to customize the existing operating system on the pi that the shake came with so that I could deploy MATLAB functions. When attempting the installation it ran into an error because the default sudo user is ‘myshake’ and not ‘pi’ like it is on other rpi’s. I added user ‘pi’ to the sudoers and removed the password for user ‘pi’ but it still is not working. Is there a way to change the default user to ‘pi’? Or something else I should be doing to user ‘pi’?

The second option I was thinking of was getting a new microSD card and burning the MathWorks Raspbian image first so it wouldn’t run into any of the user issues, then inserting the shake software. From what I see, there is only the option to burn the raspishake image to the to the microSD card, but that would eliminate all of the MathWorks data. Is there another way to get the shake software installed in the new microSD card?

The goal is to be able to work with MATLAB functions in the shake.

Thank you!

Hello rocampo,

This definitely sounds like an interesting project. Here’s what I can tell you about what you have written.

Unfortunately, it is not possible to install our Shake OS onto another image, because there are too many built-in under-the-hood functionalities. The only thing that it is possible to do is use the Shake OS as the base version, and anything extra has to be added on top of this version, not the opposite.

I am not sure what you want to achieve by being able to work with MATLAB on the Shake, but if you are talking about reading/editing/plotting/manipulating the data in any shape or form, then I encourage you to do so on another computer, even another Raspberry Pi.

You can set up the Shake Datacast function (more info here, on our manual: Raspberry Shake Data Producer UDP Port Output — Instructions on Setting Up Your Raspberry Shake) to transmit real-time data from the Shake to the other computer, and then operate on them, with MATLAB or other means, via this second computer.

We usually recommend this way to leave the CPU and the other resources of the Shake free to work on what the Shake OS is programmed to do, and not add other loads on it.

I hope these works can give you a new perspective, or a deeper understanding of how the entire program works, and that can prompt you to go further with your project.

Alright that makes sense. I am trying to read the data using FDSN WebServices.
I understand I can use fdsnws-dataselect version 1.1 to access time series data in miniSEED format.

What is the difference from obtaining data through this method vs obtaining data by downloading the miniSEED files directly from the shake? I ask this because I am loading in those files to MATLAB using both methods and I am getting different results. I have provided both methods below.

Obtaining data from data center:
urlQuery = ‘
webreadInfo = webread(urlQuery);
–webreadInfo provides values between 0 and 300

Obtaining data by downloading the files through the terminal from the shake:
infile = ‘AM.RF23B.00.EHZ.D.2021.128’
rMSEEDFastInfo = ReadMSEEDFast(infile);
–rMSEEDFastInfo provides values between ~1650 and ~1750

ReadMSEEDFast is a MATLAB function that can be downloaded from MathWorks File Exchange. I understand both files are in miniSEED format and they have data for 24 hours, but even then I am also getting a different number of data points for each method of reading the data.

1 Like

Yes, ReadMSEEDFast has a bug whereby the times are truncated to the nearest second, so if you need times more accurate than this (or you want sequences of data to line up correctly), you must use either mseed2ascii.exe which writes a text file and is quite slow or rdmseed which is not as fast as ReadMSEEDFast, but gives accurate times.

1 Like