Importing .mat data into Geopsy

Discuss here all technical and scientific questions about the processing of ambient vibrations for site characterization (H/V, Array methods,...)
Post Reply
jeobiri
Posts: 1
Joined: Fri Sep 30, 2022 1:34 pm

Importing .mat data into Geopsy

Post by jeobiri »

Hi Marc,

I am trying to use Geopsy for the first time and am struggling to import the signal data (in .mat format) despite seeing that the format is supported. I have searched for relevant documentation with no luck.

I would like to know if there is any specific format for the .mat file to be arranged in for it to be imported correctly. More specifically:

1. Can all the stations be in the same mat file or do I need to separate them?

2. Can all the components of the individual stations be in the same mat file?

I look forward to your response.


Regards,

Ebitimi.
admin
Site Admin
Posts: 822
Joined: Mon Aug 13, 2007 11:48 am
Location: ISTerre
Contact:

Re: Importing .mat data into Geopsy

Post by admin »

Hi Ebitimi,

The .mat files produced by Matlab and Octave are accepted. The comments below are checked with the latest code modifications on branch 3.4 (version 3.4.3-preview). I'm unsure if it works correctly with release 3.4.2 or previous ones. If you are running Geopsy under Linux or MacOS, you have access to our git repository and you can compile the code yourself (see details here). Compilation under Windows is also possible but I haven't documented it yet. Binaries are available for Windows but they are not updated regularly.
1. Can all the stations be in the same mat file or do I need to separate them?
You can store several matrices in a single .mat file. Only N x M matrices are considered. Higher order matrices are not considered. N is the number of sample in each trace. M is the number of channels. The name of the .mat variable appears as the SignalName.
2. Can all the components of the individual stations be in the same mat file?
Components are not identified automatically. The component of all channels is set to "Vertical" by default.

The minimal additional information to supply before using the signals inside Geopsy is the SamplingFrequency and a valid start time (even if it is fake). You can adjust the properties of the signals in several ways, but the most productive is through menu "Edit/Set headers" where a tiny script can do the job, for instance:

Code: Select all

for(i=0; i<signals.length; i++) {
  signals[i].startTime="20000101";
  signals[i].samplingFrequency=400;
  switch(signals[i].name.substring(4,5)) {
  case "r":
    signals[i].component="East";
    break;
  case "t":
    signals[i].component="North";
    break;
  case "z":
    signals[i].component="Vertical";
    break;
  }
  signals[i].name="N"+rightJustified(signals[i].name.substring(6,8)*1+1, 2, "0")
}
The signal properties right after importing the .mat file are show in the attached figure ("properties_0"). After running the above script, they are transformed and shown in the second figure ("properties_1").
Attachments
properties_0.png
(99.72 KiB) Not downloaded yet
properties_1.png
(85.87 KiB) Not downloaded yet
Post Reply