Hi all yt-users,
I'm running into a simple problem I think, but can't find the correct documentation.
I want to make a slice plot of dark matter density with velocity vectors overlaid, using Gadget HDF5 data. I have uploaded my script here :
The slice plot works fine. However, I got an error message for the velocity overlay:
The bottom line is the following :
YTFieldNotFound: Could not find field '('all', 'velocity_x')' in snapshot_000.
The error is pretty obvious, I think YT is looking for the default field, whereas it should look for a deposit of the dark matter data. Somehow I should specify that yt should look for this deposit, but I don't know how ?
Thank you by advance for your help,
Long DO CAO (Office F617)
Office phone: +81 6-6850-5482
Osaka University, Graduate School of Science
Department of Earth and Space Science
Toyonaka, Osaka, 560-0043, Japan
I’m pretty new to yt… I’m trying to speed things up significantly since I have rather large RAMSES datasets (running 3Mpc sims with 2^9^3 particles). I’m using STAMPEDE at TACC, https://vis.tacc.utexas.edu/# , to startup a notebook on their visualization nodes (each has 16 cores). I’m trying to use
ds = yt.load("./output_00011/info_00011.txt”)
# Looking through the "z" axis... Plot temp weighted by density
p = yt.ProjectionPlot(ds, "z", "temperature", weight_field="density")
but I only see one python process via top … and NO speedup. What do I need to do to take advantage of the 16 cores?
SESE Astronomy/Astrophysics Grad Student
So I’m trying to “p.annotate_particles” with RAMSES star particles (over a temperature projection plot) …. But everything in RAMSES is a particle, so when I do
I end up with a solid black plot… How do I tell annotate_particles to just use the particles with ID < 0 (these are the star particles)??
Hello yt people,
I'm hoping to write a cut_region expression that (a) depends on position
and (b) does it in a nonlinear way - I'd like to do a sort of
paraboloidal cut, like
ds.cut_region(dd, "obj['z'] - (obj['x']**2 + obj['y']**2)/2.0 < 0.78")
But this runs afoul of the unit-checking - obj['z'] doesn't have the
same units as obj['x']**2.
Somehow I either need to cast all the obj terms to be dimensionless
("trust me, I promise it's right"), or else give dimensions of length to
the constants. Should there be a way to do either one?
The yt community is proud to announce the release of yt 3.1.
yt (http://yt-project.org) is an open source, community-developed
toolkit for analysis and visualization of volumetric data of all
types, with a particular emphasis on astrophysical simulations and
nuclear engineering simulations.
This is a scheduled feature release. Highlighted changes in yt 3.1:
* The RADMC-3D export analysis module has been updated.
* Performance improvements for grid frontends.
* Added a frontend for Dark Matter-only NMSU Art simulations.
* The absorption spectrum generator has been updated.
* The PerspectiveCamera has been updated and a new SphericalCamera has been added.
* The unit system now supports unit equivalencies and has improved support for MKS units.
* Data object selection can now be chained, allowing selecting based on multiple constraints.
* Added the ability to manually override the simulation unit system.
* The documentation has been reorganized and has seen substantial improvements.
Minor or bugfix changes:
* The Gadget InternalEnergy and StarFormationRate fields are now read in with the correct units.
* Substantial improvements for the PPVCube analysis module and support for FITS datasets.
* The center of a PlotWindow plot can now be set to the maximum or minimum of any field.
* Projections are now performed using an explicit path length field for all coordinate systems.
* Fix for the camera.draw_line function.
* Minor fixes and improvements for yt plots.
* Significant documentation reorganization and improvement.
* Miscellaneous code cleanup.
* yt now hooks up to the python logging infrastructure in a more standard fashion, avoiding issues
with yt logging showing up with using other libraries.
* Improvements for the yt-rockstar interface.
* It is now possible to supply a default value for get_field_parameter.
* A bug in the interpretation of the units of RAMSES simulations has been fixed.
* Improvements and bugfixes for the halo analysis framework.
* Fix issues with the default setting for the "center" field parameter.
* yt can now be run in parallel on a subset of available processors using an MPI subcommunicator.
* Fix for incorrect units when loading an Athena simulation as a time series.
* Improved support for Enzo 3.0 simulations that have not produced any active particles.
* Fix for periodic radius vector calculation.
* Improvements for the Maestro and Castro frontends.
* Clump finding is now supported for more generic types of data.
* Fix unit consistency issue when mixing dimensionless unit symbols.
* Improved memory footprint in the photon_simulator.
* Large grids in Athena datasets produced by the join_vtk script can now be optionally split,
improving parallel performance.
* Slice plots now accept a “data_source" keyword argument.
* Nearest neighbor distance field added.
* Improvements for the ORION2 frontend.
* Enzo 3.0 frontend can now read active particle attributes that are arrays of any shape.
* Fixes for accessing deposit fields for FLASH data.
* Added wrapper functions for numpy array manipulation functions.
* Added support for packed HDF5 Enzo datasets.
A more comprehensive list of the changes in this release, with links to the corresponding pull requests,
can be found at http://yt-project.org/docs/3.1/reference/changelog.html.
Standard Installation Methods
As with previous releases, you can install yt from source using one of
the following methods.
1) From the install script (http://yt-project.org/#getyt):
$ wget http://hg.yt-project.org/yt/raw/stable/doc/install_script.sh
$ bash install_script.sh
$ yt update
2) From pip (source or binary wheel, see below for more details):
$ pip install yt
$ pip install -U yt
3) From the Anaconda Python Distribution (https://store.continuum.io/cshop/anaconda/):
$ conda install yt
$ conda update yt
Note that it might take a day or two for the conda package to be updated.
If you are on the “stable” branch, updating will bring you from yt 3.0.2 to 3.1, incorporating all
changes since 3.0.2, whereas if you are on the “dev” or “yt” branch, only the changes since
your last update should be incorporated.
NEW: Installing Binary Packages via pip
New to this release is the ability to install binary packages (“wheels”) using
pip on Windows and Mac OS X (64-bit only for both). This has the advantage
of not needing to install yt from source using a proper compiler setup, which
has caused occasional problems on both of these platforms and prevented us
from installing yt easily on other Python distributions.
We have so far been able to install and run the binary distribution via pip on the
following platforms and Python stacks:
* Enthought Canopy Python (https://www.enthought.com/products/canopy/)
* WinPython (http://winpython.sourceforge.net/)
Mac OS X x86_64:
* Enthought Canopy Python (https://www.enthought.com/products/canopy/)
* Homebrew Python (http://brew.sh/)
* Python.org Python
* Mac OS X’s system Python
* MacPorts Python (https://www.macports.org/)
This is somewhat experimental, so other distributions may work (or not),
please submit bug reports or successes to the mailing list or to the Bitbucket
issues page (http://bitbucket.org/yt_analysis/yt/issues).
All distributions must be Python v. 2.7. The requirements for installing yt
via this method are the same as from source:
* IPython (not required, but strongly recommended)
To install a new version of yt on one of these platforms, simply do
$ pip install yt
and you should get the binary distribution automatically. Also, if your
python installation is system-wide (e.g., the Mac system Python)
you might need to run pip with administrator privileges.
For more information, including more installation instructions, links to
community resources, and information on contributing to yt’s
development, please see the yt homepage at http://yt-project.org and
the documentation for yt-3.1 at http://yt-project.org/docs/3.1.
yt is the product of a large community of developers and users and we
are extraordinarily grateful for and proud of their contributions. Please
forward this announcement on to any interested parties.
As always, if you have any questions, concerns, or run into any trouble
updating please don't hesitate to send a message to the mailing list or
stop by our IRC channel.
The yt development team
I am plotting a 2D cut of my domain using SlicePlot, is there a way to
flip the axes ordering for normal='y' so the z axis is on the vertical?
I would like to insert a yt-generated plot in a particular matplotlib axes object that I created. In matplotlib, I can do this via
fig2 = plt.figure()
ax2 = fig2.add_axes([0.15, 0.1, 0.7, 0.3])
which will place the plot on the axes ax2. Is there any way to do this in yt?
This message and its contents including attachments are intended solely for the original recipient. If you are not the intended recipient or have received this message in error, please notify me immediately and delete this message from your computer system. Any unauthorized use or distribution is prohibited. Please consider the environment before printing this email.
A glance at the source code (utilities/logger.py) indicates to me that yt
is using the Python logging package for output information, and that
depending on the choice of the option stdoutStreamLogging, this can be
directed to either stdout or stderr. Since there's a lot of information
piped to stdout whenever a dataset is opened, and this can tend to
overwhelm any other information that is being displayed to screen it would
be nice if the logging output could be redirected to a file. This can be
done when setting the basicConfig for the logger
<https://docs.python.org/2/howto/logging.html> when setting it up, but that
page indicates that this configuration cannot be overridden after it has
initially been set. Is there a way to include an option in yt for the user
to direct the logging output to a file of their choice?
Department of Physics and Astronomy
Vice President, Graduate Student Organization
Stony Brook University
Hi yt user,
I start to use yt-3.x version for the gadget analyses.
Although I have previously used the yt-2.6x version for the enzo
analyses, I find that there are many differences between two.
[Now, I find that new yt is significantly improved than previous one
but I need some adjustment..]
Here, I have a question regarding to derived field.
Since, my gadegt outputs only have InterenalEnergy, I need to make a
derived field for temperature as follow:
def _temperature(field, data):
BOLTZMANN = 1.3806e-16
PROTONMASS = 1.6726e-24
GAMMA = 5.0 / 3.0
H_MASSFRAC = 0.76
mu = 4.0 / (3.0 * H_MASSFRAC + 1.0 + 4.0 * H_MASSFRAC *
and try to make phase diagram and got the following error message:
yt : [INFO ] 2015-01-04 19:56:35,791 Max Value is 4.03205e-21 at
30150.5327224731445312 31066.5464401245117188 29380.5456161499023438
Traceback (most recent call last):
File "phase.py", line 32, in <module>
line 699, in __init__
File "/Users/jhchoi/common/src/yt/yt/data_objects/profiles.py", line
1331, in create_profile
for f, l in zip(bin_fields, logs)]
line 482, in __call__
rv = super(Extrema, self).__call__(fields, non_zero)
line 56, in __call__
sto.result = self.process_chunk(ds, *args, **kwargs)
line 490, in process_chunk
fd = data[field]
line 240, in __getitem__
line 661, in get_data
line 687, in _generate_fields
File "/Users/jhchoi/common/src/yt/yt/units/yt_array.py", line 416,
new_units = self._unit_repr_check_same(units)
File "/Users/jhchoi/common/src/yt/yt/units/yt_array.py", line 402,
self.units, self.units.dimensions, units, units.dimensions)
yt.utilities.exceptions.YTUnitConversionError: Unit dimensionalities
do not match. Tried to convert between dimensionless (dim 1) and K
It looks that new yt become a bit picky on the units.
In this derived field, the unit contribution from BOLTZMANN and
PROTONMASS is not recognized and it causes error, I think.
How can I resolve this error?
Moreover, how can I make derived field without sensitive unit matching?
Sometimes, I used derived field when I need to convert log units for
visualization, and when dealing with the dimensionless field.
Thank you for help,
This may be of interest to yt users who run their work on XSEDE resources.
---------- Forwarded message ----------
From: XSEDE User News <news(a)xsede.org>
Date: Mon, Jan 5, 2015 at 7:04 AM
Subject: Update: HPC Python Training
This is an update of a previously posted message from XSEDE User News.
Categories: Training, Education & Outreach
Start time: 23 Jan, 2015 09:00 CST
End time: 23 Jan, 2015 12:00 CST
Posted Updates (most recent first)
Posted on 05 Jan, 2015 14:54 UTC by Jason Allison
Posted on 05 Jan, 2015 14:52 UTC by Jason Allison
January 23, 2015
9:00 a.m. to 12:00 p.m. CDT
Texas Advanced Computing Center
J.J. Pickle Research Campus
10100 Burnet Rd.
Austin, TX 78758
You are welcome to attend this training class in-person or via webcast.
Registration closes at 5 p.m. CDT, January 19, 2015
This class provides intermediate users with and overview of intermediate
and advanced techniques for using Python on HPC environments. The lecture
will emphasize well known approaches for improving the performance of their
Python codes. The lecture will include an overview of when Python can be
used on HPC, an overview of numpy, matplotlib, SciPy and Cython, as well as
an introduction to the most common functionality of mpi4py.
Previous knowledge of Python is required since the course will not go into
specific details of Python syntax. Some knowledge of MPI is required as the
lecture will not go into specific details regarding MPI. Some familiarity
with C/C++ is also recommended for Cython.
The labs will be available for remote users. However, we will not be able
to assist remote users with problems during the lab. Remote users are
invited to submit their questions via email.
To register for this course please visit the XSEDE course calendar.
This message was generated by XSEDE User News v3.0. You can view this
message in the XSEDE User Portal at
You can manage your XSEDE User News subscriptions at
University of Arizona