ORION simulation of star formation by S. Offner et al.
Simulation of dwarf galaxies by Wise & Cen
Projection of dark matter density by the Nyx group
Population III star simulation by Turk et al.
Cluster simulation by Skillman, Burns & O'Shea
Off-axis projection of a disk-galaxy by Hummels & Bryan
Phase plot of matter distribution by Turk & Bryan
Detailed data analysis and visualizations, written by working astrophysicists and designed for pragmatic analysis needs.
yt is designed to provide a consistent, cross-code interface to analyzing and visualizing astrophysical simulation data from a physical perspective.
Read Moreyt is composed of a friendly community of users and developers. We want to make it easy to use and develop — we'd love it if you got involved!
Read Moreyt is developed completely in the open, released under the GPL license. The developers are committed to open source practices and fidelity of scientific results.
Read MoreThe yt project aims to produce an integrated science environment for collaboratively asking and answering astrophysical questions. To do so, it will encompass the creation of initial conditions, the execution of simulations, and the detailed exploration and visualization of the resultant data. It will also provide a standard framework based on physical quantities interoperability between codes.
Development of yt is driven by a commitment to Open Science principles as manifested in participatory development, reproducibility, documented and approachable code, a friendly and helpful community of users and developers, and Free and Libre Open Source Software.
The yt project is a Python package for analyzing and visualing
volumetric, multi-resolution astrophysical data. yt was originally
written by Matthew Turk in late 2006 to quickly slice data from the
code Enzo.
Since that time, it has grown to be a truly community-supported code, with a core development team, contributors from all around the globe, active user and developer communities, and even user-focused workshops.
Thanks to this community investment and growth, what started as a simple, one-off plotting script has grown into a fully-featured tool that can read data from half a dozen codes, be called from within running simulations, and even generate volume renderings that can be directly displayed in planetarium domes.
Installation instructions for the faint of heart
yt is built on a stack of completely free and libre open source software, with no proprietary dependencies. It provides its own install script, to assist with constructing an isolated environment that can be upgraded and operated in independently of the host operating system.
Usually getting yt is as simple as running the installation script. To download the current "stable" version:
Or, if you'd rather the current main development tree:
Either way you do it, you can easily update to the most recent version of the code (in your branch) very easily:
There are more detailed instructions for installation in the manual, and some pointers about some community installation locations on commonly-used supercomputers.
Some examples to get you going
In the documentation you'll find a number of
samples, examples, tutorials and canned recipes. You can even check
out the cookbook
repository. Additionally, on the
users' mailing list, there are a number of people who are
willing to help out.
Here, though, we've provided a couple snippets of code that show how you might get started looking at data, making visualizations, and exploring. This is only a selection of the stuff yt can do, but it is a good sampling.
In addition, check out some of the really cool images and videos that people have created using yt. If you have something to contribute, please submit your scripts to the yt Hub or videos to our vimeo group.
from yt.mods import *
pf = load("RD0005/RedshiftOutput0005")
# Let's center at the center of the box
pc = PlotCollection(pf, [0.5,0.5,0.5])
# Project Density along the x axis...
p = pc.add_projection("Density", 'x')
pc.save()
from yt.mods import *
pf = load("RD0005/RedshiftOutput0005")
# Let's center at the center of the box
pc = PlotCollection(pf, [0.5,0.5,0.5])
# Project Density along the x axis...
p = pc.add_projection("Density", 'x')
halos = HaloFinder(pf)
p.modify["hop_circles"](halos)
p.modify["hop_particles"](halos, 10) # Max of 10 halos
pc.save()
from yt.mods import *
pf = load("plt01200")
pf.h.print_stats()
print pf.h.grids[0]["Density"]
for g in pf.h.grids:
print g.LeftEdge, g.RightEdge, g.dds, g["Density"].max()
from yt.mods import *
import yt.visualization.volume_rendering.camera as camera
pf = load("RedshiftOutput0010.dir/RedshiftOutput0010")
# Centered at [0.5, 0.5, 0.5], out to 50 Mpc.
cam = camera.HEALpixCamera([0.5, 0.5, 0.5], 50./pf['mpc'],
nside = 64, pf = pf,
log_fields = [False])
bitmap = cam.snapshot("allsky.png")
from yt.mods import *
pf = load("DD0053/DD0053")
# Make a sphere centered at the maximum density point,
# with a radius of 100 au.
sp = pf.h.sphere('max', (100.0,'au'))
# L is a 3D array.
L = sp.quantities["AngularMomentumVector"]()
pc = PlotCollection(pf)
pc.add_cutting_plane("Density", L)
pc.set_width(1000, 'au')
pc.save()
from yt.mods import *
pf = load("JHK-DD0030/galaxy0030")
sphere = pf.h.sphere('max', (125, 'kpc'))
# limits is a tuple of two values, the minimum
# and maximum density.
limits = sphere.quantities["Extrema"]("Density")[0]
tf = ColorTransferFunction(na.log10(limits))
# five layers, with the kamae colormap, 0.001 dex wide each
tf.add_layers(8, colormap="kamae", w=0.001)
cam = pf.h.camera([0.5, 0.5, 0.5], # center
[0.2, 0.3, 0.4], # view-angle
125.0/pf['kpc'], # FOV
(512, 512), # resolution
tf) # transfer function
cam.snapshot("image.png", 4.0) # clip by 4.0 * std()
import time
from yt.mods import *
pf = load("JHK-DD0030/galaxy0030")
pc = PlotCollection(pf, [0.5, 0.5, 0.5])
# Using the center of the PlotCollection, find a phase plot
# for the the three fields out to a radius of 1 in code
# units.
pc.add_phase_sphere(1.0, '1', ["Density", "Temperature", "CellMassMsun"],
weight=None)
pc.save()
Participation encouraged!
yt is a friendly community. We like hearing about fun things you have done with the code, and we're happy to help you out if you have a question or some trouble. You can join us in IRC, on the mailing lists, and if you'd like, you can check out how to develop, too.
If you've got some code to share, or scripts that you'd like to share, start up a repo on BitBucket , or share them on our PasteBin. For longer chunks of code or repositories used to make papers, we encourage you to check out the yt Hub, which is designed to share utilities, management scripts and so on with other people. If you have any trouble, drop by the mailing list and we'll be happy to help out.
Hope to hear from you!
users mailing list
dev mailing list
commits mailing list
IRC (#yt on chat.freenode.net)
Want to help out?
If you're interested in getting started with helping out, the easiest way is to Fork us on BitBucket, check out the developer guide, and stop by the developers' mailing list. yt is released under the GPLv3.
There are lots of fun projects to work on, along with some open issues, and we'd particularly like if you'd help out by adding a new code or if you'd like to help out by shoring up support in semi-supported code.
Let us know how it goes!
"Help" is not a four-letter word
If you're struggling with trying to figure something out, or where to look for information, we're happy to help out! There are a number of prepared documents, like the yt orientation, the cookbook and the documentation as a whole which are designed to walk you through getting up and running. If you're looking for more nitty-gritty details of how yt works, check out the method paper.
But, we can't always anticipate all the different ideas you might have, or the corner cases where the docs break down. We have a couple channels for communication -- there's a web chat, which usually has a handful of developers and users in it during the day, and there's the users' mailing list which usually has a good response time. Of course, if you think you've found a bug, we also encourage you report it! This will help us track it and make sure that it gets resolved. For a full checklist of how to get your questions answered, check out our Asking for Help webpage.
Talk to you soon, and enjoy!