<div dir="ltr">A follow-up question,<div><br></div><div>Is there a way to change the labels on the x, y axes and colorbar text?</div><div><br></div><div>From</div><div>G.S.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Feb 24, 2014 at 5:31 PM, Geoffrey So <span dir="ltr"><<a href="mailto:gsiisg@gmail.com" target="_blank">gsiisg@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 Sam,<div><br></div><div>I might be mistaken but it seems the convert_function requires there to be already a cgs conversion factor YT knows about, and unfortunately this field I'm working with does not have that.  What I used to do is just multiply the conversion factors in after making the FRB, but I'm starting to try to using the new Projection/PhasePlot.</div>

<div><br></div><div>I tried the script you have up there, and I think it is doing the same thing I was with the FRB.  At least I see the colorbar also changed accordingly, which is exactly what I hoped for, thanks!</div>
<div>
<br></div><div>From</div><span class="HOEnZb"><font color="#888888"><div>G.S.</div><div><br></div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 24, 2014 at 4:52 PM, Sam Skillman <span dir="ltr"><<a href="mailto:samskillman@gmail.com" target="_blank">samskillman@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 Geoffrey,<div><br></div><div>Yes, it would save time to multiply the projection object by a constant factor if your projection has already been done. However, it is a bit dangerous to do this since now you need to manually edit how all the units/labels work out. </div>



<div><br></div><div>I'd suggest just creating a new derived field that uses the convert_function option (<a href="http://yt-project.org/docs/dev/analyzing/creating_derived_fields.html#field-options" target="_blank">http://yt-project.org/docs/dev/analyzing/creating_derived_fields.html#field-options</a>). A good, non-trivial example is the SZY field:</div>



<div><a href="https://bitbucket.org/yt_analysis/yt/src/61e6b84f875cc8fcf25b5b1e67ddd501a19daf68/yt/data_objects/universal_fields.py?at=yt#cl-577" target="_blank">https://bitbucket.org/yt_analysis/yt/src/61e6b84f875cc8fcf25b5b1e67ddd501a19daf68/yt/data_objects/universal_fields.py?at=yt#cl-577</a></div>



<div><br></div><div>If you do want to manually modify an projection object, you can do something like the following:</div><div>
<br></div><div><div>from yt.mods import *</div><div>pf = load('IsolatedGalaxy/galaxy0030/galaxy0030')<br></div><div>proj_pw = ProjectionPlot(pf, 0, 'Density', weight_field='Density')<br></div></div>




<div>proj_pw.save('before')</div><div>proj_pw.data_source['Density'] *= 1.5<br></div><div><div>proj_pw.refresh()<br></div></div><div><div>proj_pw.save('after')</div></div><div><br></div><div>Sam</div>




<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Mon, Feb 24, 2014 at 12:26 PM, Geoffrey So <span dir="ltr"><<a href="mailto:gsiisg@gmail.com" target="_blank">gsiisg@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><div dir="ltr">Hi all,<div><br><div>Will I be saving computation time by multiplying some constant conversion factors on the projection object instead of creating a derived field with an existing field multiplied by the factors?</div>




</div><div><br></div><div>And how would I go about multiplying the projection by some factors?</div><div><br></div><div>If there's no significant saving I'll just do the derived field.</div><div><br></div><div>From</div>



<span><font color="#888888">
<div>G.S.</div></font></span></div>
<br></div></div>_______________________________________________<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" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<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" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br></div>
</div></div></blockquote></div><br></div>