enyo.etc.source module¶
Module defining source surface-brightness distributions.
Copyright © 2020, Kyle B. Westfall
#.. _pypi https://pypi.org/project/sdss-mangadap/
-
class
enyo.etc.source.OnSkyConstant(surfbrightness, sampling=None, size=None)[source]¶ Bases:
enyo.etc.source.SourceAn on-sky constant surface brightness.
Parameters: - surfbrightness (scalar-like) – The constant surface brightness for the source in linear flux units per square arcsecond.
- sampling (scalar-like, optional) – Sampling of a generated map in arcseconds per pixel.
Default is set by
minimum_sampling(). - size (scalar-like, optional) – Size of the image to generate of the distribution in
arceconds along one of the axes. The map is square.
Default is defined by
minimum_size().
-
class
enyo.etc.source.OnSkyGaussian(fwhm, center=None, ellipticity=None, position_angle=None, sampling=None, size=None)[source]¶ Bases:
astropy.modeling.functional_models.Gaussian2D,enyo.etc.source.SourceAn on-sky Gaussian distribution.
Parameters: - fwhm (scalar-like) – The FWHM of the Gaussian in arcseconds.
- center (scalar-like, optional) – The coordinates of the Gaussian center in arcseconds.
- ellipticity (scalar-like, optional) – The ellipticity (1-b/a) of an elliptical Gaussian distribution.
- position_angle (scalar-like, optional) – The position angle for the elliptical Gaussian distribution, defined as the angle from N through E. The coordinate system is defined with positive offsets (in RA) toward the east, meaning lower pixel indices.
- sampling (scalar-like, optional) – Sampling of a generated map in arcseconds per pixel.
Default is set by
minimum_sampling(). - size (scalar-like, optional) – Size of the image to generate of the distribution in
arceconds along one of the axes. The map is square.
Default is defined by
minimum_size().
-
_abc_impl= <_abc_data object>¶
-
_fix_inputs(right)¶
-
_is_dynamic= False¶
-
_parameters_= {}¶
-
class
enyo.etc.source.OnSkySersic(sb_eff, r_eff, n, center=None, ellipticity=None, position_angle=None, sampling=None, size=None, unity_integral=False)[source]¶ Bases:
astropy.modeling.functional_models.Sersic2D,enyo.etc.source.SourceAn on-sky Sersic distribution.
Parameters: - sb_eff (scalar-like) – The surface brightness at 1 effective (half-light) radius.
- r_eff (scalar-like) – The effective (half-light) radius in arcseconds.
- n (scalar-like) – The Sersic index.
- center (scalar-like, optional) – The coordinates of the Sersic center in arcseconds relative to the image center.
- ellipticity (scalar-like, optional) – The ellipticity (1-b/a) of an elliptical Sersic distribution.
- position_angle (scalar-like, optional) – The position angle for the elliptical Sersic distribution, defined as the angle from N through E. The coordinate system is defined with positive offsets (in RA) toward the east, meaning lower pixel indices.
- sampling (scalar-like, optional) – Sampling of a generated map in arcseconds per pixel.
Default is set by
minimum_sampling(). - size (scalar-like, optional) – Size of the image to generate of the distribution in
arceconds along one of the axes. The map is square.
Default is defined by
minimum_size(). - unity_integral (
bool, optional) – Renormalize the distribution so that the integral is unity.
-
_abc_impl= <_abc_data object>¶
-
_fix_inputs(right)¶
-
_is_dynamic= False¶
-
_parameters_= {}¶
-
class
enyo.etc.source.OnSkySource(seeing, intrinsic, sampling=None, size=None)[source]¶ Bases:
enyo.etc.source.SourceContainer class for an on-sky source convolved with the seeing disk.
Unlike the other
Sourceobjects, this requires a map to work.Parameters: - seeing (
float,Source) – The FWHM of a Gaussian seeing distribution in arcseconds or an object used to define the seeing kernel directly. If a float is provided, the sampling of the Gaussian seeing kernel is set byOnSkyGaussian.minimum_sampling()unless adjusted by the intrinsic source object or thesamplingkeyword. If aSourceobject, the object is used to generate a map of the source surface brightness distribution. The integral of the seeing kernel should be unity! - intrinsic (
float,Source) – The intrinsic surface brightness distribution of the source. Can be the total flux of a point source (in, e.g., 10^-17 erg/s/cm^2/angstrom) or an object. If aSourceobject, the object is used to generate a map of the source surface-brightness distribution. - sampling (scalar-like, optional) – Sampling of a generated map in arcseconds per pixel.
Default is set by
minimum_sampling(). - size (scalar-like, optional) – Size of the image to generate of the distribution in
arceconds along one of the axes. The map is square.
Default is defined by
minimum_size().
-
make_map(sampling=None, size=None)[source]¶ Generate a square map of the source surface-brightness distribution.
Object is modified internally with the constructed map saved to
data.Parameters: - sampling (
float, optional) – The size of each pixel in the map in arcsec per pixel. If None, sampling will be set byminimum_sampling(). - size (
float, optional) – Length of one axis of the square map in arcsec. Will be adjusted to ensure an integer number of pixels in the map based onsampling. If None, set byminimum_size().
- sampling (
- seeing (
-
class
enyo.etc.source.Source[source]¶ Bases:
objectThis is an abstract class and should not be instantiated on it’s own!
-
x¶ 1D vector with x coordinates
Type: vector
-
X¶ 2D map of x coordinates
Type: array
-
y¶ 1D vector with y coordinates
Type: vector
-
Y¶ 2D map of y coordinates
Type: array
-
data¶ Map of the surface brightness distribution
Type: array
-
sampling¶ Sampling of the square map in arcsec/pixel.
Type: float
-
size¶ Size of the square map in arcsec.
Type: float
-
make_map(sampling=None, size=None)[source]¶ Generate a square map of the surface-brightness distribution.
Object is modified internally with the constructed map saved to
data.Parameters: - sampling (
float, optional) – The size of each pixel in the map, typically in arcsec per pixel. If None, sampling will be set byminimum_sampling(). - size (
float, optional) – Length of one axis of the square map, typically in arcsec. Will be adjusted to ensure an integer number of pixels in the map based onsampling. If None, set byminimum_size().
- sampling (
-
reset_map()[source]¶ Reset mapping attributes for a fresh determination of the sampling, size, and surface-brightness map.
This is mainly used for resetting the internals when using the default sampling and size to set the map. To reconstruct the map after calling this method, run
make_map(). This:self.reset_map() self.make_map()
is equivalent to this:
self.make_map(sampling=self.minimum_sampling(), size=self.minimum_size())
-
shape¶ The shape of the current map.
-