nenupy.astro.skymodel.HpxGSM

class nenupy.astro.skymodel.HpxGSM(resolution=<Quantity 1. deg>, time=<Time object: scale='utc' format='datetime' value=2026-07-06 12:39:53.330196>, frequency=<Quantity 50. MHz>, observer=<EarthLocation (4323936.68522791, 165534.49991696, 4670345.36540385) m>)[source]

Bases: HpxSky

__init__(resolution=<Quantity 1. deg>, time=<Time object: scale='utc' format='datetime' value=2026-07-06 12:39:53.330196>, frequency=<Quantity 50. MHz>, observer=<EarthLocation (4323936.68522791, 165534.49991696, 4670345.36540385) m>)[source]

Methods

__init__([resolution, time, frequency, observer])

add_point_source(source, value[, angular_size])

Add point source on top of the GSM model.

add_point_source_snr(source, snr[, angular_size])

Add point source on top of the GSM model.

compute_lmn(phase_center[, coordinate_mask])

(l, m, n) image domain coordinates computed from HEALPix equatorial coordinates (in Right-Ascension \(\alpha\) and Declination \(\delta\), see coordinates) with respect to the phase_center (of equatorial coordinates \(\alpha_0\), \(\delta_0\)).

hour_angle([fast_compute])

local_sidereal_time([fast_compute])

shaped_like(other)

_summary_

Attributes

custom_ho_coordinates

Allows to modify horizontal coordinates without messing up with the actual coordinates object.

frequency

ground_projection

horizontal_coordinates

polarization

shape

time

value

visible_mask

coordinates

observer

add_point_source(source, value, angular_size=None)[source]

Add point source on top of the GSM model.

Parameters:
  • source (Target) – Source target, can either be a FixedTarget or a SolarSystemTarget.

  • value (float | ndarray) – Value to add to the GSM at the position of the source.

  • angular_size (Quantity, optional) – Angular size of the point source (a gaussian model is applied with a FWHM equivalent to angular_size), by default None

Example

>>> from nenupy.astro.skymodel import HpxGSM
>>> from nenupy.astro.target import FixedTarget
>>> from astropy.time import Time

>>> times = Time(["2026-05-01 00:00:00", "2026-05-01 12:00:00"])
>>> gsm = HpxGSM(time=times)
>>> gsm.add_point_source(
        source=FixedTarget.from_name("PSR B1919+21"),
        value=1e5,
        angular_size=None
    )
add_point_source_snr(source, snr, angular_size=None)[source]

Add point source on top of the GSM model.

Parameters:
  • source (Target) – Source target, can either be a FixedTarget or a SolarSystemTarget.

  • snr (float) – Signal to Noise Ratio of the value (see add_point_source()) added on top of the GSM map. The value is computed as the sum between the GSM median and the product of snr and the standard deviation of the GSM map.

  • angular_size (Quantity, optional) – Angular size of the point source (a gaussian model is applied with a FWHM equivalent to angular_size), by default None

Example

>>> from nenupy.astro.skymodel import HpxGSM
>>> from nenupy.astro.target import SolarSystemTarget
>>> import astropy.units as u
>>> from astropy.time import Time

>>> times = Time(["2026-05-01 00:00:00", "2026-05-01 12:00:00"])
>>> gsm = HpxGSM(time=times)
>>> gsm.add_point_source_snr(
        source=SolarSystemTarget.from_name("Sun", times),
        snr=20,
        angular_size=30 * u.arcmin
    )
compute_lmn(phase_center, coordinate_mask=None)

(l, m, n) image domain coordinates computed from HEALPix equatorial coordinates (in Right-Ascension \(\alpha\) and Declination \(\delta\), see coordinates) with respect to the phase_center (of equatorial coordinates \(\alpha_0\), \(\delta_0\)).

\[\begin{split}\cases{ l = \cos(\delta) \sin( \Delta \alpha)\\ m = \sin(\delta) \cos(\delta_0) - \cos(\delta) \sin(\delta_0) \cos(\Delta \alpha)\\ n = \sqrt{ 1 - l^2 - m^2 } }\end{split}\]

where \(\Delta \alpha = \alpha - \alpha_0\).

Parameters:
  • phase_center (SkyCoord) – Image phase center.

  • coordinate_mask (ndarray) – Mask applied to coordinates before computing (l,m,n) values.

Returns:

(l, m, n)

Return type:

tuple of 3 ndarray

property custom_ho_coordinates

Allows to modify horizontal coordinates without messing up with the actual coordinates object.

classmethod shaped_like(other)[source]

_summary_

Parameters:

other (_type_) – _description_

Returns:

_description_

Return type:

_type_

Raises:

TypeError – _description_