11.4.24. astroML.datasets.generate_mu_z

astroML.datasets.generate_mu_z(size=1000, z0=0.3, dmu_0=0.1, dmu_1=0.02, random_state=None, cosmo=None)[source]

Generate a dataset of distance modulus vs redshift.

sizeint or tuple

size of generated data


parameter in redshift distribution: p(z) ~ (z / z0)^2 exp[-1.5 (z / z0)]

dmu_0, dmu_1float

specify the error in mu, dmu = dmu_0 + dmu_1 * mu

random_stateNone, int, or np.random.RandomState instance

random seed or random number generator

cosmoastropy.cosmology instance specifying cosmology

to use when generating the sample. If not provided, a Flat Lambda CDM model with H0=71, Om0=0.27, Tcmb=0 is used.

z, mu, dmundarrays

arrays of shape size