How to measure a earthquake