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.
Matt, Sam, Eric, Britton,
Thank you for all the previous infos (projections and 2D profiles). Now I have a clearer vision of these features. Sam, you are right, the derived field is created before the radial binning.I will let you know if I have further doubts (for sure).
As I said to Matt previously, I want to extend my congratulations to all the YT developers.You are doing a great job.
I am having trouble using a derived field with a CoveringGrid. I am making
fields for dPhi/dx, dPhi/dy, dPhi/dz using the PotentialField from ENZO.
The derivative fields do not get passed into the CoveringGrid and get
recalculated. This leads to the derivative being zero in areas that were
originally in coarse cells.
Density and DivV fields were passed to the CoveringGrid properly. As a test
I defined a field that was Density^2 and that was passed to the
CoveringGrid properly, so I think it is a problem specific to derived
fields based on the ENZO-specific PotentialField. I have included the
source for my derivative functions.
I looked back in the email archive and found this exact same problem from John ZuHone. http://lists.spacepope.org/pipermail/yt-users-spacepope.org/2011-June/00165…
I wiped all png related stuff from the build and set INST_PNGLIB to 0 but I am still getting this error. Any ideas?
Notes: OSX 10.7.4 using Apple's gcc 4.2.1
Traceback (most recent call last):
File "/Users/cperuta/yt-i386/bin/yt", line 9, in <module>
load_entry_point('yt==2.3', 'console_scripts', 'yt')()
File "/Users/cperuta/yt-i386/lib/python2.7/site-packages/distribute-0.6.21-py2.7.egg/pkg_resources.py", line 337, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/Users/cperuta/yt-i386/lib/python2.7/site-packages/distribute-0.6.21-py2.7.egg/pkg_resources.py", line 2281, in load_entry_point
File "/Users/cperuta/yt-i386/lib/python2.7/site-packages/distribute-0.6.21-py2.7.egg/pkg_resources.py", line 1991, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/Users/cperuta/yt-i386/src/yt-hg/yt/utilities/command_line.py", line 26, in <module>
from yt.mods import *
File "/Users/cperuta/yt-i386/src/yt-hg/yt/mods.py", line 107, in <module>
from yt.visualization.api import \
File "/Users/cperuta/yt-i386/src/yt-hg/yt/visualization/api.py", line 34, in <module>
from plot_collection import \
File "/Users/cperuta/yt-i386/src/yt-hg/yt/visualization/plot_collection.py", line 26, in <module>
from matplotlib import figure
File "/Users/cperuta/yt-i386/lib/python2.7/site-packages/matplotlib/figure.py", line 18, in <module>
from axes import Axes, SubplotBase, subplot_class_factory
File "/Users/cperuta/yt-i386/lib/python2.7/site-packages/matplotlib/axes.py", line 14, in <module>
import matplotlib.axis as maxis
File "/Users/cperuta/yt-i386/lib/python2.7/site-packages/matplotlib/axis.py", line 14, in <module>
import matplotlib.text as mtext
File "/Users/cperuta/yt-i386/lib/python2.7/site-packages/matplotlib/text.py", line 31, in <module>
from matplotlib.backend_bases import RendererBase
File "/Users/cperuta/yt-i386/lib/python2.7/site-packages/matplotlib/backend_bases.py", line 48, in <module>
import matplotlib.textpath as textpath
File "/Users/cperuta/yt-i386/lib/python2.7/site-packages/matplotlib/textpath.py", line 9, in <module>
from matplotlib.mathtext import MathTextParser
File "/Users/cperuta/yt-i386/lib/python2.7/site-packages/matplotlib/mathtext.py", line 52, in <module>
import matplotlib._png as _png
ImportError: dlopen(/Users/cperuta/yt-i386/lib/python2.7/site-packages/matplotlib/_png.so, 2): Symbol not found: _png_set_longjmp_fn
Referenced from: /Users/cperuta/yt-i386/lib/python2.7/site-packages/matplotlib/_png.so
Expected in: dynamic lookup
I have a question that may be more of a matplotlib question than a yt
question, but it's an issue with some yt generated figures I have, so I
thought I'd ask it here. I think there was some discussion of this on
the list a while ago but I can't find the thread.
When I output images that include colorbars in vector formats (like pdf
and eps), I get these little lines running across the color bar. It
goes away if I output the image in a rasterized format (like png). I
wanted to output my images in vector format (as pdfs) so everything
looks nice and sharp. I've figured out how to just rasterize the color
bar. However, I don't want to rasterize the color bar labels, and the
way I've implemented it, the labels get rasterized too. It seems in
figure objects (and maybe axes objects?) there is a way to specify the
order that items get drawn and/or rasterized (through the zorder and
rasterized_zorder keywords); I've played around with this but haven't
been able to get it to work. The color bar is a Colorbar object and it
doesn't seem like this class allows for adjusting the rasterization
order of things.
I've pasted an example script here:
I'm probably going to give up on this soon, but any advice people have
would be greatly appreciated.
Over the last little while, a few of us have been working to update
and improve the GUI for yt, "Reason."
These changes were pushed into the main repository this morning. They
include a visual refresh, a smaller footprint on disk, and a 3D scene
based on XTK. (The camera path editor in the 3D scene is still
awaiting some fixes, but the concept is working.) I'd encourage you,
if you're on the development branch of yt, to update and give it a
The first time you run this it will tell you to download a package
run fine. This version also includes the ability to run in parallel
on an MPI cluster, but the user interface for that is still being
developed. (If you would like to test this out before it's polished
up, drop on by IRC or yt-dev.)
Any feedback you have would be appreciated. We're going to be pushing
for a stable release in the near future.
PS This and a few other things, such as a revised plotting mechanism,
were the product of a sprint we had last weekend. The summary is
Is the field such as DivV
(or any field that uses the scheme
sl_left = slice(None,-2,None)
sl_right = slice(1,-1,None)
f = data["x-velocity"][sl_right,1:-1,1:-1]/ds
f -= data["x-velocity"][sl_left ,1:-1,1:-1]/ds
to average between adjoining cells)
valid for objects such as regions, where the cells might not
necessarily be adjoining?
I'm thinking no...
I'm trying to plot a projection of the SZ effect, and I'm not sure how the
mechanism works. If I do
proj = pf.h.proj(0, "SZKinetic", weight_field='Ones')
frb = FixedResolutionBuffer(proj, (0.0, 1.0, 0.0, 1.0), (imgres, imgres))
img = frb[field]
pylab.imshow( img, interpolation='nearest', origin='lower')
After some digging I found the constants defined in
yt/utilities/physical_constants.py, but I'm not sure how do I use the
convertSZKinetic to get cgs answers (is the field SZKinetic already
returned as cgs, if so what is the cgs units?), and what are the units on
0.88 in the following equation? If I know that I can figure out the cgs