<div dir="ltr">Hi Matt,<div><br></div><div style>I updated yt via 'yt update' and the change set is the one I specified before. To do a direct pull from the tip, I tried:</div><div style><br></div><div style>cd src/yt-hg</div>
<div style>hg pull -r 1a67d558b51c</div><div style><br></div><div style>but just got:</div><div style><br></div><div style>"abort: requirement 'dotencode' not supported!"<br></div><div style><br></div><div style>
What should I have done? (It might be handy to add this 'how to' to the docs, since surely many people use the handy install script and then don't know how to pull from the tip?)</div><div style><br></div><div style>
E. </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On 25 April 2014 17:44, 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 Elizabeth,<br>
<div class=""><br>
On Fri, Apr 25, 2014 at 4:38 AM, Elizabeth Tasker<br>
<<a href="mailto:tasker@astro1.sci.hokudai.ac.jp">tasker@astro1.sci.hokudai.ac.jp</a>> wrote:<br>
> Hi Matt,<br>
><br>
> Thanks! This is:<br>
><br>
> yt module located at:<br>
> /home/tasker/yt-new2/src/yt-hg<br>
><br>
> The current version of the code is:<br>
><br>
> ---<br>
> 81c2f6f5f983<br>
> ---<br>
><br>
><br>
> Elizabeth<br>
<br>
</div>I've just checked, and I am able to replicate the error with this<br>
changeset using this script:<br>
<br>
from yt.mods import *<br>
pf = load("IsolatedGalaxy/galaxy0030/galaxy0030")<br>
level = 0<br>
left = [0.0, 0.0, 0.0]<br>
dims = [16, 16, 16]<br>
<div class="">cgrid = pf.h.covering_grid(level, left_edge = left, dims=dims,<br>
num_ghost_zones=2)<br>
<br>
</div>However, when I update to the current tip of the yt branch,<br>
1a67d558b51c, it works. :)<br>
<br>
-Matt<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
><br>
> On 25 April 2014 17:34, Matthew Turk <<a href="mailto:matthewturk@gmail.com">matthewturk@gmail.com</a>> wrote:<br>
>><br>
>> Hi Elizabeth,<br>
>><br>
>> On Fri, Apr 25, 2014 at 3:40 AM, Elizabeth Tasker<br>
>> <<a href="mailto:tasker@astro1.sci.hokudai.ac.jp">tasker@astro1.sci.hokudai.ac.jp</a>> wrote:<br>
>> > Hi,<br>
>> ><br>
>> > I've hit a problem with the latest version of yt and covering grid that<br>
>> > is<br>
>> > linked with the number of ghostzones. My code looked like:<br>
>> ><br>
>> > for dim in range(3):<br>
>> ><br>
>> > left.append(cloud_position[c][dim] - 0.5*width[dim])<br>
>> > right.append(cloud_position[c][dim] + 0.5*width[dim])<br>
>> > dims.append(int(round((right[dim]-left[dim])/cellsize)))<br>
>> ><br>
>> > cgrid = pf.h.covering_grid(level,<br>
>> > left_edge = left,<br>
>> > dims=dims,<br>
>> > num_ghost_zones=2)<br>
>> ><br>
>> ><br>
>> > but gives me:<br>
>> ><br>
>> > TypeError Traceback (most recent call<br>
>> > last)<br>
>> > /home/tasker/yt-new2/src/yt-hg/scripts/iyt in <module>()<br>
>> > ----> 1 execfile("export_hdf5_cube.py")<br>
>> ><br>
>> > /home/tasker/yt-new2/src/yt-hg/scripts/iyt in <module>()<br>
>> > 51 left_edge = left,<br>
>> > 52 dims=dims,<br>
>> > ---> 53 num_ghost_zones=2)<br>
>> > 54<br>
>> > 55<br>
>> ><br>
>> > /home/tasker/yt-new2/src/yt-hg/yt/data_objects/data_containers.pyc in<br>
>> > __init__(self, level, left_edge, dims, fields, pf, num_ghost_zones,<br>
>> > use_pbar, **kwargs)<br>
>> > 3689 self.level = level<br>
>> > 3690 rdx = self.pf.domain_dimensions*self.pf.refine_by**level<br>
>> > -> 3691 rdx[np.where(dims - 2 * num_ghost_zones <= 1)] = 1 #<br>
>> > issue<br>
>> > 602<br>
>> > 3692 self.dds = self.pf.domain_width / rdx.astype("float64")<br>
>> > 3693 self.ActiveDimensions = np.array(dims, dtype='int32')<br>
>> ><br>
>> > TypeError: unsupported operand type(s) for -: 'list' and 'int'<br>
>> ><br>
>> ><br>
>> ><br>
>> ><br>
>> > This happens regardless of whether I use num_ghost_zones or not. If I<br>
>> > don't<br>
>> > have ghost_zones set, the error occurs at line 52, but still points to<br>
>> > line<br>
>> > 3691. Dims and left look fine:<br>
>> ><br>
>> > In [9]: dims<br>
>> > Out[9]: [64, 64, 64]<br>
>> ><br>
>> > In [10]: left<br>
>> > Out[10]: [20.424700000000001, 11.512700000000001, 15.7158]<br>
>> ><br>
>> > In [11]: level<br>
>> > Out[11]: 5<br>
>> ><br>
>> > In [14]: rdx = pf.domain_dimensions*pf.refine_by**level<br>
>> > In [15]: rdx<br>
>> > Out[15]: array([4096, 4096, 4096])<br>
>> ><br>
>> ><br>
>> > If I set num_ghost_zones = na.array([0,0,0]) then it runs. However, if I<br>
>> > then try<br>
>> ><br>
>> > cgrid["x"]<br>
>> ><br>
>> > I hit more problems circulating around the same area:<br>
>> ><br>
>> > ValueError Traceback (most recent call<br>
>> > last)<br>
>> > /home/tasker/yt-new2/src/yt-hg/scripts/iyt in <module>()<br>
>> > ----> 1 cgrid["y"]<br>
>> ><br>
>> > /home/tasker/yt-new2/src/yt-hg/yt/data_objects/data_containers.pyc in<br>
>> > __getitem__(self, key)<br>
>> > 316 if key not in self.fields:<br>
>> > 317 self.fields.append(key)<br>
>> > --> 318 self.get_data(key)<br>
>> > 319 return self.field_data[key]<br>
>> > 320<br>
>> ><br>
>> > /home/tasker/yt-new2/src/yt-hg/yt/data_objects/data_containers.pyc in<br>
>> > get_data(self, fields)<br>
>> > 3733 try:<br>
>> > 3734 #print "Generating", field<br>
>> > -> 3735 self._generate_field(field)<br>
>> > 3736 continue<br>
>> > 3737 except NeedsOriginalGrid, ngt_exception:<br>
>> ><br>
>> > /home/tasker/yt-new2/src/yt-hg/yt/data_objects/data_containers.pyc in<br>
>> > _generate_field(self, field)<br>
>> > 3764 if self.pf.field_info.has_key(field):<br>
>> > 3765 # First we check the validator; this might even<br>
>> > raise!<br>
>> > -> 3766 self.pf.field_info[field].check_available(self)<br>
>> > 3767 self[field] = self.pf.field_info[field](self)<br>
>> > 3768 else: # Can't find the field, try as it might<br>
>> ><br>
>> > /home/tasker/yt-new2/src/yt-hg/yt/data_objects/field_info_container.pyc<br>
>> > in<br>
>> > check_available(self, data)<br>
>> > 354 """<br>
>> > 355 for validator in self.validators:<br>
>> > --> 356 validator(data)<br>
>> > 357 # If we don't get an exception, we're good to go<br>
>> > 358 return True<br>
>> ><br>
>> > /home/tasker/yt-new2/src/yt-hg/yt/data_objects/field_info_container.pyc<br>
>> > in<br>
>> > __call__(self, data)<br>
>> > 482 if not data._spatial:<br>
>> > 483 raise NeedsGridType(self.ghost_zones,self.fields)<br>
>> > --> 484 if self.ghost_zones <= data._num_ghost_zones:<br>
>> > 485 return True<br>
>> > 486 raise NeedsGridType(self.ghost_zones,self.fields)<br>
>> ><br>
>> > ValueError: The truth value of an array with more than one element is<br>
>> > ambiguous. Use a.any() or a.all()<br>
>> ><br>
>> ><br>
>> > cgrid["Density"] and the velocities are fine.<br>
>> ><br>
>> > I'm suspecting this is because the position calculation in the code is<br>
>> > not<br>
>> > expecting an array for the ghost zone number?<br>
>> ><br>
>> > Oddly, I see from the mailing list is this reminiscent of a problem nyx<br>
>> > was<br>
>> > having.<br>
>><br>
>> Yes, and it feels like this exact issue -- where dims are lists, not<br>
>> arrays -- gets fixed over and over and over again. :( Can you report<br>
>> which changeset you're on, and I'll push a fix?<br>
>><br>
>> -Matt<br>
>><br>
>> ><br>
>> > Elizabeth<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>
>> ><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>
><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>
</div></div></blockquote></div><br></div>