Obsidian
Probabilistic Geophysical Joint Inversion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
obsidian Namespace Reference

Namespaces

 comms
 
 datatype
 
 distrib
 
 fwd
 
 io
 
 world
 

Classes

struct  AsyncRetrieve
 Retrives results of a job. More...
 
struct  AsyncSend
 Sends new job. Consists of world params and sensor params. More...
 
struct  BoundarySpec
 
struct  ContactPointCache
 
struct  ContactPointParams
 
struct  ContactPointResults
 
struct  ContactPointSpec
 
class  GeoAsyncPolicy
 Abstraction / Wrapper for the comms system. Used from mcmc.run() for submitting jobs and retrieves results. More...
 
struct  getSensorPropertiesMask
 
struct  GlobalCache
 
struct  GlobalParams
 
class  GlobalPrior
 
struct  GlobalResults
 
struct  GlobalSpec
 
struct  GravCache
 
struct  GravParams
 
struct  GravResults
 
struct  GravSpec
 
struct  initSensorInputFileOptions_
 
struct  MagCache
 
struct  MagParams
 
struct  MagResults
 
struct  MagSpec
 
class  ModelToString
 
struct  MtAnisoCache
 
struct  MtAnisoParams
 
struct  MtAnisoResults
 
struct  MtAnisoSpec
 
struct  NoiseSpec
 
struct  parseSensorsEnabled_
 
struct  Seismic1dCache
 
struct  Seismic1dParams
 
struct  Seismic1dResults
 
struct  Seismic1dSpec
 
struct  setSensorsEnabled
 
struct  ThermalCache
 
struct  ThermalParams
 
struct  ThermalResults
 
struct  ThermalSpec
 
struct  Types
 
struct  Types< ForwardModel::CONTACTPOINT >
 
struct  Types< ForwardModel::GRAVITY >
 
struct  Types< ForwardModel::MAGNETICS >
 
struct  Types< ForwardModel::MTANISO >
 
struct  Types< ForwardModel::SEISMIC1D >
 
struct  Types< ForwardModel::THERMAL >
 
struct  VoxelSpec
 
struct  WorldParams
 These are optimised. More...
 
class  WorldSpec
 

Enumerations

enum  ForwardModel {
  GRAVITY, MAGNETICS, MTANISO, SEISMIC1D,
  CONTACTPOINT, THERMAL, Count
}
 
enum  MtAnisoLikelihood { GAUSSIAN, INVERSEGAMMA, Count }
 
enum  RockProperty {
  Density, LogSusceptibility, ThermalConductivity, ThermalProductivity,
  LogResistivityX, LogResistivityY, LogResistivityZ, ResistivityPhase,
  PWaveVelocity, Count, Susceptibility, ResistivityX,
  ResistivityY, ResistivityZ
}
 
enum  BoundaryClass { Normal, Warped }
 

Functions

template<ForwardModel f>
bool workerThread (const typename Types< f >::Spec &spec, const typename Types< f >::Cache &cache, const typename Types< f >::Results &real, stateline::comms::Worker &worker)
 Thread method receives jobs and evaluates likelihoods and sends results back until until interrupted by signal.
 
po::options_description configFileOptions ()
 
void readConfigFile (const std::string &configFilename, po::variables_map &vm)
 
stateline::DBSettings parseDBSettings (const po::variables_map &vm)
 
stateline::DelegatorSettings parseDelegatorSettings (const po::variables_map &vm)
 
stateline::WorkerSettings parseWorkerSettings (const po::variables_map &vm)
 
template<>
std::string forwardModelLabel< ForwardModel::CONTACTPOINT > ()
 
template<typename T , typename R >
R & globalResult (T &)
 For accessing subfields of global results.
 
template<>
GravResultsglobalResult< GlobalResults, GravResults > (GlobalResults &g)
 
template<>
MagResultsglobalResult< GlobalResults, MagResults > (GlobalResults &g)
 
template<>
MtAnisoResultsglobalResult< GlobalResults, MtAnisoResults > (GlobalResults &g)
 
