get_positions

cosmic.sample.cmc.king.get_positions(N, r, M_enclosed)[source]

This one’s easy: the mass enclosed function is just the CDF of the mass density, so just invert that, and you’ve got positions.

Note that here we’ve already normalized M_enclosed to 1 at r_tidal