maxima.hotspot¶
-
hotspot
(mapp, minima=False, folder=None, name='Map', hotspot_command='hotspot')[source]¶ Find the maxima (or minima) in a map.
Notes
This function use the Healpix utility
hotspot
, which is not yet implemented in Python distribution of Healpix. The utilityhealpix
is called on a terminal and it writes files on the hard drive. This function deletes these files after the are read by Python unless a specific folder is given as an input. This function requireshealpix
to be installed on the computer for now, although this is expected to change soon.The utility has several limitations regarding the intensity of the maxima. It only stores 4 digits before the period and 6 digits after it. It is highly recommended to normalise the map before using this function. For extreme cases, outliers have to be removed before applying the function, for example with:: >>> mapp[mapp>9999]=9999
- Parameters
mapp (np.ndarray) – A Healpy map of the sky.
minima (bool, optional) – If
True
, this function return the minima instead of the maxima. We remind the user that the rest of the functions are designed for set of maxima. If minima are to be used, we recommend changing the sign of the minima so the can be regarded as maxima of the opposite map.folder (str, optional) – Use only if the files generated by
hotspot
are to be stored. This argument indicates where.name (str, optional) – The name of the map to use in the written files. Unnecesary unless
folder
is given.hotspot_command (str, optional) – The name of the command installed on the computer, usually ‘hotspot’ or ‘hotspot_gcc’.
- Returns
Pandas DataFrame with two columns: ‘Pixel number’ denotes the number of the pixel where the maximum is detected (depends on the
nside
ofmapp
); ‘Intensity’ denotes the value of this maxima in the input map- Return type
pd.DataFrame