pyacs.gts.lib.model.detrend_pytrf module
- pyacs.gts.lib.model.detrend_pytrf.detrend_pytrf(self, noise=['wn', 'fn'], method='Nelder-Mead', fixed_correlated_noise_value=[None, None], log_dir=None)[source]
Detrend using PyTRF; estimate velocity and offsets with realistic sigmas.
Wrapper around pytrf (https://github.com/prebischung/pytrf, P. Rebischung). Simplified trajectory: constant velocity, offsets, annual/semi-annual, white + power-law noise. For more complex models use pytrf directly. Power-law noise can be fixed (useful for campaign data).
- Parameters:
noise (list, optional) – Noise model: ‘wn’ (mandatory) plus ‘fn’, ‘rw’, or ‘pl’. Default is [‘wn’,’fn’].
method (str, optional) – Optimization: ‘Nelder-Mead’, ‘BFGS’, ‘CG’, ‘Newton’, ‘Powell’. Default is ‘Nelder-Mead’.
fixed_correlated_noise_value (list, optional) – [s2, a] for power-law; None to estimate. Default is [None, None].
log_dir (str, optional) – Directory for pytrf yaml log; None = current dir. Default is None.
- Returns:
Residual time series with velocity (and sigmas), offsets.
- Return type:
Notes
‘Nelder-Mead’ is default and often more robust than ‘BFGS’ despite being slower.