Classes | |
class | InterpolatorSpec |
Represents a boundary of the layer, which is specified by a mesh grid of control points that vary in depth according to a vector of parameters. More... | |
struct | Query |
Enumerations | |
enum | SamplingStrategy { noAA, superSamp2X, superSamp4X } |
Represents a sampling strategy for queries. More... | |
Functions | |
Eigen::MatrixXd | sensorGrid (const WorldSpec &worldSpec, uint resx, uint resy, double sensorZ) |
Eigen::MatrixXd | internalGrid2D (std::pair< double, double > xMinMax, std::pair< double, double > yMinMax, uint resx, uint resy) |
Eigen::MatrixXd | internalGrid2DX (std::pair< double, double > xMinMax, std::pair< double, double > yMinMax, uint resx, uint resy) |
Eigen::MatrixXd | edgeGrid2D (std::pair< double, double > xMinMax, std::pair< double, double > yMinMax, uint resx, uint resy) |
Eigen::MatrixXd | sensorGrid3d (const WorldSpec &worldSpec, uint resx, uint resy, uint resz) |
double | length (const Eigen::Vector2d &pt) |
Eigen::VectorXd | linrange (double from, double to, double step=1.0) |
Return a vector containing regularly spaced numbers within a range. This is equivalent to the colon operator in MATLAB (Note the different parameter ordering). More... | |
std::pair< Eigen::MatrixXd, Eigen::MatrixXd > | meshgrid (const Eigen::VectorXd &x, const Eigen::VectorXd &y) |
Eigen::VectorXd | flatten (const Eigen::MatrixXd &matrix) |
Maps all the columns of a matrix into a single column vector. Equivalent to the colon operator A(:) in MATLAB. More... | |
Eigen::VectorXi | flatten (const Eigen::MatrixXi &matrix) |
Maps all the columns of a matrix into a single column vector. Equivalent to the colon operator A(:) in MATLAB. More... | |
std::pair< Eigen::MatrixXd, std::pair< Eigen::MatrixXd, Eigen::MatrixXd > > | makeGrid (const Eigen::Vector2d &boundaryStart, const Eigen::Vector2d &boundaryEnd, const Eigen::Vector2i &resolution, int padding=0) |
Compute a regular 2D grid given the boundaries and resolutions in the x and y directions. More... | |
std::vector< InterpolatorSpec > | worldspec2Interp (const WorldSpec ®ion) |
Generate a vector of interpolators for each layer based on the key info contained in WorldSpec. More... | |
Eigen::VectorXd | kernelInterpolate (const Query &query, const uint boundary, const Eigen::MatrixXd &input) |
Given a 3D query, interpolate the depth of each point in the query. More... | |
Eigen::VectorXd | linearInterpolate (const Query &query, InterpolatorSpec interpolator) |
Given a 3D query, interpolate the depth of each point in the query linearly. More... | |
Eigen::MatrixXd | sqExp (const Eigen::MatrixXd &x1, const Eigen::MatrixXd &x2, const Eigen::VectorXd &lengthScale, bool noisy=false) |
Compute a covariance matrix using the square exponential function. More... | |
Eigen::MatrixXd | sqExp2d (const Eigen::Matrix< double, 2,-1 > &x1, const Eigen::Matrix< double, 2,-1 > &x2, const Eigen::Vector2d &lengthScale, bool noisy=false) |
Compute a covariance matrix using the squared exponential function. This function is faster than sqExp, but only applies when the dimensions of the points is 2 (which is true for control points and query points). More... | |
Eigen::Vector2d | autoLengthScale (const std::pair< double, double > &x1x2, const std::pair< double, double > &y1y2, uint resx, uint resy) |
Get an appropriate length scale given the grid resolution and a smoothing factor. More... | |
double | boundDensity (double raw) |
Bound the density property. More... | |
double | boundLogSusceptibility (double raw) |
Bound the log susceptibility. More... | |
double | boundThermalConductivity (double raw) |
Bound the thermal conductivity. More... | |
double | boundThermalProductivity (double raw) |
Bound the thermal productivity. More... | |
double | boundLogResistivity (double raw) |
Bound the log resistivity. More... | |
double | boundResistivity (double raw) |
Bound the resistivity. More... | |
double | boundResistivityPhase (double raw) |
Bound the resistivity phase. More... | |
double | boundPWaveVelocity (double raw) |
Bound the primary wave velocity. More... | |
double | boundSusceptibility (double raw) |
Bound the susceptibility. More... | |
Eigen::VectorXd | extractProperty (const WorldParams &input, obsidian::RockProperty desiredProp) |
Extract a particular property from the WorldParams. More... | |
Eigen::MatrixXd | getTransitions (const std::vector< world::InterpolatorSpec > &boundaries, const WorldParams &inputs, const Query &query) |
Get the depths of each layer at each query point. More... | |
Eigen::MatrixXd | thickness (const Eigen::MatrixXd &transitions) |
Get the thickness of each layer at each query point. More... | |
Eigen::MatrixXd | postProcessGranites (const Eigen::MatrixXd &transitioni, Eigen::VectorXd offseti, const Eigen::MatrixXd &transitionj, const Query &query, const uint region, const Eigen::MatrixXd &inputs, double floorHeight) |
Code for post-processing the granites, applying a non-linear transform to their heights. | |
Eigen::MatrixXd | getVoxels (const std::vector< world::InterpolatorSpec > &interpolators, const WorldParams &inputs, const Query &query, obsidian::RockProperty desiredProp) |
Eigen::MatrixXd | voxelise (const Eigen::MatrixXd &transitions, const Eigen::VectorXd &zIntercepts, const Eigen::VectorXd &props) |
Convert transitions into a grid of points. More... | |
Eigen::VectorXd | shrink3d (const Eigen::VectorXd &densities, int nx, int ny, int nz) |
Namespace for world model related functionality.
Eigen::Vector2d obsidian::world::autoLengthScale | ( | const std::pair< double, double > & | x1x2, |
const std::pair< double, double > & | y1y2, | ||
uint | resx, | ||
uint | resy | ||
) |
Get an appropriate length scale given the grid resolution and a smoothing factor.
x1x2 | The start and end of the grid boundaries in the x direction. |
y1y2 | The start and end of the grid boundaries in the y direction. |
resx | The resolution of the grid in the x direction. |
resy | The resolution of the grid in the y direction. |
smoothing | The smoothing factor. |
double obsidian::world::boundDensity | ( | double | raw | ) |
Bound the density property.
raw | The raw density value. |
double obsidian::world::boundLogResistivity | ( | double | raw | ) |
Bound the log resistivity.
raw | The raw log resistivity value. |
double obsidian::world::boundLogSusceptibility | ( | double | raw | ) |
Bound the log susceptibility.
raw | The raw log susceptibility value. |
double obsidian::world::boundPWaveVelocity | ( | double | raw | ) |
Bound the primary wave velocity.
raw | The raw primary wave velocity value. |
double obsidian::world::boundResistivity | ( | double | raw | ) |
Bound the resistivity.
raw | The raw resistivity value. |
double obsidian::world::boundResistivityPhase | ( | double | raw | ) |
Bound the resistivity phase.
raw | The raw resistivity phase value. |
double obsidian::world::boundSusceptibility | ( | double | raw | ) |
Bound the susceptibility.
raw | The raw susceptibility value. |
double obsidian::world::boundThermalConductivity | ( | double | raw | ) |
Bound the thermal conductivity.
raw | The raw thermal conductivity value. |
double obsidian::world::boundThermalProductivity | ( | double | raw | ) |
Bound the thermal productivity.
raw | The raw thermal productivity value. |
Eigen::VectorXd obsidian::world::extractProperty | ( | const WorldParams & | input, |
obsidian::RockProperty | desiredProp | ||
) |
Extract a particular property from the WorldParams.
input | the worldParams object. |
desiredProp | the desired property. |
Eigen::VectorXd obsidian::world::flatten | ( | const Eigen::MatrixXd & | matrix | ) |
Maps all the columns of a matrix into a single column vector. Equivalent to the colon operator A(:) in MATLAB.
matrix | The matrix to flatten. |
Eigen::VectorXi obsidian::world::flatten | ( | const Eigen::MatrixXi & | matrix | ) |
Maps all the columns of a matrix into a single column vector. Equivalent to the colon operator A(:) in MATLAB.
matrix | The matrix to flatten. |
Eigen::MatrixXd obsidian::world::getTransitions | ( | const std::vector< world::InterpolatorSpec > & | boundaries, |
const WorldParams & | inputs, | ||
const Query & | query | ||
) |
Get the depths of each layer at each query point.
boundaries | The interpolator specs for each layer. |
inputs | The world model parameters. |
query | The query containing the query points. |
Eigen::VectorXd obsidian::world::kernelInterpolate | ( | const Query & | query, |
const uint | boundary, | ||
const Eigen::MatrixXd & | input | ||
) |
Given a 3D query, interpolate the depth of each point in the query.
query | The 3D query. |
layer | The layer to interpolate in. |
input | The packed parameter values. |
Eigen::VectorXd obsidian::world::linearInterpolate | ( | const Query & | query, |
InterpolatorSpec | interpolator | ||
) |
Given a 3D query, interpolate the depth of each point in the query linearly.
query | The 3D query. |
interpolator | The interpolator specificaitons. |
Eigen::VectorXd obsidian::world::linrange | ( | double | from, |
double | to, | ||
double | step = 1.0 |
||
) |
Return a vector containing regularly spaced numbers within a range. This is equivalent to the colon operator in MATLAB (Note the different parameter ordering).
from | The start of the range. |
to | The end of the range (inclusive). |
step | The step size. |
std::pair< Eigen::MatrixXd, std::pair< Eigen::MatrixXd, Eigen::MatrixXd > > obsidian::world::makeGrid | ( | const Eigen::Vector2d & | boundaryStart, |
const Eigen::Vector2d & | boundaryEnd, | ||
const Eigen::Vector2i & | resolution, | ||
int | padding = 0 |
||
) |
Compute a regular 2D grid given the boundaries and resolutions in the x and y directions.
boundaryStart,boundaryEnd | The start and end boundaries. |
resolution | The resolution in each direction (npoints in each direction). |
padding | Number of cells to extend outside the boundaries. |
Eigen::MatrixXd obsidian::world::sqExp | ( | const Eigen::MatrixXd & | x1, |
const Eigen::MatrixXd & | x2, | ||
const Eigen::VectorXd & | lengthScale, | ||
bool | noisy = false |
||
) |
Compute a covariance matrix using the square exponential function.
x1,x2 | DxN matrices. Each row represents the input in one dimension. |
lengthScale | Vector containing length scale value for each dimension. |
noisy | Whether noise is modelled. |
Eigen::MatrixXd obsidian::world::sqExp2d | ( | const Eigen::Matrix< double, 2,-1 > & | x1, |
const Eigen::Matrix< double, 2,-1 > & | x2, | ||
const Eigen::Vector2d & | lengthScale, | ||
bool | noisy = false |
||
) |
Compute a covariance matrix using the squared exponential function. This function is faster than sqExp, but only applies when the dimensions of the points is 2 (which is true for control points and query points).
x1,x2 | 2xN matrices. Each row represents the input in one dimension. |
lengthScale | Vector containing length scale value for each dimension. |
noisy | Whether noise is modelled. |
Eigen::MatrixXd obsidian::world::thickness | ( | const Eigen::MatrixXd & | transitions | ) |
Get the thickness of each layer at each query point.
transitions | A nlayers by mqueries matrix of the transitions between layers at each sensor location. |
Eigen::MatrixXd obsidian::world::voxelise | ( | const Eigen::MatrixXd & | transitions, |
const Eigen::VectorXd & | zIntercepts, | ||
const Eigen::VectorXd & | props | ||
) |
Convert transitions into a grid of points.
transitions | The layer transitions. |
zIntercepts | A vector containing the z coordinates of the voxels. |
std::vector< InterpolatorSpec > obsidian::world::worldspec2Interp | ( | const WorldSpec & | region | ) |
Generate a vector of interpolators for each layer based on the key info contained in WorldSpec.
region | The world specifications. |