maxima.max_inmask

max_inmask(maxima, mask, withvalue=1.0)[source]

Get the maxima located where the mask have a specific value (e.g., 1)

Parameters
  • maxima (pd.DataFrame) – Pandas DataFrame with the information of the maxima. Has to contain at least the column ‘Pixel number’.

  • mask (np.ndarray) – A Healpix map to be used as mask. Its ``nside`` should be the same as the original map.

  • withvalue (float, optional) – Value to be matched. Only maxima that have this value on the mask will be returned.

Returns

The same Pandas DataFrame as the input maxima, but containing only the maxima located at points where the mask has the value withvalue (1 by default).

Return type

pd.DataFrame