Loading data in spherical polar coordinates
Hi Everyone, I have data which is in spherical polar coordinates, so basically rho(r, theta, phi) and I can't seem to find an appropriate interface in yt to load the data with. Is there a function that can do that? If not, is there a function that takes in as an argument the (x,y,z) coordinate for each data point that I want to plot? i.e. take in as an argument, a 3D array which is the full grid. The current interface only seems to take in the bounding box. Thanks, Mani
There are some potentially-helpful commands in "math_utils.py", although
they aren't loaded by default into the api when you "from yt.mods import
*", so you'll have to load them individually.
go to yt-i386/src/yt-hg/yt/utilities/math_utils.py and poke around.
You can load them as per:
import yt.utilities.math_utilities as mu
mu.get_sph_phi() # or whatever command in math_utilities.py
There is some documentation in line in the code, which may provide help,
but it isn't comprehensive so if you have any questions, please write to
the list.
Cameron
On Fri, Feb 7, 2014 at 5:20 PM, Mani Chandra
Hi Everyone,
I have data which is in spherical polar coordinates, so basically rho(r, theta, phi) and I can't seem to find an appropriate interface in yt to load the data with. Is there a function that can do that?
If not, is there a function that takes in as an argument the (x,y,z) coordinate for each data point that I want to plot? i.e. take in as an argument, a 3D array which is the full grid. The current interface only seems to take in the bounding box.
Thanks, Mani
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
-- Cameron Hummels Postdoctoral Researcher Steward Observatory University of Arizona http://chummels.org
Hi Mani,
As Cameron mentioned, there are some utilities to make this
transformation internally. Right now we have *limited* support for
non-Cartesian coordinates being read directly in and manipulated in yt
3.0, but spherical coordinates are not yet implemented. We have
support for cylindrical polar (again, in a limited fashion) but not
yet spherical. Adding support for it is on the roadmap, but right now
it is not top priority unfortunately. What that means is that right
now you could likely do volumetric analysis with it, things like slice
plots and so on will not work properly.
-Matt
On Fri, Feb 7, 2014 at 7:20 PM, Mani Chandra
Hi Everyone,
I have data which is in spherical polar coordinates, so basically rho(r, theta, phi) and I can't seem to find an appropriate interface in yt to load the data with. Is there a function that can do that?
If not, is there a function that takes in as an argument the (x,y,z) coordinate for each data point that I want to plot? i.e. take in as an argument, a 3D array which is the full grid. The current interface only seems to take in the bounding box.
Thanks, Mani
_______________________________________________ yt-dev mailing list yt-dev@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org
participants (3)
-
Cameron Hummels
-
Mani Chandra
-
Matthew Turk