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,
I did some simple volume rendering with the following script:
volume2 = AMRKDTree(pf, fields=["Dark_Matter_Density"],
no_ghost=False, tree_type="domain",
le=c-0.5*WW, re=c+0.5*WW)
cam = pf.h.camera(c, L, W, N, tf, volume=volume2, no_ghost=False,
north_vector=L, steady_north=True)
cam.snapshot(fn="%s_iso-DMdensity-%3.3d.png" % (filenameTHIS, j))
I got rather strange results in that the pictures look symmetric, which I am pretty
sure can not be true.
I attach the obtained plot.
Note that I am using KD tree and using 32 cores.
Your help at your earliest convenience is appreciated.
Best,
Renyue
Hi,
I want to test if a data set at particles. I thought:
pf.has_key("particle_type")
would work, but oddly it doesn't since:
In [17]: pf.has_key("particle_type")
Out[17]: False
yet:
In [4]: dd = pf.h.all_data()
In [5]: dd["particle_type"]
yt : [INFO ] 2013-02-23 17:00:43,826 Getting particle_type using ParticleIO
Out[5]: array([11, 11, 11, ..., 11, 11, 11])
Shouldn't pf.has_key("particle_type") be true in this case?
Elizabeth
Hello, I'm trying to install the latest dev branch of yt on my Ubuntu
11.10 laptop using the install script (with all default values) and run
into trouble once it gets to the installation of yt. Here is the tail of
the install log:
/bin/sh: svnversion: not found
PNG_LOCATION: png.cfg: /home/mike/Downloads/yt-x86_64/include,
/home/mike/Downloads/yt-x86_64/lib
FTYPE_LOCATION: freetype found in: /usr/include, /usr/lib
HDF5_LOCATION: HDF5_DIR: /home/mike/Downloads/yt-x86_64/include,
/home/mike/Downloads/yt-x86_64/lib
running develop
running build_scripts
running egg_info
running build_src
running build_forthon
error: No such file or directory
I've double checked all the dependencies and they are all installed and up
to date. The stable version installs fine, if that matters. If you need
my full install log, let me know.
Thanks,
Mike
Hi there,
I'm dealing with some athena data right now, and running into some issues
with defining regions.
an example, with domain_left_edge = [0, 0, 0], and right_edge = [1, 1, 1]
In [18]: center=[0.5,0.5,0.5]
In [19]: lc = [0,0,0.4]
In [20]: rc=[1.0,1.0,0.6]
In [21]: region = pf.h.region(center, lc, rc)
In [22]: region.volume()
Out[22]: -inf
I'm able to get at region.quantities, but trying to make a projection plot
fails.
Interestingly, or maybe not, if I try to do something similar with data
that has its domain centered on the origin, the volume is finite and
everything I've tried with plotting works fine. I guess athena support is
still a bit preliminary, but I thought I'd throw this out there.
best,
Nick
Hi Matt,
I've tried a few different things with PLY files and no luck. Actually,
I'm not
100% sure if Blender really likes PLY files anyway - you can't even export
color easily in PLY format in Blender. So, I've given up on PLY and have
hacked together a bit of a messy OBJ exporter:
http://paste.yt-project.org/show/3205/
I'm probably doing the colors wrong, since there's likely a nicer way to
get actual "face" values then just taking the value at 1/3 of the vertex
values, but it worked, so I didn't mess with it too much.
A few other things: (1) in theory, this can set transparencies, but I
haven't got that working as of yet, (2) the default specular (ambient?)
color settings make for a bit of a washed-out view in sketchfab:
http://skfb.ly/54jged0b, (3) the .mtl file is a bit too long since I'm
essentially setting each face as a different material, when one would just
like to use 1 material per color and set all the faces with that color on
a specific
surface plot to that material, but I haven't got that bit working well
either.
Thanks for the info, and please let me know if any of that doesn't make
sense.
-Jill
Dear yt users,
I usually install yt on system python, following the procedure suggested me
in this mailing list some months ago. In general everything goes fine with
the installation and I can normally use yt.
Now I installed Ubuntu from scratch in my computer (where previously yt was
installed and running!) and the installation seems to fine, but when I
insert the command "from yt.mods import * ", I get the following error:
*---------------------------------------------------------------------------
*
*ImportError Traceback (most recent call last)
*
*
*
*/usr/local/lib/python2.7/dist-packages/yt/<ipython console> in <module>()*
*
*
*/usr/local/lib/python2.7/dist-packages/yt/yt/mods.py in <module>()*
* 56 np.seterr(all = 'ignore')*
* 57 *
*---> 58 from yt.data_objects.api import \*
* 59 BinnedProfile1D, BinnedProfile2D, BinnedProfile3D, \*
* 60 data_object_registry, \*
*
*
*/usr/local/lib/python2.7/dist-packages/yt/yt/data_objects/api.py in
<module>()*
* 29 """*
* 30 *
*---> 31 from grid_patch import \*
* 32 AMRGridPatch*
* 33 *
*
*
*/usr/local/lib/python2.7/dist-packages/yt/yt/data_objects/grid_patch.py in
<module>()*
* 33 from yt.utilities.definitions import x_dict, y_dict*
* 34 *
*---> 35 from yt.data_objects.data_containers import YTFieldData*
* 36 from yt.utilities.definitions import x_dict, y_dict*
* 37 from .field_info_container import \*
*
*
*/usr/local/lib/python2.7/dist-packages/yt/yt/data_objects/data_containers.py
in <module>()*
* 41 from yt.config import ytcfg*
* 42 *
*---> 43 from yt.data_objects.derived_quantities import GridChildMaskWrapper
*
* 44 from yt.data_objects.particle_io import particle_handler_registry*
* 45 from yt.utilities.lib import find_grids_in_inclined_box, \*
*
*
*/usr/local/lib/python2.7/dist-packages/yt/yt/data_objects/derived_quantities.py
in <module>()*
* 33 from yt.data_objects.field_info_container import \*
* 34 FieldDetector*
*---> 35 from yt.utilities.data_point_utilities import FindBindingEnergy*
* 36 from yt.utilities.parallel_tools.parallel_analysis_interface
import \*
* 37 ParallelAnalysisInterface*
*
*
*ImportError: No module named data_point_utilities*
*
*
I would like to ask if someone has an idea of how can I solve this problem.
Thanks,
Roberto
Hi All,
I was curious if anyone has had any luck porting .ply files generated with
yt into Blender with colors? It seems to port in the surfaces just fine,
but they are a uniform color. From what I can gather, Blender imports
.ply files with face color instead of vertex so I tried the
surf.export_ply routine with "face" instead of "vertex" for sample_type,
but no luck ("vertex" doesn't work either).
Let me know if I can provide any more useful info.
Thanks for any help,
-J
Hello all,
I the following code
from yt.mods import *
pf = load("RD0015/RedshiftOutput0015")
p= SlicePlot(pf,2,'Density','c',(20,'kpc'))
p.save('sliceplot')
it is showing an error
*Traceback (most recent call last):
File "sliceplot_Density.py", line 3, in <module>
p = SlicePlot(pf,2,'Density','c',(20,'kpc'))
NameError: name 'SlicePlot' is not defined*
what is the reason? is there files we have to import.
--
Reju Sam John
In the following code (c attachment also)
import pylab as P
from yt.mods import *
pf = load("RD0002/RedshiftOutput0002")
c = pf.h.find_max('Density')[1]
proj = pf.h.proj(1, 'Density')
width = 96/pf['mpc'] # we want a 1.5 mpc view
res = [1000, 1000] # create an image with 1000x1000 pixels
frb = proj.to_frb(width, res, center=[0.5,0.5,0.5])
P.imshow(frb['Density'])
P.xlabel(r'$x\ \mathrm{kpc}$')
P.ylabel(r'$x\ \mathrm{furlongs}$')
P.savefig('Density_y.png')
My problem is to develop a new code which automatically take `n' input
files (RD0001/RedshiftOutput0001, RD0002/RedshiftOutput0002, RD0003
/RedshiftOutput0003, ....) and want to save each output files in a
folder.
Please help me.....
--
Reju Sam John