Hi Thomas,<br><br>In addition to ray['t'], which will give you the cumulative distance traveled at that point in the ray, you can use ray['dts'] to get the just the distance through each individual cell.  Both of these will be normalized to the total distance of the ray, but you can use ray['dx'] to get you the cell size for each cell intersected by the ray, which you can then use along with 'dts' to calculate the physical distance the ray travels through each cell.<br>
<br>Britton<br><br><div class="gmail_quote">On Wed, Aug 8, 2012 at 12:03 PM, j s oishi <span dir="ltr"><<a href="mailto:jsoishi@gmail.com" target="_blank">jsoishi@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Thomas,<br>
<br>
Try doing something like<br>
<br>
ray = pf.h.ray(start_point,end_point)<br>
<br>
density = ray['Density']<br>
t = ray['t']<br>
<br>
where t is the distance along the ray of each sample. It will, by<br>
default, sample at the highest available resolution. If you need<br>
subsampling/interpolation, you'll have to wait for someone more<br>
knowledgeable that I am to jump in.<br>
<span class="HOEnZb"><font color="#888888"><br>
j<br>
</font></span><div class="HOEnZb"><div class="h5">On Wed, Aug 8, 2012 at 8:56 AM, Thomas Robitaille<br>
<<a href="mailto:thomas.robitaille@gmail.com">thomas.robitaille@gmail.com</a>> wrote:<br>
> Hi<br>
><br>
> I'm still relatively new to yt, and I'm trying to figure out a way to<br>
> extract the density along a ray joining two points. I've managed to<br>
> make a plot using PlotCollection.add_ray, but I can't figure out how<br>
> to get the actual data as a Numpy array. Also, I'd ultimately like to<br>
> compute the cumulative column density along the ray, so I'd like to<br>
> ensure that the sampling of distances along the ray is very fine to<br>
> get an accurate column density. Is there a way to do this?<br>
><br>
> Thanks for any help!<br>
><br>
> Cheers,<br>
> Tom<br>
> _______________________________________________<br>
> yt-users mailing list<br>
> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</div></div></blockquote></div><br>