SkyModel
- class erwans3.Astro_tools.SkyModel(skymodel=None)
Bases:
objectContainer for managing a list of SourceModel objects representing a sky model.
- Usage
- -----
Attributes Summary
Methods Summary
add_source(sourcemodel)Add a SourceModel object to the sky model.
Clear all sources from the sky model.
make_simu(freq, time[, observer])Generates simulation Skymaps of the SkyModel at a given time and frequency.
plot_simu(freq, time, nside[, intensive])Plot simulations of the SkyModel.
pre_comp([freqs, times, res_max])Pre-computes values for all sources in the SkyModel.
remove_source(source_name)Remove a source from the sky model.
Sorts the sources in the SkyModel based on their priority attribute.
Attributes Documentation
- nsource
Methods Documentation
- add_source(sourcemodel: SourceModel) None
Add a SourceModel object to the sky model.
- Parameters:
sourcemodel (
SourceModel) – The SourceModel object to add.
- make_simu(freq: Quantity, time: Time, observer: Optional[Union[BaseCoordinateFrame, SkyCoord]] = None) tuple['Skymap', 'Skymap']
Generates simulation Skymaps of the SkyModel at a given time and frequency.
Returns two skymaps. The first one has a
PixMapmap and the second one aSHCoeffmap- Parameters:
freq (
Quantity[Hz]) – Frequency for simulation.time (
Time) – Time for simulation.observer (
BaseCoordinateFrameorSkyCoord or :obj:`~None, optional) – Observer frame for simulation.
- Returns:
A tuple of Skymap objects for pixel and spherical harmonic simulations. The first one has a
PixMapmap and the second one aSHCoeffmap- Return type:
- plot_simu(freq: Quantity, time: Time, nside: int, intensive: bool = True, **kwargs)
Plot simulations of the SkyModel.
Runs
make_simu()to generate a skymap at a given time and frequency.
- pre_comp(freqs: Optional[Quantity] = None, times: Optional[Time] = None, res_max: Optional[Quantity] = None) None
Pre-computes values for all sources in the SkyModel.
- remove_source(source_name: str) None
Remove a source from the sky model.
- Parameters:
source_name (
str) – The name of the source to remove.
- sort_priority()
Sorts the sources in the SkyModel based on their priority attribute.