template<>
Seismic1dResultsglobalResult< GlobalResults, Seismic1dResults > (GlobalResults &g)
 
template<>
ContactPointResultsglobalResult< GlobalResults, ContactPointResults > (GlobalResults &g)
 
template<>
ThermalResultsglobalResult< GlobalResults, ThermalResults > (GlobalResults &g)
 
template<ForwardModel >
std::string forwardModelLabel ()
 
template<>
std::string forwardModelLabel< ForwardModel::GRAVITY > ()
 
template<>
std::string forwardModelLabel< ForwardModel::MAGNETICS > ()
 
template<>
std::string forwardModelLabel< ForwardModel::MTANISO > ()
 
template<>
std::string forwardModelLabel< ForwardModel::SEISMIC1D > ()
 
template<template< ForwardModel f > class X, typename... P>
void applyToSensorsEnabled (const std::set< ForwardModel > &enabled, P...p)
 
template<template< ForwardModel f > class X, typename... P>
void applyToSensors (P...p)
 
std::ostream & operator<< (std::ostream &os, const ForwardModel &f)
 
template<>
std::string forwardModelLabel< ForwardModel::THERMAL > ()
 
template<typename T , int C, int Offset>
Eigen::Matrix< T,
Eigen::Dynamic, Eigen::Dynamic > 
readFixed (const std::vector< std::vector< std::string >> &data)
 for reading a rectangular portion of list of list of fields as a Matrix
 
template<typename T >
void writeFixed (std::vector< std::vector< std::string >> &data, Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &obj)
 for writing a matrix into a list of list of fields
 
template<typename T , int Offset>
std::vector< Eigen::Matrix< T,
Eigen::Dynamic, 1 > > 
readRagged (std::vector< std::vector< std::string >> &data)
 for reading a ragged array (vector of matrix) from a list of list of fields
 
template<typename T >
void writeRagged (std::vector< std::vector< std::string >> &data, std::vector< Eigen::Matrix< T, Eigen::Dynamic, 1 >> &obj)
 for wtiting a ragged array (vector of matrix) into a list of list of fields
 
po::variables_map build_vm (po::variables_map vm, const po::options_description &od, const std::string &topic, const std::map< std::string, std::string > &map)
 helper method for building boost::program_options::variable_map
 
template<>
std::string configHeading< ForwardModel::CONTACTPOINT > ()
 
template<>
void initSensorInputFileOptions< ForwardModel::CONTACTPOINT > (po::options_description &options)
 
template<>
ContactPointSpec parseSpec (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a spec object from input.obsidian.
 
template<>
po::variables_map write (const std::string &prefix, ContactPointSpec spec, const po::options_description &od)
 
template<>
ContactPointParams parseSimulationParams (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a params object from input.obsidian. More...
 
template<>
ContactPointResults parseSensorReadings (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a Result Object from input.obsidian.
 
template<>
po::variables_map write (const std::string &prefix, ContactPointResults g, const po::options_description &od)
 
template<>
void enableProperties< ForwardModel::CONTACTPOINT > (Eigen::VectorXi &propMasksMask)
 
template<>
prior::ContactPointParamsPrior parsePrior (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a Prior Object from input.obsidian.
 
template<>
bool validateSensor (const WorldSpec &world, const ContactPointSpec &spec, const ContactPointResults &result)
 
template<>
GlobalSpec parseSpec (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a spec object from input.obsidian.
 
template<>
GlobalParams parseSimulationParams (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a params object from input.obsidian. More...
 
template<>
GlobalResults parseSensorReadings (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a Result Object from input.obsidian.
 
template<>
GlobalPrior parsePrior (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a Prior Object from input.obsidian.
 
template<>
std::string configHeading< ForwardModel::GRAVITY > ()
 
template<>
void initSensorInputFileOptions< ForwardModel::GRAVITY > (po::options_description &options)
 
template<>
GravSpec parseSpec (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a spec object from input.obsidian.
 
template<>
po::variables_map write (const std::string &prefix, GravSpec spec, const po::options_description &od)
 
template<>
GravParams parseSimulationParams (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a params object from input.obsidian. More...
 
template<>
GravResults parseSensorReadings (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a Result Object from input.obsidian.
 
template<>
po::variables_map write (const std::string &prefix, GravResults g, const po::options_description &od)
 
template<>
void enableProperties< ForwardModel::GRAVITY > (Eigen::VectorXi &propMasksMask)
 
template<>
prior::GravParamsPrior parsePrior (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a Prior Object from input.obsidian.
 
template<>
bool validateSensor (const WorldSpec &world, const GravSpec &spec, const GravResults &result)
 
Eigen::VectorXd drawControlPoints (uint n)
 
po::options_description inputFileOptions ()
 
void readInputFile (const std::string &inputFilename, po::variables_map &vm)
 Read input.obsidian file.
 
std::set< ForwardModel > parseSensorsEnabled (const po::variables_map &vm)
 Parse which sensors are enabled from loaded input.obsidian file.
 
bool isSimulation (const po::variables_map &vm)
 Determine if input.obsidian wants us to run our simulation for generating results objects for read them form input.obsidian.
 
void initWorldOptions (po::options_description &options)
 Initialise options for the world model.
 
void initMCMCOptions (po::options_description &options)
 Initialise options for mcmc.
 
template<ForwardModel f>
void initSensorInputFileOptions (po::options_description &add_options)
 Initialise options for a specific forward model to read from input.obsidian or write to output.gdf.
 
stateline::MCMCSettings parseMCMCSettings (const po::variables_map &vm)
 Parse mcmc settings from loaded input.obsidian file.
 
template<ForwardModel f>
std::string configHeading ()
 Determine which section in input.obsidian we should read settings of a ForwardModel from.
 
template<typename SensorPrior >
SensorPrior parsePrior (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a Prior Object from input.obsidian.
 
template<typename SensorSpec >
SensorSpec parseSpec (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a spec object from input.obsidian.
 
template<typename SensorParams >
SensorParams parseSimulationParams (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a params object from input.obsidian. More...
 
template<typename SensorParams >
std::vector< SensorParams > parseInitStates (const po::variables_map &vm, const WorldSpec &spec, const std::set< ForwardModel > &sensorsEnabled)
 Parse initial state of for each stack from input.obsidian.
 
template<typename SensorResult >
SensorResult parseSensorReadings (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a Result Object from input.obsidian.
 
template<typename Object >
po::variables_map write (const std::string &prefix, Object spec, const po::options_description &vm)
 Write a object into output.gdf.
 
template<ForwardModel f>
void enableProperties (Eigen::VectorXi &propMasksMask)
 Determine which properties are used by which forward model.
 
bool validateWorld (const WorldSpec &world, const WorldParams &param)
 Method called for validating world spec and parameters.
 
template<typename Spec , typename Result >
bool validateSensor (const WorldSpec &world, const Spec &spec, const Result &result)
 Method called for validating world spec and parameters.
 
template<>
std::string configHeading< ForwardModel::MAGNETICS > ()
 
template<>
void initSensorInputFileOptions< ForwardModel::MAGNETICS > (po::options_description &options)
 
template<>
MagSpec parseSpec (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a spec object from input.obsidian.
 
template<>
po::variables_map write (const std::string &prefix, MagSpec spec, const po::options_description &od)
 
template<>
MagParams parseSimulationParams (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a params object from input.obsidian. More...
 
template<>
MagResults parseSensorReadings (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a Result Object from input.obsidian.
 
template<>
po::variables_map write (const std::string &prefix, MagResults g, const po::options_description &od)
 
template<>
void enableProperties< ForwardModel::MAGNETICS > (Eigen::VectorXi &propMasksMask)
 
template<>
prior::MagParamsPrior parsePrior (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a Prior Object from input.obsidian.
 
template<>
bool validateSensor (const WorldSpec &world, const MagSpec &spec, const MagResults &result)
 
template<>
std::string configHeading< ForwardModel::MTANISO > ()
 
template<>
void initSensorInputFileOptions< ForwardModel::MTANISO > (po::options_description &options)
 
template<>
MtAnisoSpec parseSpec (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a spec object from input.obsidian.
 
template<>
po::variables_map write (const std::string &prefix, MtAnisoSpec spec, const po::options_description &od)
 
template<>
MtAnisoParams parseSimulationParams (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a params object from input.obsidian. More...
 
template<>
MtAnisoResults parseSensorReadings (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a Result Object from input.obsidian.
 
template<>
po::variables_map write (const std::string &prefix, MtAnisoResults results, const po::options_description &od)
 
template<>
void enableProperties< ForwardModel::MTANISO > (Eigen::VectorXi &propMasksMask)
 
template<>
prior::MtAnisoParamsPrior parsePrior (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a Prior Object from input.obsidian.
 
template<>
bool validateSensor (const WorldSpec &world, const MtAnisoSpec &spec, const MtAnisoResults &result)
 
template<>
std::string configHeading< ForwardModel::SEISMIC1D > ()
 
template<>
void initSensorInputFileOptions< ForwardModel::SEISMIC1D > (po::options_description &options)
 
template<>
Seismic1dSpec parseSpec (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a spec object from input.obsidian.
 
template<>
po::variables_map write (const std::string &prefix, Seismic1dSpec spec, const po::options_description &od)
 
template<>
Seismic1dParams parseSimulationParams (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a params object from input.obsidian. More...
 
template<>
Seismic1dResults parseSensorReadings (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a Result Object from input.obsidian.
 
template<>
po::variables_map write (const std::string &prefix, Seismic1dResults g, const po::options_description &od)
 
template<>
void enableProperties< ForwardModel::SEISMIC1D > (Eigen::VectorXi &propMasksMask)
 
template<>
prior::Seismic1dParamsPrior parsePrior (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a Prior Object from input.obsidian.
 
template<>
bool validateSensor (const WorldSpec &world, const Seismic1dSpec &spec, const Seismic1dResults &result)
 
template<>
std::string configHeading< ForwardModel::THERMAL > ()
 
template<>
void initSensorInputFileOptions< ForwardModel::THERMAL > (po::options_description &options)
 
template<>
ThermalSpec parseSpec (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a spec object from input.obsidian.
 
template<>
po::variables_map write (const std::string &prefix, ThermalSpec spec, const po::options_description &od)
 
template<>
ThermalParams parseSimulationParams (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a params object from input.obsidian. More...
 
template<>
ThermalResults parseSensorReadings (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a Result Object from input.obsidian.
 
template<>
po::variables_map write (const std::string &prefix, ThermalResults g, const po::options_description &od)
 
template<>
void enableProperties< ForwardModel::THERMAL > (Eigen::VectorXi &propMasksMask)
 
template<>
prior::ThermalParamsPrior parsePrior (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a Prior Object from input.obsidian.
 
template<>
bool validateSensor (const WorldSpec &world, const ThermalSpec &spec, const ThermalResults &result)
 
template<typename T >
Eigen::Matrix< T,
Eigen::Dynamic, Eigen::Dynamic > 
flip (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &input)
 
template<typename T >
Eigen::Matrix< T,
Eigen::Dynamic, Eigen::Dynamic > 
unflip (const Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > &input)
 
template<>
WorldSpec parseSpec (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a spec object from input.obsidian.
 
template<>
po::variables_map write (const std::string &prefix, WorldSpec spec, const po::options_description &od)
 
template<>
WorldParams parseSimulationParams (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a params object from input.obsidian. More...
 
template<>
po::variables_map write (const std::string &prefix, WorldParams g, const po::options_description &od)
 
template<>
prior::WorldParamsPrior parsePrior (const po::variables_map &vm, const std::set< ForwardModel > &sensorsEnabled)
 Parse a Prior Object from input.obsidian.
 
template<>
po::variables_map write (const std::string &prefix, prior::WorldParamsPrior g, const po::options_description &od)
 
template<>
std::vector< WorldParamsparseInitStates (const po::variables_map &vm, const WorldSpec &spec, const std::set< ForwardModel > &sensorsEnabled)
 Parse initial state of for each stack from input.obsidian.
 
void dumpParamsNPZ (io::NpzWriter &writer, std::vector< WorldParams > &params)
 
void dumpPriorNPZ (io::NpzWriter &writer, const std::vector< double > &prior)
 
void dumpEnergyNPZ (io::NpzWriter &writer, const std::vector< double > &energy)
 
void dumpResultsNPZ (io::NpzWriter &writer, std::vector< GlobalResults > &results)
 
void dumpLikelihoodNPZ (io::NpzWriter &writer, const std::vector< std::vector< double >> &lh)
 
void dumpThetaNPZ (io::NpzWriter &writer, const std::vector< Eigen::VectorXd > &thetas)
 
void dumpPropVoxelsNPZ (io::NpzWriter &writer, const std::vector< Eigen::MatrixXd > &propVoxs)
 
void dumpLayerVoxelsNPZ (io::NpzWriter &writer, const std::vector< Eigen::MatrixXd > &layerVoxs)
 
void dumpTransitionsVoxelsNPZ (io::NpzWriter &writer, const std::vector< Eigen::MatrixXd > &voxs)
 

Variables

const std::map< std::string,
BoundaryClass > 
boundaryClassMap { { "normal", BoundaryClass::Normal }, { "warped", BoundaryClass::Warped } }
 
const std::map< BoundaryClass,
std::string > 
boundaryClassStrMap { { BoundaryClass::Normal, "normal", }, { BoundaryClass::Warped, "warped" } }
 

Detailed Description

Namespace for all Obsidian code files.

Function Documentation

template<>
GlobalParams obsidian::parseSimulationParams ( const po::variables_map &  vm,
const std::set< ForwardModel > &  sensorsEnabled 
)

Parse a params object from input.obsidian.

Note
the sensor params don't actually have anything in them at the moment so we don't need to do any parsing
template<>
Seismic1dParams obsidian::parseSimulationParams ( const po::variables_map &  vm,
const std::set< ForwardModel > &  sensorsEnabled 
)

Parse a params object from input.obsidian.

Note
the sensor params don't actually have anything in them at the moment so we don't need to do any parsing
template<>
ContactPointParams obsidian::parseSimulationParams ( const po::variables_map &  vm,
const std::set< ForwardModel > &  sensorsEnabled 
)

Parse a params object from input.obsidian.

Note
the sensor params don't actually have anything in them at the moment so we don't need to do any parsing
template<>
MtAnisoParams obsidian::parseSimulationParams ( const po::variables_map &  vm,
const std::set< ForwardModel > &  sensorsEnabled 
)

Parse a params object from input.obsidian.

Note
the sensor params don't actually have anything in them at the moment so we don't need to do any parsing
template<typename SensorParams >
SensorParams obsidian::parseSimulationParams ( const po::variables_map &  vm,
const std::set< ForwardModel > &  sensorsEnabled 
)

Parse a params object from input.obsidian.

Note
the sensor params don't actually have anything in them at the moment so we don't need to do any parsing
template<>
GravParams obsidian::parseSimulationParams ( const po::variables_map &  vm,
const std::set< ForwardModel > &  sensorsEnabled 
)

Parse a params object from input.obsidian.

Note
the sensor params don't actually have anything in them at the moment so we don't need to do any parsing
template<>
MagParams obsidian::parseSimulationParams ( const po::variables_map &  vm,
const std::set< ForwardModel > &  sensorsEnabled 
)

Parse a params object from input.obsidian.

Note
the sensor params don't actually have anything in them at the moment so we don't need to do any parsing
template<>
ThermalParams obsidian::parseSimulationParams ( const po::variables_map &  vm,
const std::set< ForwardModel > &  sensorsEnabled 
)

Parse a params object from input.obsidian.

Note
the sensor params don't actually have anything in them at the moment so we don't need to do any parsing
template<>
WorldParams obsidian::parseSimulationParams ( const po::variables_map &  vm,
const std::set< ForwardModel > &  sensorsEnabled 
)

Parse a params object from input.obsidian.

Note
the sensor params don't actually have anything in them at the moment so we don't need to do any parsing