Hi Nathan,

Thanks for your email. Indeed, I just had to change the field name and function to :

 slc.annotate_quiver(("deposit","all_cic_velocity_x"),("deposit","all_cic_velocity_y"),factor=16)

and that solved my problem. You can close the ticket.

Thanks again,

Long

On 17 janv. 2015, at 10:04, Nathan Goldbaum wrote:



On Wed, Jan 14, 2015 at 6:39 PM, Long Do Cao <docao@vega.ess.sci.osaka-u.ac.jp> wrote:
Hi all yt-users,

I'm running into a simple problem I think, but can't find the correct documentation. 

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 :


Hi Long,

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.

Instead, you should call the quiver callback ('annotate_quiver'), and specify the deposited dark matter velocity fields as your field_x and field_y:


Hope that helps, please let us know if you have any additional questions.

-Nathan
 

The slice plot works fine. However, I got an error message for the velocity overlay:


The bottom line is the following :
YTFieldNotFound: Could not find field '('all', 'velocity_x')' in snapshot_000.

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 ?

Thank you by advance for your help,

Long

--------------------------------------------------------------
Long DO CAO (Office F617)
Office phone: +81 6-6850-5482
Osaka University, Graduate School of Science
Department of Earth and Space Science
1-1 Machikaneyama-cho
Toyonaka, Osaka, 560-0043, Japan
---------------------------------------------------------------


_______________________________________________
yt-users mailing list
yt-users@lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org


_______________________________________________
yt-users mailing list
yt-users@lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

--------------------------------------------------------------
Long DO CAO (Office F617)
Office phone: +81 6-6850-5482
Osaka University, Graduate School of Science
Department of Earth and Space Science
1-1 Machikaneyama-cho
Toyonaka, Osaka, 560-0043, Japan
---------------------------------------------------------------