# 5.8.1.4. eqcorrscan.utils.mag_calc.calc_max_curv

`eqcorrscan.utils.mag_calc.``calc_max_curv`(magnitudes, plotvar=False)

  Calculate the magnitude of completeness using the maximum curvature method.

  Parameters: | magnitudes (list) List of magnitudes from which to compute the maximum curvature which will give an estimate of the magnitude of completeness given the assumption of a power-law scaling. plotvar (bool) Turn plotting on and off
  Return type: | float
  Returns: | Magnitude at maximum curvature

  Note

  Should be used as a guide, often under-estimates Mc.

  Example

      >>> import numpy as np
      >>> mags = []
      >>> for mag in np.arange(2.5,3, 0.1):
      ...     mags.extend([mag] * int(20000 - 10 * mag))
      >>> for mag in np.arange(3,7, 0.1):
      ...     mags.extend([mag] * int(10 ** (7 - 1 * mag)))
      >>> calc_max_curv(mags, plotvar=False)
      3.0