updated generic_ews, sensitivity_ews, surrogates_ews with loess fitting function for detrending