linear_lognormal¶
-
skypy.galaxy.size.linear_lognormal(magnitude, a_mu, b_mu, sigma, size=None)[source] [edit on github]¶ Lognormal distribution with linear mean. This function provides a lognormal distribution for the physical size of galaxies with a linear mean, described by equation 3.14 in [1]. See also equation 14 in [2].
- Parameters
- magnitudefloat or array_like.
Galaxy absolute magnitude at which evaluate the lognormal distribution.
- a_mu, b_mufloat
Linear model parameters describing the mean size of galaxies, equation 3.14 in [1].
- sigma: float
Standard deviation of the lognormal distribution for the physical radius of galaxies.
- sizeint or tuple of ints, optional.
Output shape. If the given shape is, e.g., (m, n, k), then m * n * k samples are drawn. If size is None (default), a single value is returned if mean and sigma are both scalars. Otherwise, np.broadcast(mean, sigma).size samples are drawn.
- Returns
- physical_sizenumpy.ndarray or astropy.Quantity
Physical distance for a given galaxy with a given magnitude, in [kpc]. If size is None and magnitude is a scalar, a single sample is returned. If size is ns, different from None, and magnitude is scalar, shape is (ns,). If magnitude has shape (nm,) and size=None, shape is (nm,).
References
- ..[1] J. Herbel, T. Kacprzak, A. Amara, A. Refregier, C.Bruderer and
Nicola, JCAP 1708, 035 (2017).
- ..[2] S. Shen, H.J. Mo, S.D.M. White, M.R. Blanton, G. Kauffmann, W.Voges,
Brinkmann, I.Csabai, Mon. Not. Roy. Astron. Soc. 343, 978 (2003).
Examples
>>> import numpy as np >>> from skypy.galaxy import size >>> magnitude = -20.0 >>> a_mu, b_mu, sigma =-0.24, -4.63, 0.4 >>> s = size.linear_lognormal(magnitude, a_mu, b_mu, sigma)