This accepts a 2D data object, such as a Projection or Slice, and implements a protocol for generating a pixelized, fixed-resolution image buffer.
yt stores 2D AMR data internally as a set of 2D coordinates and the half-width of individual pixels. Converting this to an image buffer requires a deposition step, where individual variable-resolution pixels are deposited into a buffer of some resolution, to create an image. This object is an interface to that pixelization step: it can deposit multiple fields. It acts as a standard AMRData object, such that dict-style access returns an image of a given field.
Parameters : | data_source : yt.lagos.AMRProjBase or yt.lagos.AMRSliceBase
bounds : sequence of floats
buff_size : sequence of ints
antialias : boolean
|
---|
See also
Examples
To make a projection and then several images, you can generate multiple images.
>>> proj = pf.h.slice(0, "Density")
>>> frb1 = FixedResolutionBuffer(proj, (0.2, 0.3, 0.4, 0.5),
(1024, 1024))
>>> print frb1["Density"].max()
1.0914e-9
>>> print frb1["Temperature"].max()
104923.1
Methods
convert_distance_x(distance) | This function converts code-space distance into pixel-space distance in the x-coordiante. |
convert_distance_y(distance) | This function converts code-space distance into pixel-space distance in the y-coordiante. |
convert_to_pixel(coords) | This function converts coordinates in code-space to pixel-space. |
export_fits(filename_prefix[, fields, clobber]) | This will export a set of FITS images of either the fields specified |
export_hdf5(filename[, fields]) | Export a set of fields to a set of HDF5 datasets. |
open_in_ds9(field[, take_log]) | This will open a given field in the DS9 viewer. |