Reference / binference.simulate.mock_2d
binference.simulate.mock_2d¶
- binference.simulate.mock_2d(n_objects=5000, bins=None, *, density='banana', noise=(0.02, 0.06), selection=None, rng=None)[source]¶
A 2-D mock catalogue (e.g. a colour-magnitude-like ridge) with Gaussian errors.
- Parameters:
- n_objectsint, optional
Number of observed objects (after selection).
- binsBins, optional
Grid of the mock;
Nonegives a 20 x 20 grid on the unit square.- densitystr, callable or array_like (K,), optional
True population: a named density, a callable density or bin fractions, as for
mock_1d().- noisefloat or (lo, hi), optional
Measurement standard deviation per axis, fixed or drawn uniformly per object and axis.
- selectionarray_like (K,), optional
Per-bin detection probability depending on the true bin.
- rngint, Generator or None
Random number generator.