YTCuttingPlaneBase.
to_frb
(width, resolution, height=None, periodic=False)[source]¶This function returns an ObliqueFixedResolutionBuffer generated from this object.
An ObliqueFixedResolutionBuffer is an object that accepts a variable-resolution 2D object and transforms it into an NxM bitmap that can be plotted, examined or processed. This is a convenience function to return an FRB directly from an existing 2D data object. Unlike the corresponding to_frb function for other YTSelectionContainer2D objects, this does not accept a ‘center’ parameter as it is assumed to be centered at the center of the cutting plane.
Parameters: | width : width specifier
height : height specifier, optional
resolution : int or tuple of ints
periodic : boolean
|
---|---|
Returns: | frb :
|
Examples
>>> v, c = ds.find_max("density")
>>> sp = ds.sphere(c, (100.0, 'au'))
>>> L = sp.quantities.angular_momentum_vector()
>>> cutting = ds.cutting(L, c)
>>> frb = cutting.to_frb( (1.0, 'pc'), 1024)
>>> write_image(np.log10(frb["Density"]), 'density_1pc.png')