yt.geometry.object_finding_mixin module

AMR index container class

class yt.geometry.object_finding_mixin.ObjectFindingMixin[source]

Bases: object

find_field_value_at_point(fields, coord)[source]

Find the value of fields at a point.

Returns the values [field1, field2,...] of the fields at the given (x,y,z) point. Returns a list of field values in the same order as the input fields.

  • fields (string or list of strings) – The field(s) that will be returned.
  • coord (list or array of floats) – The location for which field values will be returned.


>>> ds.h.find_field_value_at_point(['Density', 'Temperature'],
    [0.4, 0.3, 0.8])
[2.1489e-24, 1.23843e4]
find_max(field, finest_levels=3)[source]

Returns (value, center) of location of maximum for a given field.

find_max_cell_location(field, finest_levels=3)[source]

Returns (value, center) of location of minimum for a given field


Returns the (objects, indices) of grids containing an (x,y,z) point

find_points(x, y, z)[source]

Returns the (objects, indices) of leaf grids containing a number of (x,y,z) points

find_ray_grids(coord, axis)[source]

Returns the (objects, indices) of grids that an (x,y) ray intersects along axis

find_slice_grids(coord, axis)[source]

Returns the (objects, indices) of grids that a slice intersects along axis

find_sphere_grids(center, radius)[source]

Returns objects, indices of grids within a sphere

get_box_grids(left_edge, right_edge)[source]

Gets back all the grids between a left edge and right edge

get_box_grids_below_level(left_edge, right_edge, level, min_level=0)[source]
get_periodic_box_grids(left_edge, right_edge)[source]
get_periodic_box_grids_below_level(left_edge, right_edge, level, min_level=0)[source]