environmentaltools.graphics.covariance_comparison

environmentaltools.graphics.covariance_comparison(covDistanceS, covDistanceT, covEmpST, tLag, res, family, type)[source]

Plot empirical and theoretical spatiotemporal covariance comparison.

Visualizes the fit between empirical spatiotemporal covariance and the theoretical covariance model, displaying both as 3D surfaces or 2D contours.

Parameters:
  • covDistanceS (numpy.ndarray) – Spatial distance grid for covariance evaluation.

  • covDistanceT (numpy.ndarray) – Temporal distance grid for covariance evaluation.

  • covEmpST (numpy.ndarray) – Empirical spatiotemporal covariance values.

  • tLag (array-like) – Temporal lag values.

  • res (scipy.optimize.OptimizeResult) – Optimization result containing fitted covariance parameters in res.x.

  • family (str) – Covariance family name for theoretical model.

  • type (str) – Plot type - “3d” for 3D surface plot, other for 2D contour plot.

Returns:

Displays the plots.

Return type:

None

Note

For “3d” type, displays wireframe theoretical covariance with empirical surface overlay, plus contour plot of residuals. For 2D type, shows side-by-side contour comparisons of theoretical and empirical covariances.