Magnitude and detection of earthquakes