Geophysical Inversion and Modeling Library  v1.0.12-3-g179296b4
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 (long a, long b, long m, long n)
Index createFourPointData (Index i, long eaID, long ebID, long emID, long 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 std::vector< RVector3 > &sensors)
const std::vector< RVector3 > & sensorPositions () const
void setSensorPosition (uint i, const RVector3 &pos)
const RVector3sensorPosition (double i) const
const std::vector< RVector3 > & sensors () const
const RVector3sensor (long i) const
void setSensor (long i, const RVector3 &pos)
long createSensor (const RVector3 &pos, double tolerance=1e-3)
uint 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 (uint 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 ()
const std::vector< RVector3 > & additionalPoints () const
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
void showInfos () const
void resize (uint 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

Protected Attributes

Index fillCounter_
- Protected Attributes inherited from GIMLI::DataContainer
std::string inputFormatStringSensors_
std::string inputFormatString_
std::map< std::string, RVectordataMap_
 Data map. More...
std::vector< RVector3sensorPoints_
 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...
std::vector< RVector3topoPoints_
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.

References init().

◆ 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

References init(), and GIMLI::DataContainer::load().

◆ DataContainerERT() [3/3]

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

Copy Constructor

References init().

◆ ~DataContainerERT()

GIMLI::DataContainerERT::~DataContainerERT ( )

Default destructor

Member Function Documentation

◆ addFourPointData()

Index GIMLI::DataContainerERT::addFourPointData ( long  a,
long  b,
long  m,
long  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.

References createFourPointData(), and GIMLI::DataContainer::size().

◆ averageDuplicateData()

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

◆ checkDataValidityLocal()

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

Reimplemented from GIMLI::DataContainer.

References GIMLI::DataContainer::allNonZero(), GIMLI::find(), GIMLI::DataContainer::haveData(), GIMLI::DataContainer::markInvalid(), GIMLI::DataContainer::size(), and GIMLI::str().

◆ createFourPointData()

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

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

References GIMLI::DataContainer::dataMap_, GIMLI::DataContainer::resize(), GIMLI::DataContainer::size(), and GIMLI::str().

Referenced by addFourPointData().

◆ currentPatternToElectrode()

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

◆ electrodeToCurrentPattern()

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

◆ 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.

References GIMLI::DataContainer::dataMap_, initTokenTranslator(), GIMLI::DataContainer::registerSensorIndex(), and GIMLI::DataContainer::sensorIndexOnFileFromOne_.

Referenced by DataContainerERT().

◆ initTokenTranslator()

void GIMLI::DataContainerERT::initTokenTranslator ( )

Define ert token translators

Reimplemented from GIMLI::DataContainer.

References GIMLI::DataContainer::initTokenTranslator(), and GIMLI::DataContainer::tT_.

Referenced by init().