All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines
Public Member Functions | Static Public Member Functions
MonoStation::SpectrumStationSignals Class Reference

Brief description of class still missing. More...

#include <SpectrumStationSignals.h>

Inheritance diagram for MonoStation::SpectrumStationSignals:
GeopsyCore::StationProcessSignals HVStationSignals StructureStationProcessSignals

List of all members.

Public Member Functions

virtual void setProcessed (const TimeRange &tw, AbstractParameters *param)
 SpectrumStationSignals (const StationSignals *originalSignals)

Static Public Member Functions

static bool organizeSubPool (SubSignalPool *subPool)

Detailed Description

Brief description of class still missing.

Full description of class still missing


Constructor & Destructor Documentation

    : StationProcessSignals(originalSignals) {}

Member Function Documentation

The signals can be in any order on entry. First we sort the subpool by name+receiver coordinates, component, t0. We test if sampling rate and t0 are compatible internally for each station (may be different from other stations).

References GeopsyCore::SubSignalPool::begin(), GeopsyCore::Signal::component(), GeopsyCore::DoubleSignal::deltaT(), GeopsyCore::SubSignalPool::end(), QGpCoreTools::endl(), GeopsyCore::Signal::id(), MSG_ID, GeopsyCore::Signal::name(), GeopsyCore::Signal::receiver(), GeopsyCore::SubSignalPool::sort(), GeopsyCore::Signal::t0(), QGpCoreTools::tr(), and TRACE.

{
  TRACE;
  // Sorting by name+receiver coordinates, component and t0
  SortKey::clear();
  SortKey::add(MetaDataFactory::Name);
  SortKey::add(MetaDataFactory::ReceiverX);
  SortKey::add(MetaDataFactory::ReceiverY);
  SortKey::add(MetaDataFactory::Component);
  SortKey::add(MetaDataFactory::T0);
  subPool->sort();
  // Consistency checks : deltaT and T0 compatibility
  SubSignalPool::iterator itPool=subPool->begin();
  Signal * sig=*itPool;
  QString refName=sig->name();
  Point refRec=sig->receiver();
  Signal::Components refComp=sig->component();
  double refDt=sig->deltaT();
  double refT0=sig->t0();
  for( ++itPool;itPool!=subPool->end();++itPool) {
    sig=*itPool;
    if(refName!=sig->name() || refRec!=sig->receiver() || refComp!=sig->component()) {
      refName=sig->name();
      refRec=sig->receiver();
      refComp=sig->component();
      refDt=sig->deltaT();
      refT0=sig->t0();
    } else {
      if(refDt!=sig->deltaT()) {
        Message::warning(MSG_ID, tr("Creating array"),
                              tr("The samling rate must be the same for all components." ),
                              Message::cancel());
        return false;
      }
      double ndeltaT0=fabs(refT0 - sig->t0())/refDt;
      if(ndeltaT0 - floor(ndeltaT0 + 0.5) > 0.01 * refDt) {
        App::stream() << tr("The differences between t0s is not a multiple of the "
                            "sampling period. Found with signal ID %1.").arg(sig->id()) << endl;
      }
    }
  }
  return true;
}

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines