Gts.detrend_pytrf

class pyacs.gts.Gts.Gts(code=None, lat=None, lon=None, h=None, X0=None, Y0=None, Z0=None, t0=None, data=None, data_xyz=None, data_corr_neu=None, data_corr_xyz=None, offsets_dates=[], offsets_values=None, outliers=[], annual=None, semi_annual=None, velocity=None, ifile=None, log=None, metadata=None)[source]
detrend_pytrf(noise=['wn', 'fn'], method='Nelder-Mead', fixed_correlated_noise_value=[None, None], log_dir=None)

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:

Gts

Notes

‘Nelder-Mead’ is default and often more robust than ‘BFGS’ despite being slower.