HpxMap
- class erwans3.Astro_tools.HpxMap(value: Quantity, **kwargs)
Bases:
PixListRepresents a map of pixels in Healpix format.
Pixlist uses the ring ordering.
- Parameters:
Attributes Summary
Return the directional vectors (lmn) of the pixels coordinates.
Return the NSIDE (resolution parameter) of the Healpix map.
Return the pixel area of the Healpix map in steradians (sr).
Return the pixel resolution of the Healpix map in radians (rad).
Methods Summary
b2t(freq[, copy])Convert Brightness to Temperature for a given frequency.
plot([mode])Plot the Healpix map using mollview.
rotate(rot[, copy])Rotate the HpxMap value by a given rotation.
t2b(freq[, copy])Convert Temperature to Brightness per steradian for a given frequency
to_extensive([copy])Convert the HpxMap to an extensive quantity.
to_hpxmap([nside])Convert the Healpix map to another Healpix map with a specified NSIDE.
to_hpxpart([threshold])Convert the Healpix map to an HpxPart based on a threshold value.
to_intensive([copy])Convert the HpxMap to an intensive quantity.
Convert the Healpix map to a PixMap.
to_shcoeff([lmax, mmax])Convert the Healpix map to spherical harmonics coefficients (
SHCoeff).ud_grade(nside_out[, copy])Upgrade or downgrade the resolution of the Healpix map to a new NSIDE.
Attributes Documentation
- dir
Return the directional vectors (lmn) of the pixels coordinates.
- Returns:
Array of directional vectors (lmn) with the shape (npix, 3).
- Return type:
- nside
Return the NSIDE (resolution parameter) of the Healpix map.
- Returns:
Resolution parameter (NSIDE).
- Return type:
- pixarea
Return the pixel area of the Healpix map in steradians (sr).
- Returns:
Pixel area in steradians.
- Return type:
Quantity[sr]
- res
Return the pixel resolution of the Healpix map in radians (rad).
- Returns:
Pixel resolution in radians.
- Return type:
Quantity[rad]
Methods Documentation
- b2t(freq: Quantity, copy: bool = True) HpxMap
Convert Brightness to Temperature for a given frequency.
If the brightness is in Jy, it is converted to Jy/sr before converting to temperature
- plot(mode: Optional[str] = None, **kwargs)
Plot the Healpix map using mollview.
- Parameters:
mode (
str, optional) – Plotting mode. If ‘log’, plot the logarithm of the map values (default is None).**kwargs – Additional keyword arguments passed to the underlying plotting function.
- rotate(rot: Union[Rotation, Rotator], copy: bool = True) HpxMap
Rotate the HpxMap value by a given rotation.
- t2b(freq: Quantity, copy: bool = True) HpxMap
Convert Temperature to Brightness per steradian for a given frequency
- to_extensive(copy: bool = True) HpxMap
Convert the HpxMap to an extensive quantity.
ie output unit = input unit * sr if the input unit is intensive
- to_hpxmap(nside: Optional[int] = None) HpxMap
Convert the Healpix map to another Healpix map with a specified NSIDE.
- to_hpxpart(threshold: Union[Quantity, float] = -inf) HpxPart
Convert the Healpix map to an HpxPart based on a threshold value.
If you prefere to specifie the index of the pixel to store into an HpxPart please use the method __getitem__
- to_intensive(copy: bool = True) HpxMap
Convert the HpxMap to an intensive quantity.
ie output unit = input unit /sr
- to_pixmap()
Convert the Healpix map to a PixMap.
- Returns:
A PixMap object representing the pixel values of the Healpix map.
- Return type:
- to_shcoeff(lmax: Optional[int] = None, mmax: Optional[int] = None) SHCoeff
Convert the Healpix map to spherical harmonics coefficients (
SHCoeff).- Parameters:
- Returns:
Spherical harmonics coefficients representing the Healpix map.
- Return type: