Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converting .csv file to SEG2 format .dat files) #26

Open
jaisinghverma opened this issue Aug 12, 2024 · 10 comments
Open

Converting .csv file to SEG2 format .dat files) #26

jaisinghverma opened this issue Aug 12, 2024 · 10 comments

Comments

@jaisinghverma
Copy link

Greetings of the day!
How can I convert my .csv file to SEG2 format .dat files) before using the file for processing in swprocess?

Thank you.

@jpvantassel
Copy link
Owner

jpvantassel commented Aug 15, 2024

Hi @jaisinghverma,
I do not know of an open-source SEG2 writer, but swprocess can read a variety of formats (SEG2, SEGY, SU). What I would recommend is to use obspy to write your data to SU format. Some information on that is provided here.

@jaisinghverma
Copy link
Author

jaisinghverma commented Sep 18, 2024 via email

@jpvantassel
Copy link
Owner

Hi @jaisinghverma,

This issue is caused by a bad value in your file's header. What version of swprocess are you running? I believe I implemented a work around to this problem in v0.3.0, following issue #16.

@jaisinghverma
Copy link
Author

jaisinghverma commented Sep 24, 2024 via email

@jpvantassel
Copy link
Owner

Hi @jaisinghverma,

The error is because your sensors (e.g., geophones) "must have unique x positions". It is most-likely that the header of your file is not setup correctly so the code cannot understand which sensors go at which position. You may be able to fix this by editing the text-based header and/or properly configuring your data acquisition system.

@alangi
Copy link

alangi commented Sep 24, 2024

I think that another option would be to run the files through Geopsy and assign coordinates there. Although I have only done this for passive processing, not MASW, so I'm not sure how to get the files out again.

@alangi
Copy link

alangi commented Sep 24, 2024

Maybe this could be an addition. A utility to import a settings file containing coordinates.

@jaisinghverma
Copy link
Author

Hi @jaisinghverma,

The error is because your sensors (e.g., geophones) "must have unique x positions". It is most-likely that the header of your file is not setup correctly so the code cannot understand which sensors go at which position. You may be able to fix this by editing the text-based header and/or properly configuring your data acquisition system.

@jaisinghverma
Copy link
Author

jaisinghverma commented Oct 1, 2024 via email

@jpvantassel
Copy link
Owner

Hi @jaisinghverma,

In SurfSeis there should be an option to assign coordinates (or positions) to your sensors. It would appear from the error above that all of your sensors are shown as being at the same location in the current .dat file. You will need to correct this.

An alternative to your current approach that may be easier for you is to use the components swprocess provides to create an seismic unix (SU) based data file. You do this by creating Sensor1C and Source objects to then create an Array1D object. The Array1D object has a method to write the data to_file. This can write the file to SU and then you can process that SU formatted data using the masw.ipynb.

Joe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants