Thanks for all your help over the last couple of days. One more question:
- Can I plot particles on a volume rendered image?
I have stars and I want to show where they are!
Elizabeth Harper-Clark MA MSci
PhD Candidate, Canadian Institute for Theoretical Astrophysics, UofT
Sciences and Engineering Coordinator, Teaching Assistants' Training Program,
Astronomy office phone: +1-416-978-5759
Does anyone out there have a technique for getting the variance out of
a profile object? A profile object is good at getting <X> vs. B, I'd
then like to get < (X - <X>)^2 > vs B. Matt and I had spittballed the
possibility some time ago, but I was wondering if anyone out there had
successfully done it.
Sent from my computer.
I'm getting the following error while installing yt-3.2.1 latest release.
Any idea what is going on here?
thanks in advance,
Doing yt update, wiping local changes and updating to branch stable
install_script.sh: line 1025: cd: /home/latif/YT/yt-x86_64/src/yt-hg/: No
such file or directory
copying doc/man/isympy.1 -> /home/latif/YT/yt-x86_64/share/man/man1
Using cached Jinja2-2.8-py2.py3-none-any.whl
Collecting MarkupSafe (from jinja2)
Installing collected packages: MarkupSafe, jinja2
Successfully installed MarkupSafe-0.23 jinja2-2.8
/home/latif/YT/yt-x86_64/bin/python2.7: can't open file 'setup.py': [Errno
2] No such file or directory
Failure. Check /home/latif/YT/yt-x86_64/yt_install.log. The last 10 lines
I've recently been trying to use yt's inline analysis functionality with
Enzo and am having some difficultly getting it to work in parallel. I am
using the development tip of yt. In serial, everything works fine, but in
parallel, I get the following error:
It seems that the issue is that yt is not correctly identifying which grids
are available on a given processory for the EnzoDatasetInMemory object.
Does anyone have an idea of how to fix this? Has anyone else seen this?
For reference, my user_script is just this:
from yt.frontends.enzo.api import EnzoDatasetInMemory
ds = EnzoDatasetInMemory()
ad = ds.all_data()
Thanks for any help,
I followed loosely the example provided here
but encountered an error message using a smoothed covering grid with
SPH data instead of a covering grid. I posted an MWE here:
http://pastebin.com/2sStpLmw which leads to the error message
"AttributeError: 'YTSmoothedCoveringGrid' object has no attribute
I wanted to use a smoothed covering grid because I found that using
SPH data a lot of "holes" are in `covering grid' (but not, e.g., in a
slice plot). So I assumed there is some problem in duplicating the
values from the coarser grids?
My yt version is 3.2-dev.
Thanks a lot for your time & help,
Is there a way to specify the opacity transfer function and the colormap
for volume rendering independently? I am looking for something like
cam.transfer_function.map_to_colormap(), but allowing me to specify a
transfer function for the opacity myself, independently of the transfer
function for the colormap.
What I am trying to achieve with that is the following: a field below a
dynamically chosen cutoff should be completely transparent, so that I
can always see the structure of the field where it is strongest, no
matter what the absolute strength is. The color on the other hand should
depend on the absolute value. E.g. I want to make a movie where I see
the structure of the strongest parts of a field, unobstructed by the
rest, but with a color that changes together with the absolute field
I am trying to assemble Yt volume renderings into a movie using moviepy,
which essentially takes a numpy rgb array for each frame and produces a
However, I am a bit confused on the absolute luminosity in volume
It seems that adding annotations via cam.draw_domain() does not only
draw the domain, but also adjusts the image brightness, which is a bit
surprising. I did not notice that when using cam.save_image() for a
single frame instead using the image array directly, apparently the
former does adjust brightness as well.
I want to avoid rescaling based on average or maximum brightness *of a
single frame* in a movie, because this is misleading.
The brightness of a pixel should only depend on the data along the
corresponding ray, not on the other rays as well. Rather, the scale
should be constant during the movie. I know it is probably difficult,
but is there a way to estimate a reasonable scaling from the expected
data range of the whole evolution and the size of the domain? Also which
other functions besides cam.draw_domain() do implicitly adjust the
I have created a covering grid from a sample Enzo dataset. I would like to write the "density" field to a file. I am doing the following but getting an error.
cg = ds.covering_grid(3,[0.,0.,0.],ds.domain_dimensions*2**2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/work/01197/semeraro/maverick/yt-x86_64/src/yt-hg/yt/data_objects/data_containers.py", line 399, in write_out
field_data = np.array([self.field_data[field] for field in field_order])
Is it possible to write out the single field to a file from a covering grid?
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"?