Refactored compute_ses_and_gmfs