<div dir="ltr">Hi Antoine,<div><br></div><div>As you hinted, the field_parameters dictionary is mainly used for derived fields and defaults to the center of the domain.  For a SlicePlot (and others), the keyword variable 'center' is actually what determines where in the domain the slice should be taken - it is completely independent of the field_parameters['center'] value.</div>
<div><br></div><div>Hope that helps.</div><div><br>Chris</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Sep 3, 2014 at 10:45 AM, Antoine Strugarek <span dir="ltr"><<a href="mailto:strugarek@astro.umontreal.ca" target="_blank">strugarek@astro.umontreal.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Matthew,<br>
<br>
Thank you for the quick answer. I’m on 3.0 (obtained with yt.__version__).<br>
<br>
I’m not completely sure how to fix this since I’m discovering the code, but I’m suspecting something strange there. To my understanding, the field_parameters dictionary given in argument to SlicePlot should be used for derived fields only, and the center keyword to specify the location where the Slice should be taken, right?<br>

Also, if I specify in advance the center (doing ad = ds.all_data() ; ad.set_field_parameter("center", custom_center)), this new center does not seem to be used in the SlicePlot to compute, e.g., the cylindrical radius (in this latter case I try to do a SlicePlot without giving a field_parameters dictionary in argument).<br>

<br>
Antoine<br>
<br>
<br>
Le 2014-09-03 à 12:27 , Matthew Turk <<a href="mailto:matthewturk@gmail.com">matthewturk@gmail.com</a>> a écrit :<br>
<br>
> Hi Antoine,<br>
><br>
> Thanks for reporting this!  Which version of the code are you on?  "yt<br>
> instinfo" should be able to tell you this.<br>
><br>
> -Matt<br>
><br>
> On Wed, Sep 3, 2014 at 11:08 AM, Antoine Strugarek<br>
> <<a href="mailto:strugarek@astro.umontreal.ca">strugarek@astro.umontreal.ca</a>> wrote:<br>
>> Hi,<br>
>><br>
>> I’ve been trying to specify by hand the ‘center’ entry of the dictionary field_parameters to a SlicePlot so that the derived field can make use of another center to compute, e.g., cylindrical coordinates. After tracking why my specified center had no effect, I noticed that the function _set_center is called when a SlicePlot is created, and this function erases any ‘center’ entry in the field_parameters dictionary, putting there the ‘center’ keyword specified as an argument to SlicePlot. It appears to me this should not be the normal behaviour, but I may be misunderstanding something. I would naively suggest not to update the ‘field_parameters’ dictionary in the _set_center function, though I’m not completely sure?<br>

>><br>
>> Thanks in advance for your help and suggestion about this issue!<br>
>><br>
>> Antoine<br>
>> _______________________________________________<br>
>> yt-users mailing list<br>
>> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
>> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
> _______________________________________________<br>
> yt-users mailing list<br>
> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</blockquote></div><br></div>