Libmseed instead of obspy

I’ve installed ObsPy on my RS3D to read data stored in files generated daily at:

/opt/data/archive/2025/AM/RD11F/EHZ.D/AM.RD11F.00.EHZ.D.2025.168

However, I want to use the C library libmseed because a C program is faster than Python.

I tried to install it, but I couldn’t get it to work.

I’m struggling with extracting samples and metadata from the data continuously. After midnight, a new file is generated (e.g., for the next day), but the program still extracts data from the old file, is the solution is to make Waveform Data Saving just one day not 7 days !?

1 Like

Hello abderrman,

I’m not familiar with libmseed, so I don’t know if I can offer comprehensive help (if anyone in the community can, feel free to correct me/add your experience!).

From what I can read in the libmseed documentation, this software doesn’t seem to have the capability to monitor changes inside a folder.

I think the best solution would be to write a piece of code that would:

  • periodically scan /opt/data/archive/2025/AM/RD11F/EHZ.D/ for new files matching AM.RD11F.00.EHZ.D.2025.*
  • open the latest file using libmseed
  • while also detecting if a new day has started: in that case, close the old file and open the new one

I wouldn’t recommend limiting the Data Saving to a single day, as any code that assumes that as a fact will fail if, for any reason, more than one file is accidentally left in the folder. You would also be vulnerable to data loss if your internet connection is interrupted for an extended period, as there will be no data backup (in the form of uploading to our servers).

Also, make sure that anything installed on the Shake itself it’s not too resource-intensive, as it could affect the standard Shake operations.

1 Like

Hi, Thanks a lot
Actually i tried to install libmseed on RS3D but i couldn’t get it to install
I’ve installed ObsPy on RS3D but i just found out i should upgrade it because ObsPy 1.3.1 ( version that i have) has some known issues with live-updating MiniSEED files
i need a library that support live data extraction from MiniSEED files