3. Setting up the functional model¶
- class kf.timefunction.TimeFct(time, model, origintime=0.0, verbose=False)[source]¶
Initialization of the class, which build parametrised function of time. This creates an object that can build functional representations and spit out names, etc.
time : vector of the time (decimal years )
originTime : origin of the time used here
model : contain string of function and associated parameters with syntax described in table below
model =
description
[('POLY' ,deg),
polynomial of degree
deg
('COS' ,freq),
cosine of frequency
freq
('SIN' ,freq),
sine of frequency
freq
('STEP' ,t1,t2,...),
earthquake at time
ti
('HTAN' ,t1,w1,t2,w2,...),
slowslip(s) centred on
ti
('EXP' ,t1,w1),
starting and characteristic time
('LOG' ,t1,w1),
starting and characteristic time
('BSPLINE',order,t1,w1,t2,w2,...),
peak(s) of deformation centred on
ti
('ISPLINE',order,t1,w1,t2,w2,...),
slowslip(s) centred on
ti
('LISEG' ,t1,t2,...)]
line segment(s) beween
ti
andt(i+1)
- check_model()[source]¶
Verify number of parameters are consistent and write down summary of model description
- comp_phase_shift(m, P=None)[source]¶
Compute oscillation amplitude and phase shift with its variances from amplitudes of cosine and sine terms with their variances.
m : state vector containing at least all the model parameters (length > self.L)
P : if error is known =P the state covariance (default None)
- create_A(k, M)[source]¶
Create A, the transition n × n matrix which converts m into mf Matrix used during prediction in the Kalman Filter
k : the timestep
M : the state vector length
- cut_model(N)[source]¶
Function that removes some of the component of the functional model based on the length of parameters (N). This allows to include informations when needed and not before.
- draw_model(coeff)[source]¶
- Gives f(t) as defined in model
coeff : contain multiplying coefficients of each function in the same order as in model (correspond to first elements of state vector m)
- expend_model(k, dt, verbose=True)[source]¶
Add events in reference model not in self.mod, if we are getting temporarily close to the occurence of the event
dt : anticipation time
WORKS ONLY IF CHRONOLOGICAL ORDER IN MODEL
- find_coeff_lsq(evolv, err)[source]¶
- Basic linear least-squares which finds of defined model
evolv : time series of phase change (shape of time)
err : standard deviation of shage (shape of time)
- get_label(L, unit, tunit='day', phase=False)[source]¶
Get an array of labels for each model parameters (name and units) which can be used for plotting
L : number of parameters
unit : string of length unit
tunit : string of time unit
phase : True if sine and cosine amplitudes converted into sine amplitude and phase shift
- identify_outdated(dtmax)[source]¶
Function optimizing model as a function of starting time of time series, localize modification that will be berformed later on every state vectors/cov
- dtmaxtime after event allowed to optimize localized function in time
(apply only on ‘STEP’,’EARTHQUAKE’,’HEAVISIDE’ and cst of ‘POLY’)
- remove_oldstuff(m, P)[source]¶
- Require the outputs of identify_outdated()
m, P : specify local state vector and covariance
Note
This trajectory model is used to make the forecast step of Kalman filtering. It helps fill holes in the interferometric network on a given pixel. If so, the error on the model knownledge will propagate on the estimated phase change uncertainty. It is NOT used to filter the time series of phase change.