PeterMakus / SeisMIC

SeisMIC is a python software suite to monitor velocity changes using ambient seismic noise.
https://petermakus.github.io/SeisMIC/
European Union Public License 1.2
49 stars 12 forks source link

problem about "network" #64

Closed amell567 closed 6 months ago

amell567 commented 6 months ago

Hello, I collected some data by myself with a three-component seismograph, the original format of the data is DLD, the data can be converted into miniseed format using sololite, but there is no network information in the data, may I ask how to edit the network when I edit and sort the files? Can i define one myself?

amell567 commented 6 months ago

70d574647cf7e579715fb8f88973d1e

PeterMakus commented 6 months ago

Hi @amell567 , Thanks for getting in touch. I would recommend to use ObsPy to edit the metadata. You can just open the files using obspy.read and then edit the metadata fields that need to be adjusted in trace.stats. Can surely be automated via a short script. Alternatively, you could use PyRocko to do the conversion and I think Pyrocko let's you update the metadata as well. Best, Peter

P.S.

I will close the issue for now because it is not really a SeisMIC related issue, but rather external. Feel free to answer to the thread though.

amell567 commented 5 months ago

Hello, sorry to bother you! I had some problems when running monitor.py, but my params.yaml file seems to have no problems and was saved according to the tutorial. Please give me some suggestions, thank you very much!

42fa1e48fae9a917ad47d482bc764b1
PeterMakus commented 5 months ago

Hi, could you attach your params.yaml? This seems like the key mentioned in the error is missing in the parameter file (or is perhaps misspelled).

Also, could you check how large your correlations file is (the one in corr/X9-X9.IR1-IR.HHE-HHE.h5)? The other error suggests that you might not have saved the correlation subdivisions

Best, Peter

amell567 commented 5 months ago

Hi, Thank you very much for your help, I have solved this problem some time ago, just need to add 'return_sim_mat: True' to the "dv" code in the params.yaml file

PeterMakus commented 5 months ago

OK, that's what I was getting at. Perfect then!

PeterMakus commented 5 months ago

please refer to the obspy documentation here. The code snippet you sent does not contain any SeisMIC code.

amell567 commented 4 months ago

Hello, I started to process my local miniseed data after running the data downloaded from the fdsn server successfully according to the tutorial. When dealing with correlation, I modified the file path and time in the correlate.py and params.yaml files, then processed it with mpi, but no h5 file was generated. Can you give me some advice? a66f85784d2b1efd48147373b161254 cdd438e9bc207d180fc25ef771fd9f2 cc41a46ea5e29116b796e09b44c273e b5517bc60cfcd39a9ad45f2c46165f6

PeterMakus commented 4 months ago

Hi, judging from the screenshot, it looks like it did something though (the progress bar shows 9 steps).

Are you computing autocorrelations here? (i.e., setting to autoComponents in the params.yaml?).

Can you double-check that it did really not create a folder named data3/corr? That is where the h5 files should be.

amell567 commented 4 months ago

Hello, thank you very much for your help! Yes, it seems to be doing something, the progress bar shows 9 steps, but when I processed the data downloaded from the fdsn server according to your tutorial earlier, the progress bar showed 11 steps and the processing time was also 7 8 seconds, as shown in the first image. My local miniseed data is much larger than the one used in the tutorial, the processing steps should be longer and take a little longer, but only 9 steps are shown here, and after calculating the autocorrelation (I have setted to autoComponents in the params.yaml), a folder named data3/corr is created, but no h5 file is generated. So I don't know where the problem is, I feel that the calculation of autocorrelation is not doing a good job, can you give me some advice? image 9f8de0415812446fc38afac0015218e 846d868a51dcd271fcea72963d35b55 dc6f1bb7bcbdea9b75e8c4dc9e02553 41e082b7ae3b7aa689aed6052e18134

PeterMakus commented 4 months ago

