<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 14, 2015 at 6:39 PM, Long Do Cao <span dir="ltr"><<a href="mailto:docao@vega.ess.sci.osaka-u.ac.jp" target="_blank">docao@vega.ess.sci.osaka-u.ac.jp</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word">Hi all yt-users,<div><br></div><div>I'm running into a simple problem I think, but can't find the correct documentation. </div><div><br></div><div>I want to make a slice plot of dark matter density with velocity vectors overlaid, using Gadget HDF5 data. I have uploaded my script here :</div><div><br></div><div><a href="http://paste.yt-project.org/show/5347/" target="_blank">http://paste.yt-project.org/show/5347/</a></div></div></blockquote><div><br></div><div>Hi Long,</div><div><br></div><div>This is a bit confusing in our API, and we should probably make an effort to improve our naming here, but the velocity callback ('annotate_velocity') is really the *gas* velocity callback.  It's not working in your case because you do not have any gas in your simulation.</div><div><br></div><div>Instead, you should call the quiver callback ('annotate_quiver'), and specify the deposited dark matter velocity fields as your field_x and field_y:</div><div><br></div><div><a href="http://yt-project.org/docs/dev/reference/api/generated/yt.visualization.plot_modifications.QuiverCallback.html?highlight=quivercallback">http://yt-project.org/docs/dev/reference/api/generated/yt.visualization.plot_modifications.QuiverCallback.html?highlight=quivercallback</a><br></div><div><br></div><div>Hope that helps, please let us know if you have any additional questions.</div><div><br></div><div>-Nathan</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div>The slice plot works fine. However, I got an error message for the velocity overlay:</div><div><br></div><div><a href="http://paste.yt-project.org/show/5349/" target="_blank">http://paste.yt-project.org/show/5349/</a></div><div><br></div><div>The bottom line is the following :</div><div><pre style="margin:0px;padding:5px 0px;font-family:'Bitstream Vera Sans Mono',monospace;font-size:13px;color:rgb(0,0,0);font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;word-spacing:0px">YTFieldNotFound: Could not find field '('all', 'velocity_x')' in snapshot_000.</pre><div><br></div><div>The error is pretty obvious, I think YT is looking for the default field, whereas it should look for a deposit of the dark matter data. Somehow I should specify that yt should look for this deposit, but I don't know how ?</div><div><br></div><div>Thank you by advance for your help,</div><div><br></div><div>Long</div><div><br></div><div>
<div style="word-wrap:break-word"><font color="#868686"><div style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica">--------------------------------------------------------------</div><div style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica">Long DO CAO (Office F617)</div><div style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica">Office phone: <a href="tel:%2B81%206-6850-5482" value="+81668505482" target="_blank">+81 6-6850-5482</a></div><div style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica">Osaka University, Graduate School of Science</div><div style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica">Department of Earth and Space Science</div><div style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica">1-1 Machikaneyama-cho</div><div style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica">Toyonaka, Osaka, 560-0043, Japan</div><div style="margin:0px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:12px;line-height:normal;font-family:Helvetica">---------------------------------------------------------------</div></font></div>
</div>
<br></div></div><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></blockquote></div><br></div></div>