Hi, Everybody!
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.
Thanks,
d.
--
Sent from my computer.
I am trying to use yt to visualize 3D spherical coordinate data sets
created with the ZEUS-MP
code. I know yt can directly read in such data, but are there any issues
when the grid is ratioed
in the radial coordinate (ie, logarithmically spaced zones in radius).
Thanks!
Dan Whalen
Hello,
I am trying to plot the density of a 3D simulation for only the
first quadrant of a simulation. Since there is only one quadrant of data, I
would like to eliminate the empty space and focus on only the data . I have
gotten to a point where I have manipulated the graph to show only the data,
but now the domain and range of the graph are wrong. Is there a way to set
the x and y limits for a 3D plot?
Thanks,
-Owen
Hi all,
I'm trying to plot the density profile of a 1D simulation, but can't find
any instruction on how to do this.
I tried ray=pf.h.ortho_ray(0,[ord1,ord2]) with several different ord1 and
ord2, including [0.5, 0.5]; while "ray['x']" returns an array of values,
"ray[FieldName]" (where FieldName can be Density, TotalEnergy, GasEnergy,
etc) returns nothing but "YTArray([],dtype=float 64) (dimensionless)".
Using ortho_ray on the 2D simulation of the same problem gives correct
answer. Also, the "all_data" and "sphere" object do not work for 1D (they
work for 2D, too).
Thanks,
Hao
Hello again,
I'm again running a very simple script from the cookbook, learning how to use the stellar spectrum generator. It's just a simple tests of spectrum generation with stars of all the same age and mass. It fails with a key error on the dataset, even thought it's not really using the dataset for anything but a reference time (I think). Since it's all small, I'll clip it in below. Here's the script itself:
from yt.mods import *
from yt.analysis_modules.star_analysis.api import *
ds = load("RD0009")
spec = SpectrumBuilder(ds, bcdir="/Users/hallman/work/data/sfData", model="chabrier")
sm = np.ones(100)
ct = np.zeros(100)
spec.calculate_spectrum(star_mass=sm, star_creation_time=ct, star_metallicity_constant=0.02)
spec.write_out(name="spec.out")
And here is the output:
Traceback (most recent call last):
File "starSpec.py", line 13, in <module>
spec.calculate_spectrum(star_mass=sm, star_creation_time=ct, star_metallicity_constant=0.02)
File "/Users/hallman/work/yt-x86_64/src/yt-hg/yt/analysis_modules/star_analysis/sfr_spectrum.py", line 387, in calculate_spectrum
dt = (self.time_now - self.star_creation_time * self._ds['Time']) / YEAR
File "/Users/hallman/work/yt-x86_64/src/yt-hg/yt/data_objects/static_output.py", line 249, in __getitem__
return self.parameters[key]
KeyError: 'Time'
Even if I modify "sfr_spectrum.py" to use the key "current_time", it still fails with the same error. This is with yt-3.0, dataset created with the tip of enzo-dev as of about 20 minutes ago. It fails on older enzo datasets as well with the same error.
Thanks for any help.
Eric
--
Eric Hallman
Tech-X Corporation hallman(a)txcorp.com
5621 Arapahoe Ave, Suite A Phone: (720) 254-5833
Boulder, CO 80303 Fax: (303) 448-7756
--
_______________________________________________
yt-users mailing list
yt-users(a)lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Does anyone know how to make a SlicePlot colorbar from yt use mathtext in
the tick labels? I am doing the following in a loop over x, y, z planes:
p = yt.SlicePlot(ds, d, var, center=(center[0], center[1],
center[2]),
origin="native", fontsize=10)
p.set_log(var, log)
plot = p.plots[var]
plot.figure = fig
plot.axes = grid[i].axes
plot.cax = grid.cbar_axes[i]
I can get at the colorbar object via cb = plot.cb, but I can't seem to turn
on mathtext. I can modify the axes to use my formatter so they look
pretty, but I've tried to set a colorbar formatter with no success.
Here's my image:
http://bender.astro.sunysb.edu/random/test.png
Notice that the offset text for the colorbar is "1.e6" instead of in latex
(I still have to remove the offset text for the two rightmost y-axes later,
but I know how to do that).
Mike
--
Michael Zingale
Associate Professor
Dept. of Physics & Astronomy • Stony Brook University • Stony Brook, NY
11794-3800
*phone*: 631-632-8225
*e-mail*: Michael.Zingale(a)stonybrook.edu
*web*: http://www.astro.sunysb.edu/mzingale
_______________________________________________
yt-users mailing list
yt-users(a)lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Dear all,
In one of my user defined field, I have to do a multiplication with Mach
number.
I found that, I can use both * data["Mach"]* and *data["MachNumber"]. *What
is the difference between "Mach" and "MachNumber".
Thank you
--
Reju Sam John
Hi,
I am new to yt and enzo. I have been able to compile and run a few 'test'
simulations in enzo. However, when I use 'yt plot xxx', it complains the
following:
310 if active_particles: 311 ptypes
= _next_token_line("PresentParticleTypes", f)--> 312
counts = [int(c) for c in _next_token_line("ParticleTypeCounts", f)]
313 for ptype in
self.parameters.get("AppendActiveParticleType", []): 314
if ptype in ptypes:
TypeError: 'NoneType' object is not iterable
------
I recall it worked when I was using yt 2.x version a few months ago.
The problem seems to appear for the current yt. The tests with enzo I
ran were MHDCTOrszangTang in 2D, ShearingBox in 3D (there are no
particles). Any clues?
Cheers,
Kit
Hi folks,
I am using yt-3, and attempting to make a ProjectionPlot of the derived
field 'baryon_overdensity' (using an Enzo dataset). The line in question is
this:
plot1 =
yt.ProjectionPlot(ds,'z',"baryon_overdensity",weight_field="baryon_overdensity",center=c,data_source=my_region)
(with c, my_region being previously defined). When I do this, it complains:
yt.fields.field_exceptions.NeedsParameter: (['omega_baryon'])
which certainly makes sense from a physical perspective, and which Enzo
doesn't natively carry around. I tried to set this by hand: