# 4.8. mag_calc¶

Functions to calculate local magnitudes automatically, and to calcualte relative moments for near-repeating earthquakes using singular-value decomposition techniques.

 amp_pick_event Pick amplitudes for local magnitude for a single event. amp_pick_sfile Function to pick amplitudes for local magnitudes from NORDIC s-files. calc_b_value Calculate the b-value for a range of completeness magnitudes. calc_max_curv Calculate the magnitude of completeness using the maximum curvature method. dist_calc Function to calculate the distance in km between two points. pick_db Wrapper to loop through a SEISAN database and make a lot of magnitude picks. svd_moments Calculate relative moments/amplitudes using singular-value decomposition.
 _sim_WA Remove the instrument response from a trace and simulate a Wood-Anderson. _pairwise Wrapper on itertools for SVD_magnitude. _max_p2t Finds the maximum peak-to-trough amplitude and period. _find_resp Helper function to find the response information. _GSE2_PAZ_read Read the instrument response information from a GSE Poles and Zeros file.