Open asharsae opened 4 months ago
Hi, would you please send me a data sample together with the files receivers.geo and shots.geo? Without this, it is impossible to solve the problem. Please use email (I don't really know how to use github): hermann.zeyen@universite-paris-saclay.fr Cheers, Hermann
I have sent it to your email. I sincerely appreciate your help, thank you for your feedback
Dear Ashar,
There is a problem with your data, they do not have standard SEG2 format. I use obspy to read the data and obspy says: "File indicates 7 traces, but there are only 0 trace pointers." What does it mean?
If you search the description of SEG2 format, you will see that in the beginning of a file, there is a File Descriptor Block. In bytes 4 and 5, there should be a number "Size of Trace Pointer Sub-block", which is typically equal to 4*N where N is the number of traces stored in the file (factor 4 because the pointers are written as Integer values in 4 bytes). However, in your data, there is a 0 and this is not possible.
Since the routine used to read the data file is not mine, but I am using an external library, is is difficult to solve this problem. I will see whether I can do something, but you should contact the obspy programmers and report a problem. Better even, you contact the enterprise who sold you the seismograph and mention this problem. They really should change there acquisition program to make the data real SEG2 data (see also the following part). Seg2 headers should contain the key words "RECEIVER STATION NUMBER and SOURCE STATION NUMBER. Also the values of "SOURCE_LOCATION" and "RECEIVER LOCATION" are all zeros, in all files and for all receivers. So, strictly speaking, your data are unusable, they are missing critical information.
Even if this problem was solved, there would be other problems, specific to my program:
your file names do not have the format needed by my program (and described in the manual): In front of the dot of the extension, you need a file numbering. Since in your case, a number exists, but it is always "7", the program will have problems to deal with your data. You should rename your files and call them, e.g., forward_Klp1.seg2, Mid_Klp2.seg2 and reverse_Klp3.seg2.
In the seg2 headers, there are no shot point and receiver point numbers. Therefore, you will need to write the file file_corrections.dat, which is described in the manual and which should look like follows if you renamed the files as proposed
1 1 1 1 0. 0 2 2 1 1 0. 0 3 3 1 1 0. 0
If I find a way around in obspy, I will tell you
All the best, Hermann
Hi again I found a way around, but your data have even more problems that what I mentioned earlier. e.g., it seems that the number of samples per trace varies from one shot to the next. This was not forseen in PyRefra - why did you aquire data like this, why not have always the same number of data? So, please download the new version of refraData.py and refraPlot.py and copy the file "obspy/io/seg2/seg2.py" to the corresponding position in your Python installation (see manual for this). Please take in mind that this is an ad hoc solution, it should not be perpetualized - your aquisition system should be reprogrammed. One more remark: I saw that the trigger times of your data seem to be wrong, signal does not start at time 0 (or the coordinates in receivers.geo are wrong). This may be corrected in file_corrections.dat, look in the manual for this.
Hi Hermann,
I have followed your instructions to download new version of refraData.py and refraPlot.py and i have reconstructed the reveivers.geo but it still showed an error. After last showing error in obspy now there is an error in pyrefra "keyError: -1".
Dear Mr. Hermann I intend to ask about problems related to solving bugs in the seg2.py file in obspy. I've followed the installation instructions from GitHub and run the program for my field data in Pyrefra. At first I didn't have any problems with the 24 geophones field data but when I ran the field data with 7 geophones it read an error "Has obspy bug "NOTE" been corrected?". How to solve it?