MTStation Class Reference
[MT data analysis, processing and inversion]

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

#include <MTStation.h>

Inheritance diagram for MTStation:

Inheritance graph
[legend]

List of all members.

Public Types

enum  tmtdataformat {
  unknown, mtt, j, edi,
  pek
}

Public Member Functions

void AssignAll (const int nfreq)
void Rotate (const double rotangle)
void Rotate (void)
 Rotate to zero rotation angle.
trealdata GetFrequencies () const
 return the available frequencies in a single vector
void SetFrequencies (const trealdata &freqs)
 Set the frequencies of the tensor elements, invalidates the previously stored impedance data, mainly for creating synthetic data.
double GetLatitude () const
 access funtion for Latitude
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
const std::vector< MTTensor > & GetMTData () const
 Get the full vector of Tensor elements read only.
std::vector< MTTensor > & SetMTData ()
 Get the full vector of Tensor elements for reading and writing.
virtual MTStationclone () const
 for parallel runs we need to make a copy of the object and its derived classes
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
virtual void GetData ()
virtual void WriteData (const std::string filename)
void WriteAsMtt (const std::string filename)
 Write data in goettingen .mtt format.
void WriteAsEdi (const std::string filename)
 Write data as edi (no functionality yet).
void WriteAsJ (const std::string filename)
 Write data to j-file.
void WriteBack ()
 Write data back in original format, with filename given by station name.

Protected Member Functions

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

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 14 of file MTStation.h.


Member Enumeration Documentation

Enumerator:
unknown 
mtt 
j 
edi 
pek 

Definition at line 17 of file MTStation.h.


Constructor & Destructor Documentation

MTStation::MTStation (  ) 

Definition at line 38 of file MTStation.cpp.

Referenced by clone().

MTStation::MTStation ( const MTStation old  ) 

Definition at line 626 of file MTStation.cpp.

References Update().

MTStation::MTStation ( const int  size  ) 

Definition at line 53 of file MTStation.cpp.

References Assign().

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

Definition at line 47 of file MTStation.cpp.

References GetData().

MTStation::~MTStation (  )  [virtual]

Definition at line 43 of file MTStation.cpp.


Member Function Documentation

void MTStation::Assign ( const int  nfreq  )  [protected]

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

Definition at line 63 of file MTStation.cpp.

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

void MTStation::AssignAll ( const int  nfreq  ) 

Definition at line 59 of file MTStation.cpp.

References Assign().

Referenced by main().

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

direct acces to a tensor at a given index

Definition at line 100 of file MTStation.h.

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

virtual MTStation* MTStation::clone (  )  const [inline, virtual]

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

Reimplemented in C1DAnisoMTSynthData, and C1DMTSynthData.

Definition at line 115 of file MTStation.h.

References MTStation().

double MTStation::GetAzimuth (  )  const [inline]

Definition at line 94 of file MTStation.h.

virtual void MTStation::GetData (  )  [inline, virtual]

Reimplemented in C1DAnisoMTSynthData, and C1DMTSynthData.

Definition at line 127 of file MTStation.h.

Referenced by MTStation().

void MTStation::GetData ( const std::string  filename  )  [virtual]

read in data from file, determines format by ending

Definition at line 411 of file MTStation.cpp.

References edi, j, mtt, pek, Rotate(), and unknown.

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

double MTStation::GetElevation (  )  const [inline]

Definition at line 86 of file MTStation.h.

trealdata 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 125 of file MTStation.cpp.

References MTTensor::GetFrequency().

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

double MTStation::GetLatitude (  )  const [inline]

access funtion for Latitude

Definition at line 70 of file MTStation.h.

Referenced by PrintComponent().

double MTStation::GetLongitude (  )  const [inline]

Definition at line 78 of file MTStation.h.

Referenced by PrintComponent().

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

Get the full vector of Tensor elements read only.

Definition at line 105 of file MTStation.h.

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

std::string MTStation::GetName (  )  [inline]

Definition at line 90 of file MTStation.h.

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

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

Definition at line 635 of file MTStation.cpp.

References azimuth, dataformat, elevation, latitude, longitude, MTData, name, TFData, and Update().

void MTStation::Rotate ( void   ) 

Rotate to zero rotation angle.

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

Definition at line 115 of file MTStation.cpp.

References Update().

Referenced by GetData().

void 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 104 of file MTStation.cpp.

References Update().

void 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 133 of file MTStation.cpp.

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

void MTStation::SetLatitude ( double  lat  )  [inline]

Definition at line 74 of file MTStation.h.

Referenced by MTStationList::GetData().

void MTStation::SetLongitude ( double  lon  )  [inline]

Definition at line 82 of file MTStation.h.

Referenced by MTStationList::GetData().

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

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

Definition at line 110 of file MTStation.h.

Referenced by main(), and PrintComponent().

void 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 73 of file MTStation.cpp.

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

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

Write data as edi (no functionality yet).

Definition at line 484 of file MTStation.cpp.

Referenced by WriteBack().

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

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

Write data in goettingen .mtt format.

Definition at line 478 of file MTStation.cpp.

References Update().

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

void MTStation::WriteBack (  ) 

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

Definition at line 458 of file MTStation.cpp.

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

Referenced by WriteData().

void MTStation::WriteData ( const std::string  filename  )  [virtual]

Definition at line 452 of file MTStation.cpp.

References WriteBack().


Friends And Related Function Documentation

friend class C1DMTSynthData [friend]

Definition at line 132 of file MTStation.h.


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

Generated on Tue Aug 4 16:04:20 2009 for GPLIB++ by  doxygen 1.5.8