pyrad.util.belongs_roi_indices#

pyrad.util.belongs_roi_indices(lat, lon, roi, use_latlon=True)[source]#

Get the indices of points that belong to roi in a list of points

Parameters:
  • lat, lon (float arrays) – latitudes (or y) and longitudes(or x) to check

  • roi (dict) – Dictionary describing the region of interest

  • use_latlon (bool) – If True uses lat/lon as coordinates. Otherwise use Cartesian coordinates

Returns:

  • inds (array of ints) – list of indices of points belonging to ROI

  • is_roi (str) – Whether the list of points is within the region of interest. Can be ‘All’, ‘None’, ‘Some’