nenupy.astro.sky
Sky
- class nenupy.astro.sky.HpxSky(resolution=<Quantity 1. deg>, time=<Time object: scale='utc' format='datetime' value=2024-05-03 08:29:42.519747>, frequency=<Quantity 50. MHz>, polarization=array([0]), value=0.0, observer=<EarthLocation (4323936.68522791, 165534.49991696, 4670345.36540385) m>)[source]
Bases:
Sky
- class nenupy.astro.sky.HpxSkySlice(coordinates, frequency, time, polarization, value, observer=<EarthLocation (4323936.68522791, 165534.49991696, 4670345.36540385) m>)[source]
Bases:
SkySliceBase
- class nenupy.astro.sky.Sky(coordinates, time=<Time object: scale='utc' format='datetime' value=2024-05-03 08:29:42.519344>, frequency=<Quantity 50. MHz>, polarization=array([0]), value=0.0, observer=<EarthLocation (4323936.68522791, 165534.49991696, 4670345.36540385) m>)[source]
Bases:
AstroObject
- compute_lmn(phase_center, coordinate_mask=None)[source]
(l, m, n) image domain coordinates computed from HEALPix equatorial coordinates (in Right-Ascension \(\alpha\) and Declination \(\delta\), see
coordinates
) with respect to thephase_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\).
- property frequency
- property polarization
- property shape
- property time
- property value
- property visible_mask
- class nenupy.astro.sky.SkySlice(coordinates, frequency, time, polarization, value, observer=<EarthLocation (4323936.68522791, 165534.49991696, 4670345.36540385) m>)[source]
Bases:
SkySliceBase
- class nenupy.astro.sky.SkySliceBase(coordinates, frequency, time, polarization, value, observer=<EarthLocation (4323936.68522791, 165534.49991696, 4670345.36540385) m>)[source]
Bases:
AstroObject
- plot(**kwargs)[source]
Display the selected content of the
value
attribute belonging to aSky
instance as a celestial map in equatorial coordinates.This method is available on a
SkySlice
instance, resulting from a selection upon aSky
instance (using the indexing operator).Several parameters, listed below, can be tuned to adapt the plot to the user requirements:
Data display keywords
- Parameters:
center (
SkyCoord
) – Coordinates of the celestial map to be displayed at the center of the image. Default is(RA=0deg, Dec=0deg)
.radius (
Quantity
) – Angular radius from the center of the image above which the plot should be cropped. Default isNone
(i.e., full sky image).resolution (
Quantity
) – Set the pixel resolution. The upper threshold is 0.775 deg, any value above that does not affect the figure appearence. Default isastropy.units.Quantity(1, unit="deg")
.only_visible (
bool
) – If set toTrue
only the sky above the horizon is displayed. Setting this parameter toFalse
does not really make sense forSky
instances representing antenna response for instance. Default isTrue
.decibel (
bool
) – If set toTrue
, the data values are displayed at the decibel scale, i.e., \(10 \log( \rm{data} )\). Default isFalse
.interpolation (
str
) – Matplotlib imshow interpolation method. Default is'quadric'
.
Overplot keywords
- Parameters:
scatter (
tuple
) – Add a scatter plot (as defined inmatplotlib.pyplot.scatter
). Expected syntax is(<SkyCoord>, <marker_size>, <color>)
. Default isNone
(i.e., no scatter overplot).text (
tuple
) – Add a text overlay (as defined inmatplotlib.pyplot.text
). Expected syntax is(<SkyCoord>, <[text]>, <color>)
. Default isNone
(i.e., no text overplot).contour (
tuple
) – Add a contour plot (as defined inmatplotlib.pyplot.contour
). Expected syntax is(<numpy.ndarray>, <[levels]>, <colormap>)
. Default isNone
(i.e., no contour overplot).
Plotting layout keywords
- Parameters:
altaz_overlay (
bool
) – If set toTrue
, the horizontal coordinates grid is overplotted in addition to the equatorial one. Default isFalse
.cmap (
str
) – Color map applied while representing the data (see Matplotlib colormaps). Default is"YlGnBu_r"
.show_colorbar (
bool
) – Show or not the color bar. Default isTrue
.colorbar_label (
str
) – Set the label of the color bar. Default is""
.figname (
str
) – Name of the file (absolute or relative path) to save the figure. If set to"return"
, the method returns thetuple
(fig, ax)
(as defined by matplotlib). Default isNone
(i.e., only show the figure).figsize (
tuple
) – Set the figure size. Default is(15, 10)
.ticks_color (
str
) – Set the color of the equatorial grid and the Right Ascension ticks. Default is"0.9"
(grey).title (
str
) – Set the figure title. Default is"<time>, <frequency>"
.
- property visible_sky