how can you measure the intensity and energy released by an earthquake?