[yt-users] help! darkskysims(yt-dark)
abasak at miners.utep.edu
abasak at miners.utep.edu
Mon Apr 6 00:21:10 PDT 2015
Hello,
I am getting an error when I am trying to run examples given in darkskysims/darksky_tour.
The examples uses yt to load the data. The script looks like this :
import sys
import matplotlib; matplotlib.use('Agg')
from dark_loader import load_halo, prefix
import yt
if __name__ == "__main__":
root_dir = prefix + 'ds14_a/'
particles = root_dir + "ds14_a_1.0000"
halos = root_dir + "halos/ds14_a_halos_1.0000"
halo_num = 0
if len(sys.argv) > 1:
halo_num = int(sys.argv[-1])
pds, halo, center, radius = load_halo(particles, halos, halo_num)
p = yt.ProjectionPlot(pds, 0, "dark_matter_density",
weight_field=None)
p.annotate_sphere(center, radius, circle_args={'color':'r'})
p.annotate_title(r"$M_{200b} = %0.2e \mathrm{M_{\odot}/h}$" % halo['m200b'])
p.set_cmap("all", "RdGy_r")
p.set_axes_unit("Mpccm/h")
p.set_zlim('all', 1.0e-3, 1.0)
p.save('halo_%04i' % halo_num)
And it gives me the following output:
...
File "//anaconda/lib/python2.7/site-packages/yt/visualization/plot_window.py", line 1227, in __init__
field_parameters = field_parameters, method = method)
File "//anaconda/lib/python2.7/site-packages/yt/data_objects/construction_data_containers.py", line 250, in __init__
self.get_data(field)
File "//anaconda/lib/python2.7/site-packages/yt/data_objects/construction_data_containers.py", line 295, in get_data
chunk_fields, "io", local_only = True)):
File "//anaconda/lib/python2.7/site-packages/yt/utilities/parallel_tools/parallel_analysis_interface.py", line 506, in parallel_objects
for obj_id, obj in oiter:
File "//anaconda/lib/python2.7/site-packages/yt/data_objects/data_containers.py", line 588, in chunks
self.get_data() # Ensure we have built ourselves
File "//anaconda/lib/python2.7/site-packages/yt/data_objects/data_containers.py", line 622, in get_data
self.index._identify_base_chunk(self)
File "//anaconda/lib/python2.7/site-packages/yt/geometry/particle_geometry_handler.py", line 140, in _identify_base_chunk
self.regions.identify_data_files(dobj.selector)]
File "//anaconda/lib/python2.7/site-packages/yt/data_objects/data_containers.py", line 583, in selector
self._selector = sclass(self)
File "yt/geometry/selection_routines.pyx", line 721, in yt.geometry.selection_routines.RegionSelector.__init__ (build/src.macosx-10.5-x86_64-2.7/yt/geometry/selection_routines.c:14458)
ValueError: Buffer dtype mismatch, expected 'float64_t' but got 'float'
Can anyone please help me. I will really appreciate it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20150406/019f2bf6/attachment.htm>
-------------- next part --------------
_______________________________________________
yt-users mailing list
yt-users at lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
More information about the yt-users
mailing list