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.
Hi all,
I have trouble running yt in parallel on Blue Waters. I installed yt using
miniconda, the version of yt is
~/miniconda/lib $yt version
yt module located at:
/u/sciteam/madcpf/miniconda/lib/python2.7/site-packages/yt-3.3.dev0-py2.7-linux-x86_64.egg
The current version and changeset for the code is:
---
Version = 3.3-dev
Changeset = 90f900be7a36+ yt
Then with miniconda/bin in PATH I installed mpi4py-2.0.0. But when I tried
to make the following simple output in parallel, I get:
import yt
yt.enable_parallelism()
from yt.utilities.parallel_tools.parallel_analysis_interface import\
parallel_objects, communication_system
comm = communication_system.communicators[-1]
print comm.rank, comm.size
0 1
0 1
0 1
0 1
0 1
0 1
0 1
0 1
...
When I run a similar code but with yt-2.x also on Blue Waters, I get what I
expect:
7 16
15 16
6 16
9 16
11 16
8 16
0 16
4 16
...
I'm confused about it. Could anyone give me some suggestions please?
Thanks,
Pengfei
Dear YT Users,
To better understand covering_grid (or smoothed_covering_grid), can someone
explain what dimensions I should use when I have multiple levels of
refinement? If I have 1 level of refinement from AMR data, the dimensions
should be the same, I believe, but what if I have 2 or 3 levels of
refinement? Should the fixed resolution region then have dimensions of
dims*2^2 and dims*3^2 respectively?
Here is one example from a tutorial
<http://yt-project.org/doc/examining/low_level_inspection.html#examining-gri…>
if that helps isolate my question:
all_data_level_2 = ds.covering_grid(level=2, left_edge=[0,0.0,0.0],
dims=ds.domain_dimensions * 2**2)
Thanks in advance,
Carla
Hi all,
I'm getting the following error while installing yt-3.2.1 latest release.
Any idea what is going on here?
thanks in advance,
cheers
Latif
Installing nose-1.3.6
Installing python-hglib-1.6
Installing sympy-0.7.6
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
Installing yt
********************************************
FAILURE REPORT:
********************************************
running install_data
copying doc/man/isympy.1 -> /home/latif/YT/yt-x86_64/share/man/man1
running install_egg_info
Writing
/home/latif/YT/yt-x86_64/lib/python2.7/site-packages/sympy-0.7.6-py2.7.egg-info
Collecting jinja2
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
are above.
Hi All,
I recently moved to working on a new machine and I've run into problems
with eps_writer and pyx and tex. It seems pyx and tex are not talking to
one another. I know pyx can sometimes have an iffy relationship with tex
but does anyone know how to make them like each other?
This is the output I get.
yt : [INFO ] 2015-11-25 14:51:23,198 xlim = 0.456408 0.541884
yt : [INFO ] 2015-11-25 14:51:23,198 ylim = 0.482775 0.568251
yt : [INFO ] 2015-11-25 14:51:23,200 Making a fixed resolution buffer
of (('gas', 'H_number_density')) 800 by 800
Create Multiplot....
yt : [WARNING ] 2015-11-25 14:51:24,085 No field specified. Choosing
first field (('gas', 'H2_fraction'))
yt : [WARNING ] 2015-11-25 14:51:24,955 No field specified. Choosing
first field (('gas', 'H_number_density'))
still waiting for tex after 5 (of 60) seconds...
still waiting for tex after 10 (of 60) seconds...
still waiting for tex after 15 (of 60) seconds...
still waiting for tex after 20 (of 60) seconds...
still waiting for tex after 25 (of 60) seconds...
still waiting for tex after 30 (of 60) seconds...
still waiting for tex after 35 (of 60) seconds...
still waiting for tex after 40 (of 60) seconds...
still waiting for tex after 45 (of 60) seconds...
still waiting for tex after 50 (of 60) seconds...
still waiting for tex after 55 (of 60) seconds...
the timeout of 60 seconds expired and tex did not respond.
We try to finish the dvi due to an unhandled tex error
still waiting for tex after 5 (of 60) seconds...
still waiting for tex after 10 (of 60) seconds...
still waiting for tex after 15 (of 60) seconds...
still waiting for tex after 20 (of 60) seconds...
still waiting for tex after 25 (of 60) seconds...
still waiting for tex after 30 (of 60) seconds...
still waiting for tex after 35 (of 60) seconds...
still waiting for tex after 40 (of 60) seconds...
still waiting for tex after 45 (of 60) seconds...
still waiting for tex after 50 (of 60) seconds...
still waiting for tex after 55 (of 60) seconds...
the timeout of 60 seconds expired and tex did not respond.
Traceback (most recent call last):
File "OnAxisMultiPlot_TimeSeries.py", line 173, in <module>
figsize=(8,4), shrink_cb=1.8)
File
"/cosma/home/jregan/YT/yt-x86_64/src/yt-hg/yt/visualization/eps_writer.py",
line 1164, in multiplot
bbox = (100.0 * d.canvas.bbox().left().t,
File
"/cosma/home/jregan/YT/yt-x86_64/lib/python2.7/site-packages/pyx/canvas.py",
line 156, in bbox
obbox += cmd.bbox()
File
"/cosma/home/jregan/YT/yt-x86_64/lib/python2.7/site-packages/pyx/graph/graph.py",
line 181, in bbox
self.finish()
File
"/cosma/home/jregan/YT/yt-x86_64/lib/python2.7/site-packages/pyx/graph/graph.py",
line 311, in finish
self.doaxes()
File
"/cosma/home/jregan/YT/yt-x86_64/lib/python2.7/site-packages/pyx/graph/graph.py",
line 588, in doaxes
self.dolayout()
File
"/cosma/home/jregan/YT/yt-x86_64/lib/python2.7/site-packages/pyx/graph/graph.py",
line 572, in dolayout
self.doaxiscreate(axisname)
File
"/cosma/home/jregan/YT/yt-x86_64/lib/python2.7/site-packages/pyx/graph/graph.py",
line 248, in doaxiscreate
self.axes[axisname].create()
File
"/cosma/home/jregan/YT/yt-x86_64/lib/python2.7/site-packages/pyx/graph/axis/axis.py",
line 586, in create
self.canvas = self.axis.create(self.data, self.positioner,
self.graphtexrunner, self.errorname)
File
"/cosma/home/jregan/YT/yt-x86_64/lib/python2.7/site-packages/pyx/graph/axis/axis.py",
line 245, in create
return _regularaxis._create(self, data, positioner, graphtexrunner,
self.parter, self.rater, errorname)
File
"/cosma/home/jregan/YT/yt-x86_64/lib/python2.7/site-packages/pyx/graph/axis/axis.py",
line 146, in _create
return layout(data)
File
"/cosma/home/jregan/YT/yt-x86_64/lib/python2.7/site-packages/pyx/graph/axis/axis.py",
line 141, in layout
self.painter.paint(canvas, data, self, positioner)
File
"/cosma/home/jregan/YT/yt-x86_64/lib/python2.7/site-packages/pyx/graph/axis/painter.py",
line 258, in paint
_title.paint(self, canvas, data, axis, axispos)
File
"/cosma/home/jregan/YT/yt-x86_64/lib/python2.7/site-packages/pyx/graph/axis/painter.py",
line 109, in paint
title = canvas.layer("title").text_pt(x, y, axis.title, titleattrs)
File
"/cosma/home/jregan/YT/yt-x86_64/lib/python2.7/site-packages/pyx/canvas.py",
line 334, in text_pt
return self.insert(self.texrunner.text_pt(x, y, atext, *args))
File
"/cosma/home/jregan/YT/yt-x86_64/lib/python2.7/site-packages/pyx/text.py",
line 1223, in text_pt
return self.text(x * unit.t_pt, y * unit.t_pt, expr, *args, **kwargs)
File
"/cosma/home/jregan/YT/yt-x86_64/lib/python2.7/site-packages/pyx/text.py",
line 1201, in text
raise e
pyx.text.TexResultError: TeX didn't respond as expected within the timeout
period (60 seconds).
The expression passed to TeX was:
\scrollmode
\raiseerror%
\def\PyX{P\kern-.3em\lower.5ex\hbox{Y}\kern-.18em X}%
\gdef\PyXBoxHAlign{0}%
\newbox\PyXBox%
\newbox\PyXBoxHAligned%
\newdimen\PyXDimenHAlignLT%
\newdimen\PyXDimenHAlignRT%
\gdef\PyXFlushHAlign{0}%
\def\PyXragged{%
\leftskip=0pt plus \PyXFlushHAlign fil%
\rightskip=0pt plus 1fil%
\advance\rightskip0pt plus -\PyXFlushHAlign fil%
\parfillskip=0pt%
\pretolerance=9999%
\tolerance=9999%
\parindent=0pt%
\hyphenpenalty=9999%
\exhyphenpenalty=9999}%
\newbox\PyXBoxVBox%
\newdimen\PyXDimenVBox%
\newbox\PyXBoxVAlign%
\newdimen\PyXDimenVAlign%
\newdimen\PyXDimenVShift%
\long\def\ProcessPyXBox#1#2{%
\setbox\PyXBox=\hbox{{#1}}%
\PyXDimenHAlignLT=\PyXBoxHAlign\wd\PyXBox%
\PyXDimenHAlignRT=\wd\PyXBox%
\advance\PyXDimenHAlignRT by -\PyXDimenHAlignLT%
\gdef\PyXBoxHAlign{0}%
\immediate\write16{PyXBox:page=#2,lt=\the\PyXDimenHAlignLT,rt=\the\PyXDimenHAlignRT,ht=\the\ht\PyXBox,dp=\the\dp\PyXBox:}%
\setbox\PyXBoxHAligned=\hbox{\kern-\PyXDimenHAlignLT\box\PyXBox}%
\ht\PyXBoxHAligned0pt%
{\count0=80\count1=121\count2=88\count3=#2\shipout\box\PyXBoxHAligned}}%
\def\PyXInput#1{\immediate\write16{PyXInputMarker:executeid=#1:}}%
\def\PyXMarker#1{\hskip0pt\special{PyX:marker #1}}%%
\PyXInput{1}%
After parsing the return message from TeX, the following was left:
This is TeX, Version 3.14159265 (TeX Live 2015) (preloaded format=tex)
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
File "/cosma/home/jregan/YT/yt-x86_64/lib/python2.7/atexit.py", line 24,
in _run_exitfuncs
func(*targs, **kargs)
File
"/cosma/home/jregan/YT/yt-x86_64/lib/python2.7/site-packages/pyx/text.py",
line 744, in _cleantmp
texrunner.expectqueue.put_nowait(None) # do not expect any
output anymore
File "/cosma/home/jregan/YT/yt-x86_64/lib/python2.7/Queue.py", line 148,
in put_nowait
return self.put(item, False)
File "/cosma/home/jregan/YT/yt-x86_64/lib/python2.7/Queue.py", line 123,
in put
raise Full
Full
Error in sys.exitfunc:
Traceback (most recent call last):
File "/cosma/home/jregan/YT/yt-x86_64/lib/python2.7/atexit.py", line 24,
in _run_exitfuncs
func(*targs, **kargs)
File
"/cosma/home/jregan/YT/yt-x86_64/lib/python2.7/site-packages/pyx/text.py",
line 744, in _cleantmp
texrunner.expectqueue.put_nowait(None) # do not expect any
output anymore
File "/cosma/home/jregan/YT/yt-x86_64/lib/python2.7/Queue.py", line 148,
in put_nowait
return self.put(item, False)
File "/cosma/home/jregan/YT/yt-x86_64/lib/python2.7/Queue.py", line 123,
in put
raise Full
Queue.Full
The call I make is:
multi = eps.multiplot(NCOLS, NROWS, projections,
bare_axes=True,cb_labels=colorbar_label, figsize=(8,4), shrink_cb=1.8)
Cheers,
John
Hi all,
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:
http://paste.yt-project.org/show/5694/
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:
import yt
from yt.frontends.enzo.api import EnzoDatasetInMemory
def main():
ds = EnzoDatasetInMemory()
ad = ds.all_data()
print ad.quantities.total_quantity("cell_mass")
Thanks for any help,
Britton
Hi yt user,
I make a simple DM and gas density profile for my enzo simulation with
following script:
======================
import matplotlib as matplotlib
matplotlib.use('Agg')
import yt
import yt.units as units
import numpy as np
import matplotlib.pyplot as plt
def _radiuspc(field, data):
return data[('radius')].in_units('pc')
yt.add_field('radiuspc', function=_radiuspc, units="pc")
Nbin= 100
rmax = 4000
index = 60
ds = yt.load("../DD%04d/DD%04d" % (index,index))
ds.index
ad= ds.all_data()
center = ds.find_max(("gas", "density"))[1]
my_sphere = ds.sphere(center, rmax*units.pc)
rmin = max([1.0e-4,2.0*ds.index.get_smallest_dx().in_units('pc')])
profile = yt.Profile1D(my_sphere, 'radiuspc', Nbin, x_min=rmin,
x_max=rmax, x_log=True, weight_field='cell_volume')
profile.add_fields(('gas','density'))
profile.add_fields(('gas','dark_matter_density'))
profile.add_fields(('deposit','all_density'))
plt.plot(np.log10(profile.x), np.log10(profile[('gas','density')]),
label="('gas','density')", linestyle="-", color='g')
plt.plot(np.log10(profile.x),
np.log10(profile[('gas','dark_matter_density')]),
label="('gas','dark_matter_density')", linestyle="-", color='r')
plt.plot(np.log10(profile.x),
np.log10(profile[('deposit','all_density')]),
label="('deposit','all_density')", linestyle="-", color='b')
plt.legend(loc=0,prop={'size':9})
plt.savefig('DMTest')
======================
The only particle in the simulation is the dark matter so that
profile[('gas','dark_matter_density')] and
profile[('deposit','all_density')] should be same.
However, as shown in the attached figure, they are very different.
I would like to ask a few questions regarding to this plot.
1) Why do profile[('gas','dark_matter_density')] and
profile[('deposit','all_density')] show significant difference?
2) What limit the minimum r in profile[('deposit','all_density')]?
3) If I would like to make total density profile, what do I do?
I think that profile[('deposit','all_density')] is more liable result.
Can I add data[('gas','density')] and
data[('deposit','all_density')], two different field types, in the
derived field?
Thank you in advance,
Junhwan Choi
_______________________________________________
yt-users mailing list
yt-users(a)lists.spacepope.org
http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi yt users,
I'm working with a particle dataset and I'm wondering if it is possible to
only load a certain type of particle fields from the snapshot as my
dataset? For example, there might be 'PartType0' and 'PartType1' in the
snapshot, but I only want to load 'PartType0'.
The reason I want to do this is that, to my understanding, the octree of
the particle dataset is constructed adaptively according to the number of
particles, including all types of particles in the dataset. But I want the
octree constructed only according to the type of particles I'm interested
in. Is it possible?
Thanks,
Bili
Hi folks,
The current default colormap that yt uses is called "Algae," and it's been
with us for a while. Recently some of us on the yt-dev mailing list (which
is open to join!) have begun to look at alternate colormaps that have
better characteristics, particularly from an accessibility perspective.
If you have the time, it would be really, *really* helpful if you could
take this anonymous, two question (only one of which is mandatory!) poll
about which of the four candidates we've come up with you like the best.
http://goo.gl/forms/D4qQqkPIMq
Thanks very much! The poll will be open at least a week, and I'll report
back the results here sometime after that.
-Matt
Hi yt users,
I try to make a particle angular momentum profile using the following script:
================================
import matplotlib as matplotlib
matplotlib.use('Agg')
import yt
import yt.units as units
import numpy as np
import matplotlib.pyplot as plt
def _radiuspc(field, data):
return data[('radius')].in_units('pc')
yt.add_field('radiuspc', function=_radiuspc, units="pc")
index = 45
Nbin= 100
rmax = 3000
ds = yt.load("../DD%04d/DD%04d" % (index,index))
ds.index
ad= ds.all_data()
center = ds.find_max(("gas", "density"))[1]
rmin = max([1.0e-3,2.0*ds.index.get_smallest_dx().in_units('pc')])
sphere = ds.sphere(center, rmax*units.pc)
bulk_velocity = sphere.quantities['BulkVelocity']()
sphere.set_field_parameter('bulk_velocity', bulk_velocity)
profile = yt.Profile1D(sphere, 'radiuspc', Nbin, x_min=rmin,
x_max=rmax, x_log=True, weight_field=None)
profile.add_fields(('all', 'particle_angular_momentum_x'))
profile.add_fields(('all', 'particle_angular_momentum_y'))
profile.add_fields(('all', 'particle_angular_momentum_z'))
PartAngularMomentum = np.sqrt(profile[('all', 'particle_angular_momentum_x')]**2
+ profile[('all',
'particle_angular_momentum_y')]**2
+ profile[('all',
'particle_angular_momentum_z')]**2)
plt.plot(profile.x, PartAngularMomentum, label='Total',linestyle="-",color='r')
plt.xlabel('r [pc]')
plt.ylabel('pang')
======================================
And I got the following error:
………..
Traceback (most recent call last):
File "pang.py", line 26, in <module>
profile.add_fields(('all', 'particle_angular_momentum_x'))
File "/home/jhchoi/common/src/yt/yt/data_objects/profiles.py", line
112, in add_fields
self._bin_chunk(chunk, fields, temp_storage)
File "/home/jhchoi/common/src/yt/yt/data_objects/profiles.py", line
425, in _bin_chunk
rv = self._get_data(chunk, fields)
File "/home/jhchoi/common/src/yt/yt/data_objects/profiles.py", line
240, in _get_data
arr[:,i] = chunk[field][filter].in_units(units)
File "/home/jhchoi/common/src/yt/yt/units/yt_array.py", line 1123,
in __getitem__
ret = super(YTArray, self).__getitem__(item)
IndexError: index 1322 is out of bounds for axis 1 with size 1322
I do not understand what the problem is?
One more question:
Is there any way to make accumulation density profile with yt.Profile1D(……)?
Thank you in advance,
Junhwan