-
Notifications
You must be signed in to change notification settings - Fork 14
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
Numpy array for data in patch? #12
Comments
I think I found it: topo.patches[0].data |
Hi Artie, Yes, indeed. In pySW4 we followed the Obspy data model:
In pySW4 this would be:
If you want to contribute a nice example of this functionality you are more than welcome. Cheers |
Hi Shahar –
I found the solution by just doing what seemed obvious and it worked. So kudos for adopting an intuitive data model.
I need to use pySW4 more to get more proficient. I’m working on a request to provide simulation results to a Museum for visualization. I’m working on a jupyter notebook to illustrate how data can be read and plotted. The Museum viz guys will output data into their formats.
Thanks,
Artie
From: Shahar Shani-Kadmiel <notifications@github.com>
Reply-To: shaharkadmiel/pySW4 <reply@reply.github.com>
Date: Wednesday, March 28, 2018 at 12:17 AM
To: shaharkadmiel/pySW4 <pySW4@noreply.github.com>
Cc: Arthur Rodgers <rodgers7@llnl.gov>, Author <author@noreply.github.com>
Subject: Re: [shaharkadmiel/pySW4] Numpy array for data in patch? (#12)
Hi Artie,
Yes, indeed. In pySW4 we followed the Obspy data model:
Stream . traces [list]
|--> Trace . data [numpy array]
| |--> . stats
| |--> ...
|
|--> Trace ...
In pySW4 this would be:
Image . patches [list]
|--> Patch . data [numpy array]
| |--> . header
| |--> ...
|
|--> Patch ...
If you want to contribute a nice example of this functionality you are more than welcome.
Cheers
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#12 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/APW-cMPxm0LZEh--lFEdApq0LHEmP2azks5tizjrgaJpZM4S-Drv>.
|
Looks like this one can be closed.. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi Shahar -
I want to use pySW4 to access, manipulate and output image data. Is there a way to access the regular 2D raster data of a patch object? For example the values of topo, gridz, vs, mag at the surface (z=0) or cross-section (not intersected by mesh refinement).
I can read SW4 image files into Image objects, but is there an attribute for the array of data that makes up the image, something like patch.data ?
The text was updated successfully, but these errors were encountered: