Geophysical Inversion and Modelling Library  v1.3.1-2-g7599abf9
GIMLI::DataContainerERT Class Reference
+ Inheritance diagram for GIMLI::DataContainerERT:
+ Collaboration diagram for GIMLI::DataContainerERT:

Public Member Functions

 DataContainerERT ()
 DataContainerERT (const std::string &fileName, bool removeInvalid=true)
 DataContainerERT (const DataContainerERT &data)
virtual ~DataContainerERT ()
virtual void init ()
virtual void initTokenTranslator ()
Index addFourPointData (SIndex a, SIndex b, SIndex m, SIndex n)
Index createFourPointData (Index i, SIndex eaID, SIndex ebID, SIndex emID, SIndex enID)
virtual void checkDataValidityLocal ()
CurrentPattern currentPatternToElectrode (Index pattern)
Index electrodeToCurrentPattern (Index a, Index b) const
std::set< Index > currentPattern (bool reciprocity=false)
void averageDuplicateData (bool verbose=false)
void fitFillSize ()
- Public Member Functions inherited from GIMLI::DataContainer
 DataContainer ()
 DataContainer (const std::string &fileName, bool sensorIndicesFromOne=true, bool removeInvalid=true)
 DataContainer (const std::string &fileName, const std::string &sensorTokens, bool sensorIndicesFromOne=true, bool removeInvalid=true)
 DataContainer (const DataContainer &data)
virtual ~DataContainer ()
DataContaineroperator= (const DataContainer &data)
const RVectoroperator() (const std::string &token) const
RVectoroperator() (const std::string &token)
const RVectoroperator[] (const std::string &token) const
RVectoroperator[] (const std::string &token)
void initDefaults ()
bool haveTranslationForAlias (const std::string &alias) const
std::string translateAlias (const std::string &alias) const
virtual void clear ()
Index size () const
const std::map< std::string, RVector > & dataMap () const
const std::map< std::string, std::string > & dataDescription () const
void add (const DataContainer &data, double snap=1e-3)
void setSensorPositions (const RVector &sensors)
void setSensorPositions (const PosVector &sensors)
const PosVectorsensorPositions () const
void setSensorPosition (Index i, const RVector3 &pos)
const RVector3sensorPosition (double i) const
const R3Vectorsensors () const
const RVector3sensor (Index i) const
void setSensor (Index i, const RVector3 &pos)
SIndex createSensor (const RVector3 &pos, double tolerance=1e-3)
Index sensorCount () const
void registerSensorIndex (const std::string &token)
bool isSensorIndex (const std::string &token) const
const std::set< std::string > sensorIdx () const
void setSensorIndexOnFileFromOne (bool indexFromOne)
bool sensorIndexOnFileFromOne () const
IndexArray findSensorIndex (const RVector &d) const
void markInvalidSensorIndices ()
void removeSensorIdx (Index idx)
void removeSensorIdx (const IndexArray &idx)
const std::string & formatStringSensors () const
void sortSensorsX (bool incX=true, bool incY=true, bool incZ=true)
void translate (const RVector3 &trans)
void scale (const RVector3 &scale)
IndexArray dataIndex ()
IndexArray sortSensorsIndex ()
void setAdditionalPoints (const PosVector &a)
const PosVectoradditionalPoints () const
void setAdditionalPoint (Index i, const Pos &p)
void addAdditionalPoint (const Pos &p)
bool allNonZero (const std::string &token) const
bool haveData (const std::string &token) const
bool exists (const std::string &token) const
const std::map< std::string, std::string > & tokenTranslator () const
virtual int load (const std::string &fileName, bool sensorIndicesFromOne=true, bool removeInvalid=true)
virtual int save (const std::string &fileName, const std::string &fmtData, const std::string &fmtSensor, bool noFilter=false, bool verbose=false) const
int save (const std::string &fileName, const std::string &formatData="all", bool noFilter=false, bool verbose=false) const
virtual int write (std::fstream &os, const std::string &fmtData, const std::string &fmtSensor, bool noFilter=false, bool verbose=false) const
void showInfos () const
void resize (Index size)
std::string tokenList (bool withAnnotation=true) const
void add (const std::string &token, const RVector &data, const std::string &description="")
void add (const std::string &token)
void set (const std::string &token, const RVector &data)
const RVectorget (const std::string &token) const
const IndexArray id (const std::string &token) const
RVectorref (const std::string &token)
void setDataDescription (const std::string &token, const std::string &description)
std::string dataDescription (const std::string &token) const
virtual void remove (const IndexArray &idx)
void remove (const BVector &bvec)
void markValid (const BVector &bvec, bool valid=true)
void markValid (const IndexArray &idx, bool valid=true)
void markValid (Index idx, bool valid=true)
void markInvalid (const BVector &bvec)
void markInvalid (const IndexArray &idx)
void markInvalid (Index idx)
void checkDataValidity (bool remove=true)
void removeInvalid ()
void removeUnusedSensors (bool verbose=false)
void setInputFormatString (const std::string &inputFormatString)
const std::string & inputFormatString () const
Index hash () const

Protected Attributes

Index fillCounter_
- Protected Attributes inherited from GIMLI::DataContainer
std::string inputFormatStringSensors_
std::string inputFormatString_
std::map< std::string, RVectordataMap_
 Data map. More...
PosVector sensorPoints_
 Sensor positions. More...
std::set< std::string > dataSensorIdx_
 Data field that is sensor index. More...
std::map< std::string, std::string > dataDescription_
 Description for the data map entries. More...
PosVector topoPoints_
std::map< std::string, std::string > tT_
bool sensorIndexOnFileFromOne_

Additional Inherited Members

- Protected Member Functions inherited from GIMLI::DataContainer
virtual void copy_ (const DataContainer &data)

Constructor & Destructor Documentation

◆ DataContainerERT() [1/3]

GIMLI::DataContainerERT::DataContainerERT ( )

Simple Constructor, builds an empty data container.

◆ DataContainerERT() [2/3]

GIMLI::DataContainerERT::DataContainerERT ( const std::string &  fileName,
bool  removeInvalid = true 

Constructor, builds a data container and fills the data from a file. See load.

fileNameString of the file name

◆ DataContainerERT() [3/3]

GIMLI::DataContainerERT::DataContainerERT ( const DataContainerERT data)

Copy Constructor

◆ ~DataContainerERT()

GIMLI::DataContainerERT::~DataContainerERT ( )

Default destructor

Member Function Documentation

◆ addFourPointData()

Index GIMLI::DataContainerERT::addFourPointData ( SIndex  a,
SIndex  b,
SIndex  m,
SIndex  n 

Add a new data point and the end of the dataContainer (size+=1). Return the Index of the new data. Should be size()-1. a, b, m, n can be -1 for unused sensor.

◆ averageDuplicateData()

void GIMLI::DataContainerERT::averageDuplicateData ( bool  verbose = false)

Merge duplicate data by averaging. Sort the DataContainerERT as well.

+1 ensures that -1 (pol) electrodes are considered.

◆ checkDataValidityLocal()

void GIMLI::DataContainerERT::checkDataValidityLocal ( )
  • Virtual method with some data validity rules. Wrong data should be marked invalid here.

Reimplemented from GIMLI::DataContainer.

◆ createFourPointData()

Index GIMLI::DataContainerERT::createFourPointData ( Index  i,
SIndex  eaID,
SIndex  ebID,
SIndex  emID,
SIndex  enID 

Create data point at a given position in the dataContainer. The container will be resized if i is larger then this.size().

◆ currentPatternToElectrode()

CurrentPattern GIMLI::DataContainerERT::currentPatternToElectrode ( Index  pattern)

+1 ensures that -1 (pol) electrodes are considered.

◆ electrodeToCurrentPattern()

Index GIMLI::DataContainerERT::electrodeToCurrentPattern ( Index  a,
Index  b 
) const

+1 ensures that -1 (pol) electrodes are considered.

References GIMLI::DataContainer::dataMap_.

◆ init()

void GIMLI::DataContainerERT::init ( )

Define ert sensorindex names 'a b m n' and ert data fields 'u i r rhoa err k ip iperr'

Reimplemented from GIMLI::DataContainer.

◆ initTokenTranslator()

void GIMLI::DataContainerERT::initTokenTranslator ( )

Define ert token translators

Reimplemented from GIMLI::DataContainer.

References GIMLI::DataContainer::tT_.