There are some functions, routines and classes that utilize the yt API but aren’t necessarily a part of the core functionality. These live inside the yt/extensions/ subdirectory and are accessible by direct importation.
This module allows the user to regrid existing data into an arbitrary coordinate system. It comes with the machinery to automatically regrid onto spherical coordinates.
Module author: Matthew Turk <matthewturk@gmail.com>
Sample Usage
from yt.mods import *
from yt.extensions.coordinate_transforms import *
pf = load("galaxy1200.dir/galaxy1200")
nr, ntheta, nphi = 128, 180, 180
fields = ["Density", "Temperature"]
center = [0.5, 0.5, 0.5]
regrid = spherical_regrid(pf, nr, ntheta, nphi, fields, center)
The disk stacker is a mechanism for taking many oblique slices (see cutting) and stacking them together. The mechanism here is rather simple – you feed in a normal angle, a disk height, a width, and it makes many slices through the domain and adds them all up. This enables a ‘stacked’ image of the disk to be produced.
Once the object has been instantiated, you can access any field as per normal and it will stack it as requested:
Module author: Matthew Turk <matthewturk@gmail.com>
Sample Usage
from yt.mods import *
from yt.extensions.disk_analysis import StackedDiskImage
pf = load("galaxy1200.dir/galaxy1200")
norm_vec = [0.2, 0.4, 0.1]
center = [0.8, 0.5, 0.3]
thickness = 5.0 / pf['kpc']
width = 100.0 / pf['kpc']
n_slices = 200
image_size = (800, 800)
disk = StackedDiskImage(pf, center, norm_vec,
thickness, width, nslices, image_size)
my_disk_image = disk["Density"]
This module allows for systematic analysis and imaging of halos found in a simulation.
Module author: Britton Smith <brittonsmith@gmail.com>
This module provides a mechanism for extracted a subset of a hierarchy. Typically this is used to export data to VTK or Amira format.
Module author: Matthew Turk <matthewturk@gmail.com>
This module provides a mechanism for integrating emissivity output from CLOUDY and creating integrated X-ray emissivity fields.
Module author: Matthew Turk <matthewturk@gmail.com>
From a table, interpolate over field_names to get resultant luminosity. Table must be of the style such that it is ordered by [field_names[0], field_names[1], ev]
Add a new field to the FieldInfoContainer, which is an integrated bin from ev_min to ev_max.
Returns the name of the new field.
yt has the facility to create light cones, which are stacks of images generated from a series of simulations. The code to generate this is in the module lightcone.
Module author: Britton Smith <brittonsmith@gmail.com>