[yt-users] Density/Column density along a ray

j s oishi jsoishi at gmail.com
Wed Aug 8 09:03:07 PDT 2012

Hi Thomas,

Try doing something like

ray = pf.h.ray(start_point,end_point)

density = ray['Density']
t = ray['t']

where t is the distance along the ray of each sample. It will, by
default, sample at the highest available resolution. If you need
subsampling/interpolation, you'll have to wait for someone more
knowledgeable that I am to jump in.

On Wed, Aug 8, 2012 at 8:56 AM, Thomas Robitaille
<thomas.robitaille at gmail.com> wrote:
> Hi
> I'm still relatively new to yt, and I'm trying to figure out a way to
> extract the density along a ray joining two points. I've managed to
> make a plot using PlotCollection.add_ray, but I can't figure out how
> to get the actual data as a Numpy array. Also, I'd ultimately like to
> compute the cumulative column density along the ray, so I'd like to
> ensure that the sampling of distances along the ray is very fine to
> get an accurate column density. Is there a way to do this?
> Thanks for any help!
> Cheers,
> Tom
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

More information about the yt-users mailing list