I've checked, and export_obj() does not work. :(
All of this function collapse in "get_vertex_centered_data"...
I would really appreciate if someone could answer me on the questions I've
sent, since I try to write some code to solve this issue.
Following is the code and errors (python 2.7, YT3.2):
sp = ds.sphere(center=center, radius=(2,'kpc'))
rho = 5e-27
#surf = ds.surface(sp, ('gas', 'density'), rho)
surf = ds.surface(sp, ("deposit", "all_density"), rho)
color_field = "temperature")
yt : [INFO ] 2015-10-18 17:27:05,014 Extracting (sampling: temperature)
Traceback (most recent call
last)<ipython-input-8-9ab0ccc2f049> in <module>() 1
surf.export_obj("sph_2.kpc",----> 2 color_field =
in export_obj(self, filename, transparency, dist_fac, color_field,
emit_field, color_map, color_log, emit_log, plot_index,
color_field_max, color_field_min, emit_field_max, emit_field_min)
1233 if self.vertices is None: 1234 if
color_field is not None:-> 1235
self.get_data(color_field,"face") 1236 elif color_field is
not None: 1237 if color_field not in self.field_data:
in get_data(self, fields, sample_type, no_ghost) 1032
my_verts = self._extract_isocontours_from_grid( 1033
block, self.surface_field, self.field_value,-> 1034
mask, fields, sample_type,
no_ghost=no_ghost) 1035 if fields is not None:
1036 my_verts, svals = my_verts
in _extract_isocontours_from_grid(self, grid, field, value, mask,
sample_values, sample_type, no_ghost) 1053
sample_type = "face", 1054
no_ghost = False):-> 1055 vals =
grid.get_vertex_centered_data(field, no_ghost = no_ghost) 1056
if sample_values is not None: 1057 svals =
in get_vertex_centered_data(self, *args, **kwargs) 443 444
def get_vertex_centered_data(self, *args, **kwargs):--> 445
raise NotImplementedError 446 447 @property
Date: Thu, 15 Oct 2015 08:58:50 -0400
From: "Naiman, Jill" <jill.naiman(a)cfa.harvard.edu>
To: Discussion of the yt analysis package
Subject: Re: [yt-users] surf.export_ply issues
Content-Type: text/plain; charset="utf-8"
One thing you might try is the export_obj function instead of the
export_ply since its been updated more recently. I think it *should* work
on particle data these days (though, someone should correct me if I'm
If that doesn't work, please let the list know though.
On Thu, Oct 15, 2015 at 4:26 AM, Tomer Nussbaum <
> Hello there,
> I want to make a 3D model of my ART simulation with the YT platform. After
> much reading and talking in the YT mirc I understand some code is needed
> make it work.
> I would appreciate if you could answer me about some questions I have had
> through the last couple of days:
> 0. I understand that "export_ply" and the other functions in YTSurfaceBase
> work on other simulation but not on "particle based simulations" like ART.
> is this correct?
> 1. Why does it not work on ART sim?
> 2. What should I do in order to make it run on ART sim?
> 3. What does "get_vertex_centered_data" suppose to do? most of the time
> the error come from this function (not implemented..), is it a the main
> problem? can I work around it?
> 4. Is there a way to transform the ART data to some data that do work in
> order to make it work?
> 5. What is "particle based simulations"?