<div dir="ltr">I like the option of just adding a "dimension" argument to when you declare/add a field_parameter.  That retains the freedom of making your own field_parameters, but seems to fix this dimensional problem.<div><br></div><div>Cameron</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 2, 2014 at 5:36 AM, Matthew Turk <span dir="ltr"><<a href="mailto:matthewturk@gmail.com" target="_blank">matthewturk@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Hilary,<br>
<br>
Maybe we ought to have a registry of known field parameters,<br>
affiliated with dimensions.  A while back I looked at the known ones,<br>
and there were not many in use.  It might be relatively<br>
straightforward to set up a simple registry.  My concern is then that<br>
individuals wanting to define their own are going to run into an issue<br>
of the behavior changing, not knowing how to fix it, and so on.<br>
<br>
Alternately, we could use a default parameter in those failing fields.<br>
Or, we could add an argument to the add_field call of the dimensions<br>
of the field parameter.<br>
<br>
-Matt<br>
<span class="im HOEnZb"><br>
On Wed, Oct 1, 2014 at 3:22 PM, Hilary Egan <<a href="mailto:hilaryye@gmail.com">hilaryye@gmail.com</a>> wrote:<br>
</span><div class="HOEnZb"><div class="h5">> Hi all,<br>
><br>
> I've encountered a bug with this example in the docs of getting/setting<br>
> field parameters of a dataset for use in a derived field. The example works<br>
> fine for known yt field parameters like bulk_velocity, but if you change<br>
> every instance of "bulk_velocity" to "my_bulk_velocity" (sample script),<br>
> then it breaks with this error.<br>
><br>
> It seems as though this breaks because `has_field_parameter` always returns<br>
> True, and there is no way to know ahead of time what units a user-defined<br>
> field parameter will take, so the mock field data can't be set up correctly.<br>
> Nathan suggested via IRC that this might necessitate creating a way to<br>
> register user-defined field parameters, but it's probably worth<br>
> brain-storming about if anyone else has any other suggestions!<br>
><br>
> -Hilary<br>
><br>
</div></div><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> yt-dev mailing list<br>
> <a href="mailto:yt-dev@lists.spacepope.org">yt-dev@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
><br>
_______________________________________________<br>
yt-dev mailing list<br>
<a href="mailto:yt-dev@lists.spacepope.org">yt-dev@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-dev-spacepope.org</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>Cameron Hummels<div>Postdoctoral Researcher</div><div>Steward Observatory</div><div>University of Arizona</div><div><a href="http://chummels.org" target="_blank">http://chummels.org</a></div>
</div>