Terminal disappears while downloading
by robyn
This has happened several times on 2 of my machines. Installing with
the install_ script and it continues for 10-15 minutes, having
downloaded the tars and starting to compile. Suddenly without any
warning the terminal just vanishes. When I bring it back up and
restart, installation resumes but vanishes again after a few seconds.
Installation completed fine on my 3rd machine -- within minutes of the
problem on the other 2. Network connections on my end are okay. One of
the logs did say something about "failure to retreive" something just
before the terminal vanished.
-Thanks.
8 years, 9 months
Scripting with Quicktime Pro
by John Wise
Hi all,
This isn't yt related, but I thought most of you would benefit from this. I usually use Quicktime Pro (v7) to make movies. I got tired of manually opening up the images and saving them, so I found that Applescript can easily automate this. It's pretty straightforward, and you can make a shell or python script that writes the Applescript and executes it.
Here's an example Applescript
http://paste.enzotools.org/show/480/
To run it, type "osascript script_name.applescript".
Here's an example Python routine that makes the script and runs it.
http://paste.enzotools.org/show/481/
Unfortunately this doesn't work with the new QuickTime Player in Snow Leopard because they removed the image sequence loader for some reason. I had to reinstall the old QT from the Optional Installs in the install DVD.
Cheers,
John
8 years, 9 months
Halo Finding bugfix
by Stephen Skory
Hi all,
I've just committed in trunk r1705 a bugfix to HaloFinding.py that addresses a problem some users were seeing. In particular, the same data field was being repeatedly read off disk, once per halo, which seriously degraded performance. If you want to upgrade to the latest trunk version, "yt instinfo -u" should do it.
_______________________________________________________
sskory(a)physics.ucsd.edu o__ Stephen Skory
http://physics.ucsd.edu/~sskory/ _.>/ _Graduate Student
________________________________(_)_\(_)_______________
8 years, 9 months
Line through slice
by Nicholas Earl
Hey community,
Was wondering if anyone has any idea how I might put in a line at some x
value when I do a Simple Slice. Just a simple line along the y-axis.
Thanks for your time and effort,
Nicholas Earl
8 years, 9 months
Error in build of kdtree
by Eric Hallman
I am getting this error after Forthon install and make in the kdtree
dir:
login4% make
Forthon -F gfortran --compile_first fKD_source --no2underscores --with-
numpy --fopt "-O3" fKD fKD_source.f90
IN FORTHON_BUILDER
Traceback (most recent call last):
File "/work/01059/tg803229/raft-0.1a/local/bin/Forthon", line 2, in
<module>
import Forthon.Forthon_builder
File "/work/01059/tg803229/raft-0.1a/local/lib/python2.6/site-
packages/Forthon/Forthon_builder.py", line 142, in <module>
twounderscores=twounderscores)
File "/work/01059/tg803229/raft-0.1a/local/lib/python2.6/site-
packages/Forthon/compilers.py", line 66, in __init__
if self.linux_pathscale() is not None: break
File "/work/01059/tg803229/raft-0.1a/local/lib/python2.6/site-
packages/Forthon/compilers.py", line 352, in linux_pathscale
if usecompiler('pathscale','pathf95'):
NameError: global name 'usecompiler' is not defined
make: *** [fKD] Error 1
Any ideas would help. Thanks!
Eric Hallman
Google Voice: (774) 469-0278
hallman13(a)gmail.com
8 years, 9 months
libpng and new volume rendering methods
by Matthew Turk
Hi everyone,
(if you're on yt-1.6, feel free to ignore this message!)
I've backported the multivariate volume rendering (for instance:
http://yt.enzotools.org/attachment/wiki/Screenshots/hiiregion_rgb.png
http://yt.enzotools.org/attachment/wiki/Screenshots/Reion512_600px.png
http://yt.enzotools.org/attachment/wiki/Screenshots/SimB-BH.png )
to the yt trunk; this also comes with the ability to project through a
simulation along a non-orthogonal vector, so you can create images
that, for instance, peer down the L vector of a gas cloud but include
contributions from all the intervening gas -- it's much faster and
higher quality than stacking cutting planes, which was the old method
for doing this. (Example:
http://yt.enzotools.org/attachment/wiki/Screenshots/halo_0029.png )
The new backend for volume rendering should be API compatible with the
old, but if you update your installation you will have to rebuild the
C extensions either by doing:
$ yt instinfo -u
or by re-installing. The new multivariate volume rendering as well as
the off-axis projecting have not yet been documented.
This also comes with a direct PNG writer, which is much faster than
using matplotlib for outputting raw images; it also comes with a
couple colormaps. This requires that libpng be installed. yt will do
its best to locate libpng, but if it cannot find it, you will have to
supply it in png.cfg, much like for hdf5 -- however, the installation
script has been updating to install libpng if requested, so if you run
into any problems, rerun a new version of the installation script.
(Running it over top of an old installation should be fine, as it will
just conduct the necessary upgrades.)
For the next release, both the new volume rendering mechanism and the
image writer will be documented in detail; the release is probably
about a week or two away. Let me know if you're eager to get your
hands on the API docs for either of these things and I'll shoot you
some sample scripts. If you run into any problems, let us know!
Best,
Matt
8 years, 9 months
'dx' field from ortho_ray
by Michael Kuhlen
It seems that ortho_ray produces a 'dx' field (also 'CellLength') that
is not the same order as the other data fields. This is again for a 1D
simulation, this time with a few levels of AMR on.
ray = pf.h.ortho_ray(0, [0.5, 0.5])
print ray['x']
yt INFO 2010-04-23 16:54:42,181 Getting field x from 6
[ 0.005 0.015 0.025 0.035 0.045 0.055 0.065
0.075 0.085 0.095 0.105 0.115 0.125 0.135
0.145 0.155 0.165 0.175 0.185 0.195 0.205
0.215 0.225 0.235 0.245 0.255 0.265 0.275
0.285 0.295 0.305 0.315 0.325 0.335 0.345
0.355 0.365 0.375 0.385 0.395 0.405 0.415
0.425 0.435 0.445 0.455 0.465 0.475 0.485
0.495 0.505 0.515 0.525 0.535 0.545 0.555
0.5625 0.5675 0.5725 0.5775 0.5825 0.5875 0.595
0.605 0.615 0.625 0.635 0.645 0.655 0.665
0.675 0.685 0.695 0.705 0.7125 0.7175 0.72125
0.72375 0.725625 0.726875 0.728125 0.7290625 0.7296875
0.7303125 0.7309375 0.7315625 0.7321875 0.7328125 0.7334375
0.7340625 0.7346875 0.7353125 0.7359375 0.736875 0.738125
0.739375
0.74125 0.74375 0.7475 0.7525 0.7575 0.765 0.775
0.785 0.795 0.805 0.815 0.825 0.835 0.845
0.855 0.865 0.875 0.885 0.895 0.905 0.915
0.925 0.935 0.945 0.955 0.965 0.975 0.985
0.995 ]
print ray['dx']
yt INFO 2010-04-23 16:54:42,232 Getting field dx from 6
[ 0.01 0.01 0.01 0.01 0.01 0.01 0.01 0.01
0.01 0.01 0.01 0.01 0.01 0.01 0.01
0.01
0.01 0.01 0.01 0.01 0.01 0.01 0.01
0.01
0.01 0.01 0.01 0.01 0.01 0.01 0.01
0.01
0.01 0.01 0.01 0.01 0.01 0.01 0.01
0.01
0.01 0.01 0.01 0.01 0.01 0.01 0.01
0.01
0.01 0.01 0.01 0.01 0.01 0.01 0.01
0.01
0.01 0.01 0.01 0.01 0.01 0.01 0.01
0.01
0.01 0.01 0.01 0.01 0.01 0.01 0.01
0.01
0.01 0.01 0.01 0.01 0.01 0.01 0.01
0.01
0.01 0.01 0.01 0.01 0.01 0.01 0.01
0.01
0.01 0.01 0.01 0.01 0.005 0.005 0.005
0.005
0.005 0.005 0.005 0.005 0.005 0.005 0.005
0.0025
0.0025 0.0025 0.0025 0.00125 0.00125 0.00125 0.00125
0.00125 0.00125 0.000625 0.000625 0.000625 0.000625 0.000625
0.000625 0.000625 0.000625 0.000625 0.000625 0.000625 0.000625]
Any ideas how to fix this bug? Or some other way to access the ray's
'dx' values in the correct order? I suppose I could simply calculate the
dx's myself from the 'x' field...
Thanks,
Mike
--
*********************************************************************
* *
* Dr. Michael Kuhlen Theoretical Astrophysics Center *
* email: mqk(a)astro.berkeley.edu UC Berkeley *
* cell phone: (831) 588-1468 601 Campbell Hall *
* skype username: mikekuhlen Berkeley, CA 94720 *
* *
*********************************************************************
8 years, 9 months
Volume rendering - filenames
by Mike Butler
Hello,
This is probably a simple thing to fix, but I've been trying to use the
volume rendering package on my data and am running into an error. If I
follow the steps at http://paste.enzotools.org/show/404/
when I get to mi,ma = dd.quantities["Extrema"]("Density")[0]
I get the error message at the bottom of this email. It seems that it is
looking for files ending in .cpu000# rather than .grid.cpu000# like the
default enzo output. I've tried doing a rename but then I get the same
error but the other way around. Making a copy of the file with each
filename works if I'm just doing a single image, but I'm trying to make a
movie so doing that for 100 files for 8 cpus each would be a bit tedious.
If anyone knows a way around this or I'm doing something wrong, I'd
appreciate any suggestions. Thanks
-Mike
In [8]: mi,ma=dd.quantities["Extrema"]("Density")[0]
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (105, 0))
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (72, 0))
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (119, 0))
---------------------------------------------------------------------------
ReadingError Traceback (most recent call last)
/home/butler85/yt/src/yt-trunk-svn/scripts/iyt in <module>()
----> 1
2
3
4
5
/home/butler85/yt/src/yt-trunk-svn/yt/lagos/DerivedQuantities.pyc in
__call__(self, *args, **kwargs)
70 self._data_source.pf.h.io)
71 if lazy_reader and not self.force_unlazy:
---> 72 return self._call_func_lazy(args, kwargs)
73 else:
74 return self._call_func_unlazy(args, kwargs)
/home/butler85/yt/src/yt-trunk-svn/yt/lagos/DerivedQuantities.pyc in
_call_func_lazy(self, args, kwargs)
77 self.retvals = [ [] for i in range(self.n_ret)]
78 for gi,g in enumerate(self._get_grids()):
---> 79 rv = self.func(GridChildMaskWrapper(g,
self._data_source), *args, **kwargs)
80 for i in range(self.n_ret): self.retvals[i].append(rv[i])
81 g.clear_data()
/home/butler85/yt/src/yt-trunk-svn/yt/lagos/DerivedQuantities.pyc in
_Extrema(data, fields, filter)
385 mins, maxs = [], []
386 for field in fields:
--> 387 if data[field].size < 1:
388 mins.append(1e90)
389 maxs.append(-1e90)
/home/butler85/yt/src/yt-trunk-svn/yt/lagos/DerivedQuantities.pyc in
__getitem__(self, item)
41 return getattr(self.grid, attr)
42 def __getitem__(self, item):
---> 43 return self.data_source._get_data_from_grid(self.grid, item)
44
45 class DerivedQuantity(ParallelAnalysisInterface):
/home/butler85/yt/src/yt-trunk-svn/yt/lagos/BaseDataTypes.pyc in
save_state(self, grid, field)
41 old_keys = grid.data.keys()
42 grid.field_parameters = self.field_parameters
---> 43 tr = func(self, grid, field)
44 grid.field_parameters = old_params
45 grid.data = dict( [(k, grid.data[k]) for k in old_keys] )
/home/butler85/yt/src/yt-trunk-svn/yt/lagos/BaseDataTypes.pyc in
_get_data_from_grid(self, grid, field)
1660 else:
1661 pointI = self._get_point_indices(grid)
-> 1662 if grid[field].size == 1: # dx, dy, dz, cellvolume
1663 t = grid[field] * na.ones(grid.ActiveDimensions,
dtype='float64')
1664 return t[pointI].ravel()
/home/butler85/yt/src/yt-trunk-svn/yt/lagos/BaseGridType.pyc in
__getitem__(self, key)
133 """
134 if not self.data.has_key(key):
--> 135 self.get_data(key)
136 return self.data[key]
137
/home/butler85/yt/src/yt-trunk-svn/yt/lagos/BaseGridType.pyc in
get_data(self, field)
166 return self.data[field]
167 try:
--> 168 temp = self.hierarchy.io.pop(self, field)
169 self[field] = na.multiply(temp, conv_factor,
temp)
170 except self.hierarchy.io._read_exception, exc:
/home/butler85/yt/src/yt-trunk-svn/yt/lagos/DataReadingFuncs.pyc in
pop(self, grid, field)
55 else:
56 # We only read the one set and do not store it if it
isn't pre-loaded
---> 57 return self._read_data_set(grid, field)
58
59 def peek(self, grid, field):
/home/butler85/yt/src/yt-trunk-svn/yt/lagos/DataReadingFuncs.pyc in
_read_data_set(self, grid, field)
232 def _read_data_set(self, grid, field):
233 return HDF5LightReader.ReadData(grid.filename,
--> 234 "/Grid%08i/%s" % (grid.id, field)).swapaxes(0,2)
235
236 def _read_data_slice(self, grid, field, axis, coord):
ReadingError: ReadHDF5DataSet:
/home/butler85/sim/starsfuvamrrec/Cloud_128AMR4StarsFUV_0101.cpu0000 does
not exist, or no read permissions
8 years, 9 months
bug in ortho_ray and derived fields?
by Michael Kuhlen
Hi
I'm experiencing some weird behavior with ortho_ray() when used with
derived fields. I suspect this is a bug, but I'm new to yt, so maybe I'm
doing something incorrectly.
This is for a 1D Enzo simulation, and the only fields in the simulation
dataset are Density, x-velocity, and TotalEnergy. I defined two derived
fields, InternalEnergy and Pressure:
### define InternalEnergy field
def _InternalEnergy(field, data):
return data['TotalEnergy'] - 0.5*data['x-velocity']*data['x-velocity']
add_field('InternalEnergy', function=_InternalEnergy,
units=r'\rm{erg}/\rm{g}')
### define Pressure field
def _Pressure(field, data):
return (data.pf['Gamma'] - 1.0) * data['Density'] *
data['InternalEnergy']
add_field('Pressure', function=_Pressure, units=r'\rm{dyne}/\rm{cm}^{2}')
Next I want to extract a ray of Density, x-velocity, Pressure, and
InternalEnergy along the only dimension. I figured ortho_ray is the
right tool.
ray = pf.h.ortho_ray(0, [0.5, 0.5], ['x-velocity', 'Density',
'InternalEnergy', 'Pressure'])
print ray.keys()
This produces:
['Pressure', 'x', 'x-velocity', 'InternalEnergy', 'Density']
Perfect, everything as desired.
However, if I change the order of the input fields, some disappear from
the ray. Examples:
(1) ray = pf.h.ortho_ray(0, [0.5, 0.5], ['Density', 'x-velocity',
'Pressure', 'InternalEnergy'])
print ray.keys()
['x', 'x-velocity', 'Pressure', 'Density'] -- 'InternalEnergy' is
missing.
(2) ray = pf.h.ortho_ray(0, [0.5, 0.5], ['Pressure', 'Density',
'x-velocity'])
print ray.keys()
['Pressure'] -- 'Density' and 'x-velocity' are missing.
(3) ray = pf.h.ortho_ray(0, [0.5, 0.5], ['InternalEnergy', 'Density',
'x-velocity'])
print ray.keys()
['InternalEnergy', 'Density'] -- 'x-velocity' is missing.
The pattern I'm seeing here is that whenever 'InternalEnergy' is
specified as an input only one field after it makes it into the ray.
When 'Pressure' is specified, no further fields make it.
I don't imagine this behavior is intended, but maybe it's due to some
user error on my part?
Thanks in advance for any clarifications.
Mike
--
*********************************************************************
* *
* Dr. Michael Kuhlen Theoretical Astrophysics Center *
* email: mqk(a)astro.berkeley.edu UC Berkeley *
* cell phone: (831) 588-1468 601 Campbell Hall *
* skype username: mikekuhlen Berkeley, CA 94720 *
* *
*********************************************************************
8 years, 10 months
Problem with yt and h5py
by Brian O'Shea
Dear yt-users,
I'm having a strange problem with yt (svn trunk, r1693). If I run this
script:
from yt.mods import *
fn = "DD0050/DD0050"
pf = load(fn)
dd = pf.h.all_data()
I get the following error:
yt INFO 2010-04-18 13:41:48,183 Getting the binary hierarchy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/mnt/home/oshea/yt-x86_64/src/yt-trunk-svn/yt/lagos/OutputTypes.py",
line 150, in _get_hierarchy
self.__hierarchy = self._hierarchy_class(self,
data_style=self.data_style)
File
"/mnt/home/oshea/yt-x86_64/src/yt-trunk-svn/yt/lagos/HierarchyType.py", line
374, in __init__
AMRHierarchy.__init__(self, pf, data_style)
File
"/mnt/home/oshea/yt-x86_64/src/yt-trunk-svn/yt/lagos/HierarchyType.py", line
55, in __init__
self._parse_hierarchy()
File
"/mnt/home/oshea/yt-x86_64/src/yt-trunk-svn/yt/lagos/HierarchyType.py", line
435, in _parse_hierarchy
if self._parse_binary_hierarchy(): return
File
"/mnt/home/oshea/yt-x86_64/src/yt-trunk-svn/yt/lagos/HierarchyType.py", line
506, in _parse_binary_hierarchy
self.grid_dimensions[:] = f["/ActiveDimensions"][:]
File
"/mnt/home/oshea/yt-x86_64/lib/python2.6/site-packages/h5py-1.2.0-py2.6-linux-x86_64.egg/h5py/highlevel.py",
line 961, in __getitem__
basetype = self.id.dtype
File "h5d.pyx", line 109, in h5py.h5d.DatasetID.dtype.__get__
(h5py/h5d.c:1423)
File "h5t.pyx", line 364, in h5py.h5t.TypeID.dtype.__get__
(h5py/h5t.c:2919)
File "h5t.pyx", line 367, in h5py.h5t.TypeID.py_dtype (h5py/h5t.c:2976)
TypeError: No NumPy equivalent for TypeIntegerID exists
I installed this version of yt on MSU's supercomputer using the install
script at http://svn.enzotools.org/yt/trunk/doc/install_script.sh (the
supercomputer uses gcc v4.1.2), and as far as I can tell everything
relevant, including hdf5 and h5py, installed successfully. The same simple
set of commands works fine on my laptop with the same dataset. I'm pointing
my LD_LIBRARY_PATH environmental variable to the correct directory, so I
don't think it's that. Any ideas about what's going on here?
Some more system details: The output of uname -a for this system is is
"Linux dev-amd09 2.6.16.60-0.21-smp #1 SMP Tue May 6 12:41:02 UTC 2008
x86_64 x86_64 x86_64 GNU/Linux". The system uses gcc v4.1.2 and I'm
installing yt _without_ wxPython.
Thanks,
Brian
8 years, 10 months