GPLIB++
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
gplib::MTStation Class Reference

The class MTStation is used to store the transfer functions and related information for a MT-site. More...

#include <MTStation.h>

Inheritance diagram for gplib::MTStation:
Inheritance graph
[legend]

Public Types

enum  tmtdataformat {
  unknown, mtt, j, edi,
  pek, nc, zmm, mtf
}
 

Public Member Functions

void AssignAll (const int nfreq)
 
void Rotate (const double rotangle)
 
void Rotate (void)
 Rotate to zero rotation angle. More...
 
trealdata GetFrequencies () const
 return the available frequencies in a single vector More...
 
void SetFrequencies (const trealdata &freqs)
 Set the frequencies of the tensor elements, invalidates the previously stored impedance data, mainly for creating synthetic data. More...
 
double GetLatitude () const
 access funtion for Latitude More...
 
void SetLatitude (double lat)
 
double GetLongitude () const
 
void SetLongitude (double lon)
 
double GetElevation () const
 
std::string GetName ()
 
double GetAzimuth () const
 
const MTTensorat (const unsigned int i) const
 direct acces to a tensor at a given index More...
 
const std::vector< MTTensor > & GetMTData () const
 Get the full vector of Tensor elements read only. More...
 
std::vector< MTTensor > & SetMTData ()
 Get the full vector of Tensor elements for reading and writing. More...
 
virtual MTStationclone () const
 for parallel runs we need to make a copy of the object and its derived classes More...
 
MTStationoperator= (const MTStation &source)
 
 MTStation ()
 
 MTStation (const MTStation &old)
 
 MTStation (const int size)
 
 MTStation (const std::string filename)
 
virtual ~MTStation ()
 
virtual void GetData (const std::string filename)
 read in data from file, determines format by ending More...
 
virtual void GetData ()
 
virtual void WriteData (const std::string filename)
 
void WriteAsMtt (const std::string filename)
 Write data in goettingen .mtt format. More...
 
void WriteAsEdi (const std::string filename)
 Write data as edi (no functionality yet) More...
 
void WriteAsJ (const std::string filename)
 Write data to j-file. More...
 
void WriteBack ()
 Write data back in original format, with filename given by station name. More...
 

Protected Member Functions

void Update ()
 Update all derived quantities. More...
 
void Assign (const int nfreq)
 Assign() assigns zero to all derived quantities, this makes the calculation. More...
 

Friends

class C1DMTSynthData
 

Detailed Description

The class MTStation is used to store the transfer functions and related information for a MT-site.

Definition at line 17 of file MTStation.h.

Member Enumeration Documentation

Enumerator
unknown 
mtt 
j 
edi 
pek 
nc 
zmm 
mtf 

Definition at line 20 of file MTStation.h.

Constructor & Destructor Documentation

gplib::MTStation::MTStation ( )

Definition at line 49 of file MTStation.cpp.

Referenced by clone().

gplib::MTStation::MTStation ( const MTStation old)

Definition at line 824 of file MTStation.cpp.

References Update().

gplib::MTStation::MTStation ( const int  size)

Definition at line 64 of file MTStation.cpp.

References Assign().

gplib::MTStation::MTStation ( const std::string  filename)

Definition at line 58 of file MTStation.cpp.

gplib::MTStation::~MTStation ( )
virtual

Definition at line 54 of file MTStation.cpp.

Member Function Documentation

void gplib::MTStation::Assign ( const int  nfreq)
protected

Assign() assigns zero to all derived quantities, this makes the calculation.

Definition at line 74 of file MTStation.cpp.

Referenced by AssignAll(), gplib::C1DMTSynthData::CalcSynthetic(), gplib::C1DAnisoMTSynthData::GetData(), and MTStation().

void gplib::MTStation::AssignAll ( const int  nfreq)

Definition at line 70 of file MTStation.cpp.

References Assign().

const MTTensor& gplib::MTStation::at ( const unsigned int  i) const
inline

direct acces to a tensor at a given index

Definition at line 114 of file MTStation.h.

Referenced by gplib::PTensorMTStation::operator=(), PrintComponent(), gplib::PTensor1DMTObjective::SafeParallel(), and WriteToFile().

virtual MTStation* gplib::MTStation::clone ( ) const
inlinevirtual

for parallel runs we need to make a copy of the object and its derived classes

Reimplemented in gplib::C1DAnisoMTSynthData, and gplib::C1DMTSynthData.

Definition at line 129 of file MTStation.h.

References MTStation().

double gplib::MTStation::GetAzimuth ( ) const
inline

Definition at line 108 of file MTStation.h.

void gplib::MTStation::GetData ( const std::string  filename)
virtual

read in data from file, determines format by ending

Definition at line 597 of file MTStation.cpp.

References edi, j, mtf, gplib::MTFileTypes, mtt, nc, pek, Rotate(), unknown, and zmm.

