def pca_to_mapping(pca,**extra_props):
    """
    A helper to return a mapping of a PCA result set suitable for
    reconstructing a planar error surface in other software packages

    kwargs: method (defaults to sampling axes)
    """
    from .axes import sampling_axes
    method = extra_props.pop('method',sampling_axes)
    return dict(
        axes=pca.axes.tolist(),
        covariance=method(pca).tolist(),
        **extra_props)
A helper to return a mapping of a PCA result set suitable for
    reconstructing a planar error surface in other software packages

    kwargs: method (defaults to sampling axes)