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

cant plot segy data "must be an array of at least two dimensions" #85

Open
nikste opened this issue Nov 14, 2024 · 1 comment
Open

cant plot segy data "must be an array of at least two dimensions" #85

nikste opened this issue Nov 14, 2024 · 1 comment

Comments

@nikste
Copy link

nikste commented Nov 14, 2024

Hi, just found this nice project, thanks!
I am struggling with some "segy" data.

It seems in python with segyio i can load and display data (e.g. using cube = segyio.cube(filename)).
However trying to load the same file in RGPR and subsequently trying to plot(x)
it results in:

Error in base::rowSums(x, na.rm = na.rm, dims = dims, ...) : 
  'x' must be an array of at least two dimensions

checking:

> nrow(x)
[1] 1024
> ncol(x)
[1] 542
> dims(x)

seems like 2 Dimensional data.
I have to admit at this point that I am a lot more proficient in python than in R.
Am I doing something wrong? Is the segy file broken ?
the example:

plot(frenkeLine00)

plots as expected.
Thanks for your help!

@emanuelhuber
Copy link
Owner

Hello @nikste

Thank you for opening this issue. I checked where the function rowSums() is used and I think that your issue is related to the coordinates or to the trace positions.

Can you tell me, what is the output of?

# trace coordinates
coord(x)

# trace relative position on the GPR line estimated when reading the file
pos(x)

# compute trace relative position on the GPR line based on coordinates -> should raise an error
relTrPos(x)

(I assume that x is the GPR object).

Best
Emanuel

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

2 participants