YTDiskBase.
cut_region
(field_cuts, field_parameters=None)¶Return an YTCutRegionBase, where the a cell is identified as being inside the cut region based on the value of one or more fields. Note that in previous versions of yt the name ‘grid’ was used to represent the data object used to construct the field cut, as of yt 3.0, this has been changed to ‘obj’.
Parameters: | field_cuts : list of strings
field_parameters : dictionary
|
---|
Examples
To find the total mass of hot gas with temperature greater than 10^6 K in your volume:
>>> ds = yt.load("RedshiftOutput0005")
>>> ad = ds.all_data()
>>> cr = ad.cut_region(["obj['temperature'] > 1e6"])
>>> print cr.quantities.total_quantity("cell_mass").in_units('Msun')