[yt-users] problem with covering_grid for Nyx data sets
Wolfram Schmidt
schmidt at astro.physik.uni-goettingen.de
Tue Aug 6 02:29:20 PDT 2013
Hi,
I have got problem that concerns Nyx users and/or yt developers.
I want to read the root-grid level from AMR data sets with the following
piece of code:
num_ghost_zones=2
left=na.amin(pf.h.grid_left_edge,axis=0)
right=na.amax(pf.h.grid_right_edge,axis=0)
resolution = (right-left)/pf.h.grids[0]['dx']+2*num_ghost_zones
cg = pf.h.covering_grid(0,left,resolution,num_ghost_zones=num_ghost_zones)
This works for Enzo data sets, but it fails for Nyx data sets. The error
message is
Traceback (most recent call last):
File "/home/h/nipiagws/scripts/spect_sb.py", line 52, in <module>
cg =
pf.h.covering_grid(0,left,resolution,num_ghost_zones=num_ghost_zones)
File
"/home/h/nipschul/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py",
line 3727, in __init__
self.dds = self.pf.domain_width/rdx.astype("float64")
AttributeError: 'list' object has no attribute 'astype'
The script used to work also for Nyx data sets, with an older version of
yt (about a year ago).
How can this be fixed?
Thanks a lot,
Wolfram
More information about the yt-users
mailing list