From the things you sent, it is very difficult to judge what is happening. Can you set the logging to ´DEBUG´? Also, do you have corresponding response files?

It seems like some unlogged error occurs for each of the files.

Also, it makes perfect sense that it shows 9 steps as you are processing 9 days of data (vs. 11 in the tutorial).

amell567 commented 4 months ago

I have the corresponding response file and put it in the inventory folder. I set the logging as "DEBUG" according to what you said, as shown in the figure. The result of calculation is quite large, so I took part of it, but I still don't know what the problem is, because my local miniseed data seems to have no problem. Because I have carried out some other operations with the data, such as generating waveform graphs, which all show that my data is available, please give me some suggestions, thank you very much! 3b4bba68f5607850ccbb44210d1e459 3e70a0c4e04d16b3675adf5012ca90a 49c934924ada92b1c928c754c113872 a6b1cec54bd24ee9fbddadc2d84c4ee

PeterMakus commented 4 months ago

Ok here is what I can tell from this:

SeisMIC manages to open the streams and preprocess them. But then it seems to think that none of them are valid to compute valid auto-correlations on. I haven't heard of anything like that yet. But it does make me wonder which kind of data you are using. What does the channel code ´´DPE´´ stand for? What is it sampled it? Can you open the mseed files using obspy.read and see if you can plot them normally?

amell567 commented 4 months ago

Thank you for your patience, my miniseed data was extracted by sololite software, I have asked the staff of the seismograph company, the channel DPE may be related to the naming rules when the software exported the data, or it may be related to the software and database read, but it should not affect the processing of the data. The E in DPE is the component, and the channels of the three components are DPE,DPN,DPZ. In some data of others, I have also seen channels named BHE or ZNE, which may be because of the different naming rules. I used the code obspy.read to read the content of the day's data in my miniseed file, and drew the waveform diagram with another code, the result as shown in the figure, which should represent that the data is normal. faffb7f158c726c5942d609f870bf82 12875baa19e79c61f1d343f5332b3b7 13830da773234ee6408ec70dfb582d2 9127d21db83ef3150b1fdadce328ca3

PeterMakus commented 4 months ago

Hm, This all looks like it should work. Is there a chance that you could upload 2 days of your data to some cloud? Then I could see whether I can make it work on my machine.

One potential issue I see is that I never used SeisMIC on windows. In principle it should work, but all people I know have either been using Linux or MacOS.

amell567 commented 4 months ago

I uploaded the data of 2023.11.20-11.21 to the onedrive cloud, is it convenient for you to download? In addition, the problem may be system related, but I think since I can follow the tutorial on windows to process the fdsn server data, I should be able to continue to process my local miniseed data, or maybe I know too little about Linux or MacOS. Thank you for taking so much time to help me, if the data on onedrive is not available, please let me know.The link of onedrive is here:https://1drv.ms/u/s!AhfXiwxM7b1Lcehqskamj5qXkrE?e=hIEP8g

PeterMakus commented 4 months ago

So here is what I think has happened:

You have named your files incorrectly. The last 3 digits in the filename correspond to the day of the year/julian day. So for the data that you sent me the correct file names are: ´SS.14319..DPE.D.2023.324´ and ´SS.14319..DPE.D.2023.324´ because November 20th and 21st are the 324th and 325th day of the year 2023. After renaming them accordingly, SeisMIC computed the correlations without any issue.

If they are named incorrectly, the data will be loaded but discarded immediately as it does not correspond to the expected times.

amell567 commented 4 months ago

I'm so sorry! I made the mistake of forgetting that the number in the name represents the day of the year, and I was very ashamed of it, but after looking for a lot of solutions, the final problem turned out to be such a simple mistake! I just recalculated the correlation after changing the name, and it worked. I'm sorry again for wasting your precious time. At the same time, thank you very much for your patient help these days. This software of yours will be of great help to my postgraduate work in the next few years.Wish you a happy life!

PeterMakus commented 4 months ago

Great! Happy to hear it works now!