Referenced by gplib::MTStationList::GetData(), init(), and main().

virtual void gplib::MTStation::GetData ( )
inlinevirtual

Reimplemented in gplib::C1DAnisoMTSynthData.

Definition at line 141 of file MTStation.h.

double gplib::MTStation::GetElevation ( ) const
inline

Definition at line 100 of file MTStation.h.

trealdata gplib::MTStation::GetFrequencies ( ) const

return the available frequencies in a single vector

Return a vector containing the available frequencies; This should be rewritten to be more efficient

Definition at line 136 of file MTStation.cpp.

Referenced by gplib::C1DMTSynthData::CalcSynthetic(), gplib::C1DAnisoMTSynthData::GetData(), main(), gplib::PTensor1DMTObjective::SafeParallel(), and gplib::C1DMTObjective::SafeParallel().

double gplib::MTStation::GetLatitude ( ) const
inline

access funtion for Latitude

Definition at line 84 of file MTStation.h.

Referenced by PrintComponent().

double gplib::MTStation::GetLongitude ( ) const
inline

Definition at line 92 of file MTStation.h.

Referenced by PrintComponent().

const std::vector<MTTensor>& gplib::MTStation::GetMTData ( ) const
inline

Get the full vector of Tensor elements read only.

Definition at line 119 of file MTStation.h.

Referenced by main(), gplib::PTensorMTStation::operator=(), PrintComponent(), gplib::C1DMTObjective::SafeParallel(), WriteParameterToFile(), and WriteToFile().

std::string gplib::MTStation::GetName ( )
inline

Definition at line 104 of file MTStation.h.

Referenced by main(), gplib::HasSameName::operator()(), and PrintComponent().

MTStation & gplib::MTStation::operator= ( const MTStation source)

Definition at line 832 of file MTStation.cpp.

References Update().

void gplib::MTStation::Rotate ( const double  rotangle)

Given a rotation angle in radian this method rotates the impedance tensor and updates all derived quantities

Rotate(const double rotangle) rotates the impedance tensor by the angle rotangle in radian and updates all derived quantities

Definition at line 115 of file MTStation.cpp.

References Update().

void gplib::MTStation::Rotate ( void  )

Rotate to zero rotation angle.

Rotate() rotates the impedance tensor by the negative of the angle given in the rotangles field

Definition at line 126 of file MTStation.cpp.

References Update().

Referenced by GetData().

void gplib::MTStation::SetFrequencies ( const trealdata &  freqs)

Set the frequencies of the tensor elements, invalidates the previously stored impedance data, mainly for creating synthetic data.

Definition at line 144 of file MTStation.cpp.

Referenced by main(), gplib::PTensor1DMTObjective::SafeParallel(), and gplib::C1DMTObjective::SafeParallel().

void gplib::MTStation::SetLatitude ( double  lat)
inline

Definition at line 88 of file MTStation.h.

Referenced by gplib::MTStationList::GetData().

void gplib::MTStation::SetLongitude ( double  lon)
inline

Definition at line 96 of file MTStation.h.

Referenced by gplib::MTStationList::GetData().

std::vector<MTTensor>& gplib::MTStation::SetMTData ( )
inline

Get the full vector of Tensor elements for reading and writing.

Definition at line 124 of file MTStation.h.

Referenced by main(), and PrintComponent().

void gplib::MTStation::Update ( )
protected

Update all derived quantities.

The Update() method first updates all components individually and then recalculates all derived quantities that depend on more than one component

Definition at line 84 of file MTStation.cpp.

Referenced by gplib::C1DMTSynthData::CalcSynthetic(), gplib::C1DAnisoMTSynthData::GetData(), MTStation(), operator=(), Rotate(), and WriteAsMtt().

void gplib::MTStation::WriteAsEdi ( const std::string  filename)

Write data as edi (no functionality yet)

Definition at line 687 of file MTStation.cpp.

Referenced by WriteBack().

void gplib::MTStation::WriteAsJ ( const std::string  filename)
void gplib::MTStation::WriteAsMtt ( const std::string  filename)

Write data in goettingen .mtt format.

Definition at line 681 of file MTStation.cpp.

References Update().

Referenced by main(), WriteBack(), gplib::Aniso1DMTObjective::WriteData(), gplib::PTensor1DMTObjective::WriteData(), and gplib::Iso1DMTObjective::WriteData().

void gplib::MTStation::WriteBack ( )

Write data back in original format, with filename given by station name.

Definition at line 661 of file MTStation.cpp.

References edi, j, mtt, WriteAsEdi(), WriteAsJ(), and WriteAsMtt().

Referenced by WriteData().

void gplib::MTStation::WriteData ( const std::string  filename)
virtual

Definition at line 655 of file MTStation.cpp.

References WriteBack().

Friends And Related Function Documentation

friend class C1DMTSynthData
friend

Definition at line 146 of file MTStation.h.


The documentation for this class was generated from the following files: