<div dir="ltr">Hi Nathan (and yt-users),<div><br></div><div>Thanks!  Yes, </div><div><div style="font-size:12.8px">arr_in_cm = ndarray_in_centimeters * cm</div></div><div><br></div><div>got yt to see that I was talking about cm.</div><div><br></div><div>The problem is that I still don't see the points.  Is there any example of putting points on a volume rendering?  I am trying to mix the "Volume Rendering with Lines" cookbook recipe with the PointSource api description, but am not sure what I am hoping my result will look like--for example, how big can I expect my points to be?  Is that something I can set?</div><div><br></div><div>Thanks,</div><div><br></div><div>Stephanie</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div><div><font face="garamond,serif">--<br>Dr. Stephanie Tonnesen<br></font></div><font face="garamond,serif">Alvin E. Nashman Postdoctoral Fellow<br></font></div><font face="garamond,serif">Carnegie Observatories, Pasadena, CA<br></font></div><font face="garamond,serif"><a href="mailto:stonnes@gmail.com" target="_blank">stonnes@gmail.com</a><br></font></div></div></div>
<br><div class="gmail_quote">On Mon, Jun 19, 2017 at 5:48 PM, Nathan Goldbaum <span dir="ltr"><<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Stephanie,<div><br></div><div>If you have a loaded dataset, you can convert an ndarray that you know is in centimeters to a YTArray in code_length units like so:</div><div><br></div><div>arr_in_code_length = ds.arr(ndarray_in_centimeters, 'cm').to('code_length')</div><div><br></div><div>In addition, I don't think you actually need to convert to code_length units if you are passing this array to yt, since yt will internally do the conversion if you hand it a YTArray with units, so just creating an array like this is sufficient:</div><div><br></div><div>from yt.units import cm</div><div><br></div><div>arr_in_cm = ndarray_in_centimeters * cm</div><div><br></div><div>And then pass arr_in_cm to some yt function.</div><div><br></div><div>If all you want is the conversion factor from CGS to code length units, then you can inspect ds.length_unit. For example, the conversion from code length units to CGS is ds.length_unit.in_cgs(). There are a number of unit attributes that are attached to datasets (ds.mass_unit, ds.velocity_unit, ds.pressure_unit) that are useful for this sort of thing.</div><div><br></div><div>Hope that helps!</div><div><br></div><div>-Nathan</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Mon, Jun 19, 2017 at 7:38 PM, Stephanie Tonnesen <span dir="ltr"><<a href="mailto:stonnes@gmail.com" target="_blank">stonnes@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi yt-users!<div><br></div><div>I have what I think should be a relatively simple question.  I am trying to make a 3D image of a region of a cosmological simulation, and plot points in the image.  I define my region with box(left_edge,right_edge) where left_edge and right_edge are in code units.  However, the points that I read in from an earlier file are in cgs units.  Since the file was written using yt output, I would like to just let yt do the conversions, but nothing has units attached.  I want the 3d image to get everything into the same units.  I feel like there are a few ways I could fix this problem--1)  tell yt that my points are in cgs units, 2) force the create_scene to be in cgs units, 3) get yt to tell me the conversion factor from code units to cgs units.  </div><div><br></div><div>Unfortunately, I don't know how to do any of these things!  </div><div><br></div><div>Can someone give me some advice on what to do here?</div><div><br></div><div>Thanks!</div><div><br></div><div>Stephanie</div><div><br clear="all"><div><div class="m_4368207392898221626m_-8618322365058336243gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div><div><font face="garamond,serif">--<br>Dr. Stephanie Tonnesen<br></font></div><font face="garamond,serif">Alvin E. Nashman Postdoctoral Fellow<br></font></div><font face="garamond,serif">Carnegie Observatories, Pasadena, CA<br></font></div><font face="garamond,serif"><a href="mailto:stonnes@gmail.com" target="_blank">stonnes@gmail.com</a><br></font></div></div></div>
</div></div>
<br></div></div>______________________________<wbr>_________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" rel="noreferrer" target="_blank">http://lists.spacepope.org/lis<wbr>tinfo.cgi/yt-users-spacepope.<wbr>org</a><br>
<br></blockquote></div><br></div>
<br>______________________________<wbr>_________________<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" rel="noreferrer" target="_blank">http://lists.spacepope.org/<wbr>listinfo.cgi/yt-users-<wbr>spacepope.org</a><br>
<br></blockquote></div><br></div>