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 everyone,
I'm having a problem using fields that use ghost zones. The following
simple script:
http://paste.yt-project.org/show/2010/
gives this error:
http://paste.yt-project.org/show/bOikDPScBBtDiUGvH11X/
I am working from the tip, but I get the same behavior from yt/2.3. In
yt/2.2, everything is working. I am working now to narrow that range down
a bit, but does anyone have an idea?
Britton
Hi,
The yt/dev and yt/dev-local modules on Kraken are giving errors when trying
to do 'from yt.mods import *'. Just doing that give the following error:
http://paste.yt-project.org/show/5A6G4lAjr7UE2y1wsLNQ
I get the exact same thing with both of those two modules.
Thanks!
Britton
Hi YT users,
I would like to make a (spherical and/or cylindrical) profile of the
velocity dispersion.
In order to do so, I need to compute the mean velocity (BulkVelocity) for a
given shell (or ring), and pass this value to newly defined velocity
dispersion field, and then make a profile for the velocity dispersion field.
Is there a particular way in yt to handle this?
Junhwan
P.S.: A few weeks ago I posted a similar question and Matt gave me a
following hint.
@derived_field(name = "deltaLocalCircularVelocity")
def delta_LocalCircularVelocity(fi
eld, data):
fn, x, cv = data.get_field_parameter("local_circular_velocity")
cv0 = na.interp(data[fn].ravel(), x, cv)
cv0 = cv0.reshape(data[fn].shape)
delta_cv = cv0 - data["LocalCircularVelocity"]
return delta_cv
You'll need to do something like this on the data object from which
you are getting your data:
sp.set_field_parameter("local_circular_velocity",
(fn, prof[fn], prof["LocalCircularVelocity"]))
However, it does not work for me and it is also complicate to understand
and modify it.
--
--------------------------------------------------------------
Jun-Hwan Choi, Ph.D.
Department of Physics and Astronomy, University of Kentucky
Tel: (859) 897-6737 Fax: (859) 323-2846
Email: jhchoi(a)pa.uky.edu URL: http://www.pa.uky.edu/~jhchoi
--------------------------------------------------------------
Hi YT users,
I would like to make a (spherical and/or cylindrical) profile of the
velocity dispersion.
In order to do so, I need to compute the mean velocity (BulkVelocity)
for a given shell (or ring), and pass this value to newly defined
velocity dispersion field, and then make a profile for the velocity
dispersion field.
Is there a particular way in yt to handle this?
Junhwan
P.S.: A few weeks ago I posted a similar question and Matt gave me a
following hint.
@derived_field(name = "deltaLocalCircularVelocity")
def delta_LocalCircularVelocity(field, data):
fn, x, cv = data.get_field_parameter("local_circular_velocity")
cv0 = na.interp(data[fn].ravel(), x, cv)
cv0 = cv0.reshape(data[fn].shape)
delta_cv = cv0 - data["LocalCircularVelocity"]
return delta_cv
You'll need to do something like this on the data object from which
you are getting your data:
sp.set_field_parameter("local_circular_velocity",
(fn, prof[fn], prof["LocalCircularVelocity"]))
However, it does not work for me and it is also complicate to understand
and modify it.
--
--------------------------------------------------------------
Jun-Hwan Choi, Ph.D.
Department of Physics and Astronomy, University of Kentucky
Tel: (859) 897-6737 Fax: (859) 323-2846
Email: jhchoi(a)pa.uky.edu URL: http://www.pa.uky.edu/~jhchoi
--------------------------------------------------------------
Hi all,
I am trying to make a simple density projection of my data using yt on
kraken. I have done this successfully many times before both on kraken
and other machines, but lately I have been getting errors on kraken.
I tried to run it interactively and it worked, but when I submit it as
a job, I get this error:
P000 yt : [INFO ] 2012-02-24 03:40:43,722 Created plot collection
with default plot-center = [0.50027465
8203125, 0.500335693359375, 0.499969482421875]
Traceback (most recent call last):
File "/var/spool/alps/8952326/try1.py", line 8, in <module>
profile("Feb2012/cluster_64/",imax=20)
File "/lustre/scratch/yuan/enzo_yt/cluster256_nog/yuan.py", line 23,
in profile
File "/lustre/scratch/yuan/enzo_yt/cluster256_nog/yuan.py", line 23,
in profile
pc.add_projection("Density", 0)
File "/lustre/scratch/proj/sw/yt/dev/lib/python2.7/site-packages/yt-2.4dev-py2.7-linux-x86_64.egg/yt/visua
lization/plot_collection.py", line 758, in add_projection
P000 yt : [INFO ] 2012-02-24 03:40:43,919 Starting 'Projecting
level 0 / 8 '
**field_parameters)
**field_parameters)
File
"/lustre/scratch/proj/sw/yt/dev/lib/python2.7/site-packages/yt-2.4dev-py2.7-linux-x86_64.
egg/yt/data_objects/data_containers.py", line 1648, in __init__
File "/lustre/scratch/proj/sw/yt/dev/lib/python2.7/site-packages/yt-2.4dev-py2.7-linux-x86_64.egg/yt/data_
objects/data_containers.py", line 309, in _refresh_data
.......
File "/lustre/scratch/proj/sw/yt/dev/lib/python2.7/site-packages/yt-2.4dev-py2.7-linux-x86_64.egg/yt/funcs
.py", line 104, in get_memory_usage
return float(os.popen('ps -o rss= -p %d' % pid).read()) / 1024
ValueError: could not convert string to float: PID Uid VmSize Stat Command
1 root 584 S init
2 root SW [migration/0]
3 root SWN [ksoftirqd/0]
4 root SW [migration/1]
5 roo
It seems that something went wrong at "get_memory_usage", but I had
never had this error before and an interactive job does not get this
error either.
Sorry the error message is quite messy...
Yuan
Hi volume rendering experts,
I was playing around with a density volume render of a tiny cube on my
laptop, everything went smoothly, however, I notice a change in "overall"
brightness between images when I did a rotation. I'm not sure how to
explain this, but it seems that from images of different angles, sometimes
the average brightness is consistent, but sometimes it suddenly drops and
the image would look about half as bright, and after a couple frames it
would light back up.
I'm guessing this is after each image is ray casted, it gets normalized to
a certain value, and that value changes depending on the angle? Is there a
way to pin the brightness between images so if I make a movie it won't dim
and light up as I rotate?
Also I was wondering if I'm the only person to notice this? (the only other
post I found about volume render brightness is about AMR cell contributions)
From
G.S.
Hi all.
This is a projection of the Dark_Matter_Density field from the initial
output of a standard enzo cosmological run with just 2 cores. It looks like
something is going wrong on the grid boundaries. This occurs for
projections and slices, but only for gridded particle data. The gas density
looks fine. It seems to occur at every grid boundary, which I tested by
increasing the number of cores (so the same number of grids).
I can't tell if this is an enzo or yt issue, but I figured I should ask
here first in case I missed something on the yt side. Has anyone seen this
before?
Best,
Casey
P.S. What is the status of the yt image server? Should we attach or imgur
images in the future?
Hi all.
I'm trying to make a covering grid of the full domain of an enzo
(cosmological) simulation, getting the dark matter density and velocity
fields. This works fine with the gas:
In [1]: cg = pf.h.covering_grid(0, [0,0,0], [256,256,256],
fields=["Density", "x-velocity", "y-velocity", "z-velocity"])
But then I try the DM fields:
In [2]: cg = pf.h.covering_grid(0, [0,0,0], [256,256,256],
fields=["Dark_Matter_Density", "cic_particle_velocity_x",
"cic_particle_velocity_y", "cic_particle_velocity_z"])
... ipython cruft ...
/project/projectdirs/nyx/yt-installs/yt-hopper/src/yt-hg/yt/data_objects/data_containers.pyc
in __init__(self, level, left_edge, dims, fields, pf, num_ghost_zones,
use_pbar, **kwargs)
3342 self.domain_width = na.rint((self.pf.domain_right_edge -
3343
self.pf.domain_left_edge)/self.dds).astype('int64')
-> 3344 self._refresh_data()
3345
3346 def _get_list_of_grids(self, buffer = 0.0):
/project/projectdirs/nyx/yt-installs/yt-hopper/src/yt-hg/yt/data_objects/data_containers.pyc
in _refresh_data(self)
3359
3360 def _refresh_data(self):
-> 3361 AMR3DData._refresh_data(self)
3362 self['dx'] = self.dds[0] * na.ones(self.ActiveDimensions,
dtype='float64')
3363 self['dy'] = self.dds[1] * na.ones(self.ActiveDimensions,
dtype='float64')
/project/projectdirs/nyx/yt-installs/yt-hopper/src/yt-hg/yt/data_objects/data_containers.pyc
in _refresh_data(self)
307 """
308 self.clear_data()
--> 309 self.get_data()
310
311 def keys(self):
/project/projectdirs/nyx/yt-installs/yt-hopper/src/yt-hg/yt/data_objects/data_containers.pyc
in get_data(self, fields)
3377 try:
3378 #print "Generating", field
-> 3379 self._generate_field(field)
3380 continue
3381 except NeedsOriginalGrid, ngt_exception:
/project/projectdirs/nyx/yt-installs/yt-hopper/src/yt-hg/yt/data_objects/data_containers.pyc
in _generate_field(self, field)
3404 # First we check the validator; this might even raise!
3405 self.pf.field_info[field].check_available(self)
-> 3406 self[field] = self.pf.field_info[field](self)
3407 else: # Can't find the field, try as it might
3408 raise KeyError(field)
/project/projectdirs/nyx/yt-installs/yt-hopper/src/yt-hg/yt/data_objects/field_info_container.pyc
in __call__(self, data)
314 ii = self.check_available(data)
315 original_fields = data.keys() # Copy
--> 316 dd = self._function(self, data)
317 dd *= self._convert_function(data)
318 for field_name in data.keys():
/project/projectdirs/nyx/yt-installs/yt-hopper/src/yt-hg/yt/frontends/enzo/fields.pyc
in _cic_particle_field(field, data)
332 particle_field = field.name[4:]
333 top = na.zeros(data.ActiveDimensions, dtype='float32')
--> 334 if data.NumberOfParticles == 0: return top
335 particle_field_data = data[particle_field] *
data['particle_mass']
336
amr_utils.CICDeposit_3(data["particle_position_x"].astype(na.float64),
AttributeError: 'AMRCoveringGrid' object has no attribute
'NumberOfParticles'
Are you not supposed to use a covering grid with these fields or am I
creating the covering grid incorrectly? I get reasonable looking plots if I
slice/project cic_particle_velocity_x, so I believe it's working otherwise.
Best,
Casey