docs: def generate_synthetic_magnitudes(aval, bval, mmin, mmax, nyears):
      '''
      Generates a synthetic catalogue for a specified number of years, with
      magnitudes distributed according to a truncated Gutenberg-Richter
      distribution
  
      :param float aval:
          a-value
      :param float bval:
          b-value
      :param float mmin:
          Minimum Magnitude
      :param float mmax:
          Maximum Magnitude
      :param int nyears:
          Number of years
      :returns:
          Synthetic catalogue (dict) with year and magnitude attributes
      '''
      nsamples = int(np.round(nyears * (10. ** (aval - bval * mmin)), 0))
      year = np.random.randint(0, nyears, nsamples)
      # Get magnitudes
      mags = generate_trunc_gr_magnitudes(bval, mmin, mmax, nsamples)
      return {'magnitude': mags, 'year': np.sort(year)}