Synthetic magnitude generation#

How to generate magnitudes with an exponential distribution, and how to bin.