MockSky

class erwans3.Skymodel.MockSky(nsource: int, nside: Optional[int] = None)

Bases: SourceModel

A class representing a mock sky model.

This class generates a mock sky with a specified number of sources and optional resolution parameters. It inherits from SourceModel and provides methods to pre-compute values for the mock sky.

Parameters:
  • nsource (int) – Number of sources to include in the mock sky.

  • nside (int or None, optional) – HEALPix NSIDE parameter for the mock sky. If provided, the mock sky will be created with a HEALPix map; otherwise, a random distribution of sources on the sky will be used.

See also

SourceModel

Base class for sky model representation.

Examples

Create a mock sky with 100 sources distributed randomly on the sky:

>>> mock_sky = MockSky(nsource=100)
>>> freq = 150 * u.MHz
>>> resolution = 0.1 * u.deg
>>> mock_sky.pre_comp(freqs=freq, res_max=resolution)
>>> skymap = mock_sky.make_simu(freq, time=Time.now())

Methods Summary

make_source_simu(freq, time[, observer])

Generate a simulation Skymap for the mock sky.

pre_comp([freqs, times, res_max])

Pre-compute values for the mock sky.

Methods Documentation

make_source_simu(freq, time, observer=None)

Generate a simulation Skymap for the mock sky.

Parameters:
Returns:

A Skymap object representing the simulation of the mock sky.

Return type:

Skymap

pre_comp(freqs: Optional[Quantity] = None, times: Optional[Time] = None, res_max: Optional[Quantity] = None)

Pre-compute values for the mock sky.

Parameters:
  • freqs (Quantity [Hz] or None, optional) – Frequencies for pre-computation.

  • times (Time or None, optional) – Times for pre-computation.

  • res_max (Quantity [rad] or None, optional) – Maximum resolution for pre-computation.