<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 18, 2016 at 5:42 PM, Stephanie Tonnesen <span dir="ltr"><<a href="mailto:stonnes@gmail.com" target="_blank">stonnes@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div>Hi yt-users,<br><br></div>I am trying to get HI_Density in units of g/cm^3 but can only seem to get it in terms of code mass/code length^3.  <br><br>The relevant parts of my code look like this:<br><br>print(ds.field_list)<br><br></div><div>#only select the refined region of the box<br></div><div>ads = ds.r[0.42426:0.599523,0.<wbr>450995:0.65,0.423461:0.590858]<br>adv = dv.r[0.373047:0.628906,0.<wbr>369141:0.625,0.369141:0.<wbr>662109]<br>ads.set_field_parameter('<wbr>omega_baryon',0.046)<br>adv.set_field_parameter('<wbr>omega_baryon',0.046)<br><br>plot = yt.PhasePlot(ads,"baryon_<wbr>overdensity","temperature",["<wbr>HI_Density"])<br><br>plot.save()<br><br>plot = yt.PhasePlot(adv,"baryon_<wbr>overdensity","temperature",["<wbr>HI_Density"])<br><br>plot.save()<br><br></div><div>Then I see that one of my fields is ('enzo','HI_Density') and I get a phaseplot that looks good except HI_Density is in code mass/code length^3.  If I try "hi_density" I get that there is no field ('stars','hi_density').  If I try ('gas','hi_density') I get that there is no field ('stars',('gas','hi_density').<wbr>  If I try "gas","hi_density" then I get that there is no field 'stars','gas'.  I also tried to write ["HI_Density"].in_cgs() and that didn't work.  [("HI_Density").in_cgs()] also didn't work.  <br><br></div><div>Can anyone help me get cgs units in this phaseplot?<br></div></div></blockquote><div><br></div><div>Hi Stephanie,</div><div><br></div><div>You have two options:</div><div><br></div><div>plot.set_unit('HI_Density', 'g/cm**3')</div><div><br></div><div>Or you can create the plot with the ('gas', 'H_p0_density') density field, which is an alias to the ('enzo', 'HI_Density') field. This is the universal yt field name for HI density. The HI_Density field is an on-disk field, so by default it is always represented in code units in plots unless you specify otherwise. The name for this field uses yt's notation for ions, where p0 means netural, p1 means singly ionized, etc.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>Thanks!<br><br></div><div>Stephanie<br><br></div><div><div><div><div><div 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></div></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></div>