Estimate functions

This plateflex module contains the following functions:

  • bayes_estimate_cell(): Set up pymc model and estimate the parameters of the elastic plate model using a probabilistic Bayesian inference method.

  • get_bayes_estimates(): Explore the output of sampling the pymc model

  • L2_estimate_cell(): Set up non-linear curve fitting to estimate the parameters of the elastic plate model using non-linear least-squares from the function scipy.optimize.curve_fit().

  • get_L2_estimates(): Explore the output the non-linear inversion

  • real_xspec_functions(): Calculate the analytical admittance and coherence functions.

Internal functions are also available to define predicted admittance and coherence data with theano decorators to be incorporated as pymc variables. These functions are used within Project methods as with plotting functions.

Note

If you plan to estimate model parameters over entire grids, the non-linear least-squares method is orders of magnitude faster than the probabilistic method and should be preferred. The probabilistic method, on the other hand, gives useful estimation statistics from sampling the posterior distribution and can provide better insight on the trade-off between parameters. Estimates from the two methods are otherwise asymptotically identical (i.e., given infinite sampling of the posterior)

plateflex.estimate.bayes_estimate_cell(k, adm, eadm, coh, ecoh, alph=False, atype='joint')

Function to estimate the parameters of the flexural model at a single cell location of the input grids.

Parameters
  • k (ndarray) – 1D array of wavenumbers

  • adm (ndarray) – 1D array of wavelet admittance

  • eadm (ndarray) – 1D array of error on wavelet admittance

  • coh (ndarray) – 1D array of wavelet coherence

  • ecoh (ndarray) – 1D array of error on wavelet coherence

  • alph (bool, optional) – Whether or not to estimate parameter alpha

  • atype (str, optional) – Whether to use the admittance (‘admit’), coherence (‘coh’) or both (‘joint’)

Returns

(tuple): Tuple containing:
  • traceMultiTrace

    Posterior samples from the MCMC chains

  • summaryDataFrame

    Summary statistics from Posterior distributions

  • map_estimatedict

    Container for Maximum a Posteriori (MAP) estimates

plateflex.estimate.get_bayes_estimates(summary, map_estimate)

Returns digestible estimates from the Posterior distributions.

Parameters
  • summary (DataFrame) – Summary statistics from Posterior distributions

  • map_estimate (dict) – Container for Maximum a Posteriori (MAP) estimates

Returns

(tuple): tuple containing:
  • mean_te (float) : Mean value of elastic thickness Te from posterior (km)

  • std_te (float) : Standard deviation of elastic thickness Te from posterior (km)

  • C2_5_te (float) : Lower limit of 95% confidence interval on Te (km)

  • C97_5_te (float) : Upper limit of 95% confidence interval on Te (km)

  • MAP_te (float) : Maximum a Posteriori Te (km)

  • mean_F (float) : Mean value of load ratio F from posterior

  • std_F (float) : Standard deviation of load ratio F from posterior

  • C2_5_F (float) : Lower limit of 95% confidence interval on F

  • C97_5_F (float) : Upper limit of 95% confidence interval on F

  • MAP_F (float) : Maximum a Posteriori load ratio F

  • mean_a (float, optional) : Mean value of initial phase difference alpha from posterior

  • std_a (float, optional) : Standard deviation of initial phase difference alpha` from posterior

  • C2_5_a (float, optional) : Lower limit of 95% confidence interval on alpha

  • C97_5_a (float, optional) : Upper limit of 95% confidence interval on alpha

  • MAP_a (float, optional) : Maximum a Posteriori initial phase difference alpha

plateflex.estimate.L2_estimate_cell(k, adm, eadm, coh, ecoh, alph=False, atype='joint')

Function to estimate the parameters of the flexural model at a single cell location of the input grids.

Parameters
  • k (ndarray) – 1D array of wavenumbers

  • adm (ndarray) – 1D array of wavelet admittance

  • eadm (ndarray) – 1D array of error on wavelet admittance

  • coh (ndarray) – 1D array of wavelet coherence

  • ecoh (ndarray) – 1D array of error on wavelet coherence

  • alph (bool, optional) – Whether or not to estimate parameter alpha

  • atype (str, optional) – Whether to use the admittance (‘admit’), coherence (‘coh’) or both (‘joint’)

Returns

(tuple): Tuple containing:
  • summaryDataFrame

    Summary statistics from L2 estimation

plateflex.estimate.get_L2_estimates(summary)

Returns digestible estimates from the L2 estimates.

Parameters

summary (DataFrame) – Summary statistics from Posterior distributions

Returns

(tuple): tuple containing:
  • mean_te (float) : Mean value of elastic thickness from posterior (km)

  • std_te (float) : Standard deviation of elastic thickness from posterior (km)

  • mean_F (float) : Mean value of load ratio from posterior

  • std_F (float) : Standard deviation of load ratio from posterior

  • mean_a (float, optional) : Mean value of phase difference between initial loads from posterior

  • std_a (float, optional) : Standard deviation of phase difference between initial loads from posterior

  • rchi2 (float) : Reduced chi-squared value

plateflex.estimate.real_xspec_functions(k, Te, F, alpha=1.5707963267948966)

Calculate analytical expressions for the real component of admittance and coherence functions.

Parameters
  • k (np.ndarray) – Wavenumbers (rad/m)

  • Te (float) – Effective elastic thickness (km)

  • F (float) – Subsurface-to-surface load ratio [0, 1[

  • alpha (float, optional) – Phase difference between initial applied loads (rad)

Returns

(tuple): tuple containing:
  • admittance (ndarray): Real admittance function (shape: len(k))

  • coherence (ndarray): Coherence functions (shape: len(k))