DataPoint

digraph inheritance476311a242 { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "ABC" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Helper class that provides a standard way to create an ABC using"]; "DataPoint" [URL="#geobipy.src.classes.data.datapoint.DataPoint.DataPoint",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Class defines a data point."]; "Point" -> "DataPoint" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Point" [URL="../../pointcloud/Point.html#geobipy.src.classes.pointcloud.Point.Point",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="3D Point Cloud with x,y,z co-ordinates"]; "myObject" -> "Point" [arrowsize=0.5,style="setlinewidth(0.5)"]; "myObject" [URL="../../core/myObject.html#geobipy.src.classes.core.myObject.myObject",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; "ABC" -> "myObject" [arrowsize=0.5,style="setlinewidth(0.5)"]; }
class geobipy.src.classes.data.datapoint.DataPoint.DataPoint(x=0.0, y=0.0, z=0.0, elevation=None, data=None, std=None, predictedData=None, units=None, channel_names=None, lineNumber=0.0, fiducial=0.0, **kwargs)

Class defines a data point.

Contains an easting, northing, height, elevation, observed and predicted data, and uncertainty estimates for the data.

DataPoint(x, y, z, elevation, nChannels, data, std, units)

Parameters:
  • nChannelsPerSystem (int or array_like) – Number of data channels in the data * If int, a single acquisition system is assumed. * If array_like, each entry is the number of channels for each system.

  • x (float) – Easting co-ordinate of the data point

  • y (float) – Northing co-ordinate of the data point

  • z (float) – Height above ground of the data point

  • elevation (float, optional) – Elevation from sea level of the data point

  • data (geobipy.StatArray or array_like, optional) – Data values to assign the data of length sum(nChannelsPerSystem). * If None, initialized with zeros.

  • std (geobipy.StatArray or array_like, optional) – Estimated uncertainty standard deviation of the data of length sum(nChannelsPerSystem). * If None, initialized with ones if data is None, else 0.1*data values.

  • predictedData (geobipy.StatArray or array_like, optional) – Predicted data values to assign the data of length sum(nChannelsPerSystem). * If None, initialized with zeros.

  • units (str, optional) – Units of the data. Default is “ppm”.

  • channel_names (list of str, optional) – Names of each channel of length sum(nChannelsPerSystem)

active

Gets the indices to the observed data values that are not NaN

Returns:

out – Indices into the observed data that are not NaN

Return type:

array of ints

property addressof

Print a summary of the EMdataPoint

createHdf(parent, myName, withPosterior=True, add_axis=None, fillvalue=None)

Create the hdf group metadata in file parent: HDF object to create a group inside myName: Name of the group

data_misfit()

Compute the \(L_{2}\) norm squared misfit between the observed and predicted data

\[\| \mathbf{W}_{d} (\mathbf{d}^{obs}-\mathbf{d}^{pre})\|_{2}^{2},\]

where \(\mathbf{W}_{d}\) are the reciprocal data errors.

Parameters:

squared (bool) – Return the squared misfit.

Returns:

out – The misfit value.

Return type:

float64

property deltaD

Get the difference between the predicted and observed data,

\[\delta \mathbf{d} = \mathbf{d}^{pre} - \mathbf{d}^{obs}.\]
Returns:

out – The residual between the active observed and predicted data with size equal to the number of active channels.

Return type:

StatArray

classmethod fromHdf(grp, index=None, **kwargs)

Reads the object from a HDF group

likelihood(log)

Compute the likelihood of the current predicted data given the observed data and assigned errors

Returns:

out – Likelihood of the data point

Return type:

float64

perturb()

Propose a new EM data point given the specified attached propsal distributions

Parameters:
  • newHeight (bool) – Propose a new observation height.

  • newRelativeError (bool) – Propose a new relative error.

  • newAdditiveError (bool) – Propose a new additive error.

  • newCalibration (bool) – Propose new calibration parameters.

Returns:

out – The proposed data point

Return type:

subclass of EmDataPoint

Notes

For each boolean, the associated proposal must have been set.

Raises:

TypeError – If a proposal has not been set on a requested parameter

property predictedData

The predicted data.

property probability

Evaluate the probability for the EM data point given the specified attached priors

Parameters:
  • rEerr (bool) – Include the relative error when evaluating the prior

  • aEerr (bool) – Include the additive error when evaluating the prior

  • height (bool) – Include the elevation when evaluating the prior

  • calibration (bool) – Include the calibration parameters when evaluating the prior

  • verbose (bool) – Return the components of the probability, i.e. the individually evaluated priors

Returns:

out – The evaluation of the probability using all assigned priors

Return type:

float64

Notes

For each boolean, the associated prior must have been set.

Raises:

TypeError – If a prior has not been set on a requested parameter

set_additive_error_posterior(log=10)
set_posteriors(log=10)

Set the posteriors based on the attached priors

Parameters:

log

set_proposals(relative_error_proposal=None, additive_error_proposal=None, **kwargs)

Set the proposals on the datapoint’s perturbable parameters

Parameters:
  • heightProposal (geobipy.baseDistribution, optional) – The proposal to attach to the height. Must be univariate

  • relativeErrorProposal (geobipy.baseDistribution, optional) – The proposal to attach to the relative error. If the datapoint has only one system, relativeErrorProposal is univariate. If there are more than one system, relativeErrorProposal is multivariate.

  • additiveErrorProposal (geobipy.baseDistribution, optional) – The proposal to attach to the relative error. If the datapoint has only one system, additiveErrorProposal is univariate. If there are more than one system, additiveErrorProposal is multivariate.

set_relative_error_posterior()
property std

Compute the data errors.

property summary

Print a summary of the EMdataPoint

writeHdf(parent, name, withPosterior=True, index=None)

Write the StatArray to an HDF object parent: Upper hdf file or group myName: object hdf name. Assumes createHdf has already been called create: optionally create the data set as well before writing