jpjones76 / SeisIO.jl

Julia language support for geophysical time series data
http://seisio.readthedocs.org
Other
47 stars 21 forks source link

Read SEGY into NodalData? #55

Closed tclements closed 3 years ago

tclements commented 3 years ago

As of now, SeisIO reads SEGY files into SeisData. If the file format is non-standard, read_data returns a SeisData with a single SeisChannel with a gap between each channel.

DAS datasets are regularly saved in SEGY format. For instance, here is some DAS data stored as SEGY from the FORGE experiment. Reading this with SeisIO#dev

using SeisIO
read_data("segy","FORGE_78-32_iDASv3-P11_UTC190428134938.sgy")
SeisData with 1 channels (1 shown)
    ID: .0..YYY                            
  NAME: .0..YYY                            
   LOC: 0.0 N, 0.0 E, 0.0 m                
    FS: 2000.0                             
  GAIN: 0.0                                
  RESP: a0 1.0, f0 1.0, 0z, 0p             
 UNITS:                                    
   SRC: /home/timclements/Downloads/FORGE… 
  MISC: 0 entries                          
 NOTES: 1 entries                          
     T: 2019-04-28T13:38:38 (1279 gaps)    
     X: +0.000e+00                         
        +0.000e+00                         
            ...                            
        -2.630e+03                         
        (nx = 38400000)                    
     C: 0 open, 0 total

returns one channel with 1279 gaps.

I see two options here:

  1. return a NodalData when reading SEGY files with read_data
  2. move SEGY reading to read_nodal only

I don't like Option 1 because then read_data has two possible outputs.

Option 2 seems better going forward but is a breaking change.

jpjones76 commented 3 years ago

I agree that read_nodal needs a SEGY method, but the only viable solution is for both read_nodal and read_data to have SEGY support.

SEGY is very widespread, and most SEGY data is incompatible with the assumptions underlying nodal data. We are talking about a file format that literally dates back to punch cards. It was also PASSCAL's default for Reftek conversion until ~2010.

(My personal example here is that every data set from my graduate fieldwork was SEGY; so was every data set I worked with as a postdoc; so were all the other data files at U. Alberta and U. Calgary, more or less.)

jpjones76 commented 3 years ago

...actually, looking at the output here, I have some questions about the .sgy test file that you're reading. Might need a separate Issue for that. Can you share the file with me?

tclements commented 3 years ago

Having both read_data and read_nodal works for me. The link for the file is here https://pando-rgw01.chpc.utah.edu/silixa_das_apr_28_2019/FORGE_78-32_iDASv3-P11_UTC190428135038.sgy

jpjones76 commented 3 years ago

I can't tell if I need an issue here; the file doesn't read correctly, but I don't know if that's a SeisIO bug, or nonstandard SEG Y, or (as-yet unsupported) SEG Y rev 2.0. The trace headers claim to be SEG Y rev 1.0, which should be readable. Do you know the data source?

(edit) Issue found, see below

jpjones76 commented 3 years ago

Ok, found the issue. I've turned that into a new GitHub issue, but I'm still working on adding SEG Y to read_nodal. That should be ready on dev tonight.

At some point I'm going to merge this all into master, but I want to be certain it meets the needs of your group first.

jpjones76 commented 3 years ago

Is it OK if I add this file to the SeisIO test data suite for read_nodal? I think I have this ready, but need to test on at least Travis-CI. I'll encrypt it so that the file isn't available to the public.

tclements commented 3 years ago

Yes, feel free to add this is public data.

jpjones76 commented 3 years ago

Fixed on master and in the new release. Will close this issue as soon as Julia Registrator merges my PR(s).