[yt-users] Velocity dispersion profile

Nathan Goldbaum goldbaum at ucolick.org
Wed Feb 29 11:25:45 PST 2012


Hi Junhwan,

Can you paste a script and a traceback that shows the error you're seeing?  You should be able to pass the BulkVelocity to the derived field via set_field_parameters.

You can paste a script from the command line with the following command:

yt pastebin name_of_script.py

Nathan Goldbaum
Graduate Student
Astronomy & Astrophysics, UCSC
goldbaum at ucolick.org
http://www.ucolick.org/~goldbaum

On Feb 29, 2012, at 8:31 AM, Jun-Hwan Choi wrote:

> Hi YT users,
> 
> I would like to make a (spherical and/or cylindrical) profile of the velocity dispersion.
> In order to do so, I need to compute the mean velocity (BulkVelocity) for a given shell (or ring), and pass this value to newly defined velocity dispersion field, and then make a profile for the velocity dispersion field.
> Is there a particular way in yt to handle this?
> 
> Junhwan
> 
> P.S.: A few weeks ago I posted a similar question and Matt gave me a following hint.
> @derived_field(name = "deltaLocalCircularVelocity")
> def delta_LocalCircularVelocity(fi
> eld, data):
>  fn, x, cv = data.get_field_parameter("local_circular_velocity")
>  cv0 = na.interp(data[fn].ravel(), x, cv)
>  cv0 = cv0.reshape(data[fn].shape)
>  delta_cv = cv0 - data["LocalCircularVelocity"]
>  return delta_cv
> 
> You'll need to do something like this on the data object from which
> you are getting your data:
> 
>  sp.set_field_parameter("local_circular_velocity",
>      (fn, prof[fn], prof["LocalCircularVelocity"]))
> 
> However, it does not work for me and it is also complicate to understand and modify it.
> 
> 
> 
> 
> -- 
> --------------------------------------------------------------
> Jun-Hwan Choi, Ph.D.
> Department of Physics and Astronomy, University of Kentucky
> Tel: (859) 897-6737        Fax: (859) 323-2846
> Email: jhchoi at pa.uky.edu   URL: http://www.pa.uky.edu/~jhchoi
> --------------------------------------------------------------
> 
> 
> !DSPAM:10175,4f4e76d329502195409319! _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> 
> 
> !DSPAM:10175,4f4e76d329502195409319!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20120229/5b13497e/attachment.htm>


More information about the yt-users mailing list