<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Junhwan,</div><div><br></div><div>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.</div><div><br></div><div>You can paste a script from the command line with the following command:</div><div><br></div><div>yt pastebin name_of_script.py</div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Nathan Goldbaum<br>Graduate Student<br>Astronomy & Astrophysics, UCSC<br><a href="mailto:goldbaum@ucolick.org">goldbaum@ucolick.org</a><br>http://www.ucolick.org/~goldbaum</div></span></div></span></div></span></span>
</div>
<br><div><div>On Feb 29, 2012, at 8:31 AM, Jun-Hwan Choi wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi YT users,<br>
<br>
I would like to make a (spherical and/or cylindrical) profile of the velocity dispersion.<br>
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.<br>
Is there a particular way in yt to handle this?<br>
<br>
Junhwan<br>
<br>
P.S.: A few weeks ago I posted a similar question and Matt gave me a following hint.<br>
@derived_field(name = "deltaLocalCircularVelocity")<br>
def delta_LocalCircularVelocity(fi<div id=":5e">eld, data):<br>
  fn, x, cv = data.get_field_parameter("local_circular_velocity")<br>
  cv0 = na.interp(data[fn].ravel(), x, cv)<br>
  cv0 = cv0.reshape(data[fn].shape)<br>
  delta_cv = cv0 - data["LocalCircularVelocity"]<br>
  return delta_cv<br>
<br>
You'll need to do something like this on the data object from which<br>
you are getting your data:<br>
<br>
  sp.set_field_parameter("local_circular_velocity",<br>
      (fn, prof[fn], prof["LocalCircularVelocity"]))<br>
<br>
However, it does not work for me and it is also complicate to understand and modify it.<div class="yj6qo ajU"><div id=":9f" class="ajR" tabindex="0"><img class="ajT" src="x-msg://1290/images/cleardot.gif"></div></div></div><br><br clear="all">
<br>-- <br>--------------------------------------------------------------<br>Jun-Hwan Choi, Ph.D.<br>Department of Physics and Astronomy, University of Kentucky<br>Tel: (859) 897-6737        Fax: (859) 323-2846<br>Email: <a href="mailto:jhchoi@pa.uky.edu" target="_blank">jhchoi@pa.uky.edu</a>   URL: <a href="http://www.pa.uky.edu/%7Ejhchoi" target="_blank">http://www.pa.uky.edu/~jhchoi</a><br>
--------------------------------------------------------------<br><br><br>


!DSPAM:10175,4f4e76d329502195409319!
_______________________________________________<br>yt-users mailing list<br><a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org<br><br><br>!DSPAM:10175,4f4e76d329502195409319!<br></blockquote></div><br></body></html>