Closed yt-fido closed 7 years ago
Original comment by Benjamin Thompson (Bitbucket: cosmosquark, GitHub: cosmosquark):
@hegan @jisuoqing I am interested in what you find, was going to add cylindrical_velocities to the particle data too (cylindrical_radius for particles only exist in this PR for now) https://bitbucket.org/yt_analysis/yt/pull-request/1308/particle_cylindrical_r-and/diff . I imagine that the particles may have something wrong with the radial velocities as well.
Original comment by Britton Smith (Bitbucket: brittonsmith, GitHub: brittonsmith):
Either calling resize vector or the function itself is wrong. It is resizing all incoming arrays to be of size (3, 1, 1, 1) or (3, 1). Either way, it seems to be chopping off all of the actual data.
Original comment by Britton Smith (Bitbucket: brittonsmith, GitHub: brittonsmith):
I had just been looking radius fields themselves, but these could have similar problems.
Original comment by Matt Turk (Bitbucket: MatthewTurk, GitHub: MatthewTurk):
@brittonsmith does this look familiar to you? I recall you looked recently at the various radial velocities.
Originally reported by: Suoqing Ji (Bitbucket: jisuoqing, GitHub: jisuoqing)
Recently I just found that
cylindrical_radial_velocity
in yt3 does not give me what I expect. To test this, I setup a 3-D Sedov problem with domain[-0.5, 0.5]^3
and explosion center at[0, 0, 0]
, and plot thecylindrical_radial_velocity
as the following image. According to the pattern of the velocity streamline, the cylindrical radial velocity should be positive.I don't understand in the function of
_cylindrical_radial
in yt/fields/vector_operations.py:what does the line of
resize_vector
do. If I replace this simply with linetheta = data['cylindrical_theta']
, it will give the image I expected as the following.In addition, if I want to plot the same field for a 2-D Sedov dataset, the error of
yt.utilities.exceptions.YTFieldNotFound: Could not find field '('all', 'cylindrical_radial_velocity')'
will be raised. However, if changing the lineinto
the correct image will be generated without raising any error. But I'm not very certain what's the correct way to fix this.