PointSourceCatalog

class pysm3.PointSourceCatalog(catalog_filename, nside=None, target_wcs=None, catalog_slice=None, max_nside=None, map_dist=None)[source] [edit on github]

Bases: Model

Model for a Catalog of point sources defined with their coordinates and a model of their emission based on a logpolynomial of frequency. The beam convolution is performed in map domain with pixell.

The catalog should be in HDF5 format, with the fields: theta: colatitude in radians phi: longitude in radians logpolycoefflux and logpolycoefpolflux: polynomial coefficients in natural logaritm (np.log) of the frequency, typically 4th order, but accepts any order. (source_index, pol_order). Unit needs to be Jy each field should have an attribute units which is checked when loading a model. No conversion is performed. See the documentation and the unit tests for examples on how to create a catalog file with xarray.

Parameters:
catalog_filename: str or Path

Path to the catalog HDF5 file

Parameters:
mpi_comm: object

MPI communicator object (optional, default=None).

nside: int

Resolution parameter at which this model is to be calculated.

available_nside: list[int]

Which Nsides the template maps are available at

max_nside: int

Keeps track of the the maximum Nside this model is available at by default 512 like PySM 2 models

smoothing_lmaxint

\(\ell_{max}\) for the smoothing step, by default \(2*N_{side}\)

Attributes Summary

includes_smoothing

Methods Summary

get_emission(freqs[, fwhm, weights, ...])

Generate a HEALPix or CAR map of the catalog emission integrated on the bandpass and convolved with the beam

get_fluxes(freqs[, coeff, weights])

Get catalog fluxes in Jy integrated over a bandpass

Attributes Documentation

includes_smoothing = True

Methods Documentation

get_emission(freqs: Annotated[Quantity, Unit('GHz')], fwhm: Annotated[Quantity, Unit('arcmin')] | None = None, weights=None, output_units=Unit('uK_RJ'), car_map_resolution: Annotated[Quantity, Unit('arcmin')] | None = None, lmax=None, output_nside=None, coord=None, return_car=False, output_car_resol=None, return_healpix=True)[source] [edit on github]

Generate a HEALPix or CAR map of the catalog emission integrated on the bandpass and convolved with the beam

Parameters:
freqs: np.array

Array of frequencies in GHz

fwhm: float or None

Full Width Half Maximum of the beam in arcminutes, if None, each source is assigned to a single pixel

weights: np.array

Array of relative bandpass weights already normalized Same length of freqs, if None, uniform weights are assumed

output_units: astropy.units

Output units of the map

car_map_resolution: float

Resolution of the CAR map used by pixell to generate the map, if None, it is set to half of the resolution of the HEALPix map given by self.nside, unless Nside is above >= 8192, then it is the same resolution of the HEALPix map

output_nsideint

Output HEALPix nside, if None, the nside used when creating the component (self.nside)

lmax: int

Not used, all operations are performed in pixel domain

coord: str

Coordinate rotation to apply, for example (“G”, “C”) to rotate from Galactic to Equatorial coordinates. If None, no rotation is applied

return_car: bool

If True return a CAR map

output_car_resol: arcmin

Not implemented yet

return_healpix: bool

If True return a HEALPix map

Returns
——ue-
output_map: np.array

Output HEALPix or CAR map or tuple with HEALPix and CAR maps

get_fluxes(freqs: Unit('GHz'), coeff='logpolycoefflux', weights=None)[source] [edit on github]

Get catalog fluxes in Jy integrated over a bandpass