pyacs.gts.lib.model package

Submodules

pyacs.gts.lib.model.add_vel_sigma module

pyacs.gts.lib.model.add_vel_sigma.add_vel_sigma(self, in_place=False, b_fn=4, verbose=True)[source]

calculates realistic sigma on velocity components assuming white & flicker using eq (19) & (23) from Williams (J. of Geodesy, 2003) b_fn is the value for flicker noise, taken as 4 mm/yr^1/4 model can be detrend, detrend_annual, detrend_seasonal if in_place = True then replace the current time series

pyacs.gts.lib.model.detrend module

pyacs.gts.lib.model.detrend.detrend(self, method='L2', in_place=False, periods=[], exclude_periods=[])[source]

detrends a time series and save velocity estimates in velocity attribute

:param periods : periods used to estimate the velocity :param exclude_periods : periods to be excluded for the velocity estimate :param in_place : if True then replace the current time series :return : the detrended time series :note : outliers from Gts.outliers are omitted in the estimation and offsets given Gts.offsets_dates are estimated simultaneously

pyacs.gts.lib.model.detrend_annual module

pyacs.gts.lib.model.detrend_annual.detrend_annual(self, method='L2', in_place=False, periods=None, exclude_periods=None)[source]

estimates a trend + annual terms in a time series and removes them velocity and annual attribute are saved in Gts.velocity & Gts.annual

:param periods : periods used for estimation :param exclude_periods : periods to be excluded from estimation :param in_place : if True then replace the current time series :return : the detrended time series :note : outliers from Gts.outliers are ommitted in the estimation and offsets given Gts.offsets_dates are estimated simultaneously

pyacs.gts.lib.model.detrend_median module

pyacs.gts.lib.model.detrend_median.detrend_median(self, delta_day=None, in_place=False, periods=[], exclude_periods=[], verbose=False, auto=False)[source]

Calculates a velocity using the median of pair of displacements exactly separated by one year, inspired from MIDAS If the time series has less than a year of data, then the time series is kept untouched. :param delta_day: if None, it is one year, if 0 then it is the relax mode for campaign data,

any integer is the time delta (in days) used to compute velocity.

Parameters
  • in_place – boolean, if True, in_place, if False, returns a new Gts instance (default)

  • periods – periods (list of lists) to be included for trend calculation

  • exclude_periods – periods (list of lists) to be excluded for trend calculation

  • verbose – verbose mode

  • auto – if True, then start will delta_day=None, if it fails or found less than 100 pairs then use delta_day=0, if fails then use regular detrend

Note

returns None if time series is shorter than 1 year

pyacs.gts.lib.model.detrend_seasonal module

pyacs.gts.lib.model.detrend_seasonal.detrend_seasonal(self, method='L2', in_place=False, periods=None, exclude_periods=None)[source]

estimates a trend + annual + semi-annual terms in a time series and removes them velocity, annual and semi-annual attributes are saved in Gts.velocity, Gts.annual, Gts.semi_annual

:param periods : periods used for estimation :param exclude_periods : periods to be excluded from estimation :param in_place : if True then replace the current time series :return : the detrended time series :note : outliers from Gts.outliers are ommitted in the estimation and offsets given Gts.offsets_dates are estimated simultaneously

pyacs.gts.lib.model.detrend_seasonal_median module

pyacs.gts.lib.model.detrend_seasonal_median.detrend_seasonal_median(self, wl=11, in_place=False, verbose=False)[source]

Calculates a velocity using the median of pair of displacements exactly separated by one year, inspired from MIDAS and then removes repeating yearly signal If the time series has less than three years of data, then the time series is kept untouched.

pyacs.gts.lib.model.frame module

pyacs.gts.lib.model.frame.frame(self, frame=None, in_place=False, verbose=False)[source]

Rotates a time series according to an Euler pole Returns a new Gts instance

pyacs.gts.lib.model.make_model module

pyacs.gts.lib.model.make_model.make_model(self, option='detrend', method='L2', loutlier=None, in_place=False)[source]

Estimate linear model parameters using least squares input: data: Gts format option are: ‘detrend’/’detrend_annual’/’detrend_seasonal’ output: new Gts object: time series is now the residuals wrt to the model and its associated values (vel, annual, semi-annual etc)

pyacs.gts.lib.model.mmodel module

pyacs.gts.lib.model.mmodel.mmodel(self)[source]

Generates a modeled time series from the parameters read in self

pyacs.gts.lib.model.non_linear_gts_model module

pyacs.gts.lib.model.non_linear_gts_model.nl_gts_fit(ty, ym, sym, model_type, offset_dates=[], eq_dates=[], H_fix={}, H_constraints={}, H_bounds={}, verbose=False)[source]

Fits a single 1D time series with a (non-linear) trajectory model. See documentation of gts.fit_trajectory for explanation on the options.

pyacs.gts.lib.model.remove_pole module

pyacs.gts.lib.model.remove_pole.remove_pole(self, pole, pole_type='euler', in_place=False, verbose=True)[source]

remove velocity predicted by an Euler pole or a rotation rate vector from a time series pole is a 1D array with 3 values requires self.lon & self.lat attributes to have been filled before if in_place = True then replace the current time series

pyacs.gts.lib.model.trajectory module

Non linear trajectory models for Geodetic Time Series

pyacs.gts.lib.model.trajectory.trajectory(self, model_type, offset_dates=[], eq_dates=[], H_fix={}, H_constraints={}, H_bounds={}, component='NEU', verbose=False)[source]

Calculates the parameters of a (non-linear) trajectory model for a Geodetic Time Series. The trajectory model is:

y(t) =

trend : trend_cst + trend * ( t - t0 ) +

annual: a_annual * cos( 2*pi + phi_annual ) +

semi-annual: a_semi_annual * cos( 2*pi + phi_semi_annual ) +

offset : Heaviside( t - t_offset_i ) * offset_i +

post-seismic_deformation as decaying log (psd_log): psd_eq_i * np.log( 1 + Heaviside( t - eq_i )/tau_i )

Parameters

model_type – string made of the key-word the parameters to be estimated.

Key-word parameters are

‘trend’,’annual’,’semi-annual’,’seasonal’,’offset’,’psd_log’.

‘trend-seasonal-offset-psd_log’ will do the full trajectory model.

Parameters
  • offset_dates – a list of offset_dates in decimal year

  • eq_dates – a list of earthquake dates for which post-seismic deformation (psd_log) will be estimated

  • H_fix – a dictionary including the name of the parameter to be hold fixed and the value.

For instance to impose the co-seismic offset (North-East-Up) and relaxation time of 100 days for the first earthquake use:

H_fix = { ‘psd_log_offset_00’:[10., 15., 0.] , ‘psd_log_tau_00’:[100., 100., 100.]}

Parameters

H_constraints – a dictionary including the name of the parameter to be constrained.

For instance to impose a 50 days constraints around 500 days on the relaxation time of the second earthquake for all NEU components use: H_fix = { ‘psd_log_tau_01’:[[500.,50], [500.,50] , [500.,50]]}

Parameters

H_bounds – a dictionary including the bounds.

For instance to impose a relaxation time for the third earthquake to be in the range of 2 to 3 years, for all NEU components use: H_bounds = { ‘psd_log_tau_02’:[[2*365.,3*365.], [[2*365.,3*365.] , [[2*365.,3*365.]]}

Parameters
  • component – string , component for which the trajectory model will be estimated.

  • verbose – verbose mode

Note

Unlike most pyacs.gts functions, trajectory returns 4 elements: the results as a dictionary, the model Gts,

the residual Gts and a Gts with model predictions at every day.

Module contents