pangeo_fish.healpy.buffer_points

Contents

pangeo_fish.healpy.buffer_points#

pangeo_fish.healpy.buffer_points(cell_ids, positions, *, buffer_size, nside, sphere_radius=6371000.0, factor=4, intersect=False)#

select the cells within a circular buffer around the given positions

Parameters:
  • cell_ids (xarray.DataArray) – The cell ids within the given grid.

  • positions (xarray.DataArray) – The positions of the points in cartesian coordinates.

  • buffer_size (float) – The size of the circular buffer.

  • nside (int) – The resolution of the healpix grid.

  • sphere_radius (float, default: 6371000) – The radius of the underlying sphere, used to convert radius to radians. By default, this is the standard earth’s radius in meters.

  • factor (int, default: 4) – The increased resolution for the buffer search.

  • intersect (bool, default: False) – If False, select all cells where the center is within the buffer. If True, select cells which intersect the buffer.

Returns:

masks (xarray.DataArray) – The masks for each position. The cells within the buffer are True, every other cell is set to False.