Public Member Functions
LinearFKActiveArrayStations Class Reference

Brief description of class still missing. More...

#include <LinearFKActiveArrayStations.h>

Inheritance diagram for LinearFKActiveArrayStations:
ArrayCore::ArrayStations GeopsyCore::StationList

List of all members.

Public Member Functions

bool addSignals (SubSignalPool *subPool)
void addTimeWindow (TimeRangeParameters &p)
void beginPreprocess (int winIndex, double smoothingFactor)
void clearTimeWindows ()
void endPreprocess ()
bool isSelected (int stationIndex) const
bool lockSamples ()
QString name ()
void normalize (const NormalizationParameters &p)
double propagationAzimuth ()
int selectedCount () const
void selectStations (double minDist, double maxDist)
void setRelativeCoordinates ()
const QList< FKStationSignals * > stations () const
void taper (const TimeRangeParameters &range, const TaperParameters &param)
TimeWindowListtimeWindows ()
void unlockSamples ()
 ~LinearFKActiveArrayStations ()

Detailed Description

Brief description of class still missing.

Full description of class still missing


Constructor & Destructor Documentation

{
  qDeleteAll(_stations);
}

Member Function Documentation

References GeopsyCore::StationList::hasAllComponents(), ArrayCore::ArrayStations::hasCompatibleStations(), QGpCoreTools::log(), MSG_ID, and QGpCoreTools::tr().

Referenced by ToolLinearFKActive::addArray().

{
  QString log;
  if( !ArrayStations::addSignals(subPool, &log) ||
       !hasAllComponents(&log) ||
       !hasCompatibleStations(&log)) {
    Message::warning(MSG_ID, tr("Checking stations"), log, Message::cancel());
    return false;
  }
  for(iterator it=begin(); it!= end(); it++ ) {
    _stations.append(new LinearFKActiveStationSignals(*it));
  }
  return true;
}

References GeopsyCore::TimeRangeParameters::absoluteRange(), GeopsyGui::TimeWindowList::addOne(), QGpCoreTools::endl(), QGpCoreTools::tr(), and TRACE.

{
  TRACE;
  Signal * sig=first()->firstValidSignal();
  if(sig) {
    _timeWindows.addOne(p.absoluteRange(sig));
  } else {
    App::stream() << tr("Cannot add time window to an empty array") << endl;
  }
}
void LinearFKActiveArrayStations::beginPreprocess ( int  winIndex,
double  smoothingFactor 
)

References GeopsyGui::TimeWindowList::at(), LinearFKActiveStationSignals::beginPreprocess(), ArrayCore::FKStationSignals::isSelected(), and TRACE.

{
  TRACE;
  const TimeRange& tw=_timeWindows.at(winIndex);
  for(QList<LinearFKActiveStationSignals *>::iterator it=_stations.begin(); it!= _stations.end(); it++ ) {
    LinearFKActiveStationSignals * s=*it;
    if(s->isSelected()) s->beginPreprocess(tw, smoothingFactor);
  }
}

References GeopsyCore::TimeRangeList::clear().

{_timeWindows.clear();}

References LinearFKActiveStationSignals::endPreprocess(), ArrayCore::FKStationSignals::isSelected(), and TRACE.

{
  TRACE;
  for(QList<LinearFKActiveStationSignals *>::iterator it=_stations.begin(); it!= _stations.end(); it++ ) {
    LinearFKActiveStationSignals * s=static_cast<LinearFKActiveStationSignals *>(*it);
    if(s->isSelected()) s->endPreprocess();
  }
}
bool LinearFKActiveArrayStations::isSelected ( int  stationIndex) const
{
  return _stations.at(stationIndex)->isSelected();
}

lock process signals for all stations of the array. If successful, you must call UNLOCK_SAMPLES.

References QGpCoreTools::endl(), ArrayCore::FKStationSignals::isSelected(), GeopsyCore::StationProcessSignals::lockSamples(), QGpCoreTools::tr(), and TRACE.

{
  TRACE;
  LinearFKActiveStationSignals * stat;
  int n=count();
  for(int i=0; i<n; i++ ) {
    stat=_stations.at(i);
    if(stat->isSelected() && !stat->lockSamples()) {
      for(i--;i>=0;i--) _stations.at(i)->unlockSamples();
      App::stream() << tr("cannot allocate all signals, increase memory buffer size\n") << endl;
      return false;
    }
  }
  return true;
}

References QGpCoreTools::tr(), TRACE, QGpCoreTools::Point2D::x(), QGpCoreTools::Point2D::y(), and QGpCoreTools::Point::z().

{
  TRACE;
  const Point& p=first()->source();
  return tr("Shot at (%1, %2, %3), time=%4")
       .arg(p.x()).arg(p.y()).arg(p.z())
       .arg(first()->timeReference().toString("yyyy-MM-dd hh:mm:ss "));
}

References ArrayCore::FKStationSignals::isSelected(), LinearFKActiveStationSignals::normalize(), and TRACE.

{
  TRACE;
  for(QList<LinearFKActiveStationSignals *>::iterator it=_stations.begin(); it!= _stations.end(); it++ ) {
    LinearFKActiveStationSignals * s=*it;
    if(s->isSelected()) s->normalize(p);
  }
}

Calculate average azimuth from source

References TRACE.

{
  TRACE;
  double sum=0.0;
  int n=0;
  for(iterator it=begin(); it!= end(); it++ ) {
    if((*it)->sourceReceiverDistance()>0.0) {
      sum += (*it)->sourceReceiverAzimuth();
      n++;
    }
  }
  return sum/(double) n;
}

References TRACE.

{
  TRACE;
  int c=0;
  for(int i=0; i<_stations.count(); i++) {
    if(_stations.at(i)->isSelected()) {
      c++;
    }
  }
  return c;
}
void LinearFKActiveArrayStations::selectStations ( double  minDist,
double  maxDist 
)

References TRACE.

{
  TRACE;
  for(int i=0; i<_stations.count(); i++ ) {
    double d=at(i)->sourceReceiverDistance();
    _stations.at(i)->select(d>=minDist && d<=maxDist);
  }
}

Get array central point The center is usefull to use relative coordinates and hence to avoid big number computations

Reimplemented from ArrayCore::ArrayStations.

References ArrayCore::ArrayStations::relativeCoordinates(), and TRACE.

Referenced by ToolLinearFKActive::addArray().

{
  TRACE;
  ArrayStations::setRelativeCoordinates();
  for(int i=0; i<_stations.count(); i++ ) {
    _stations.at(i)->setRelativeCoordinates(relativeCoordinates(i));
  }
}
{
  QList<FKStationSignals *> s;
  for(QList<LinearFKActiveStationSignals *>::const_iterator it=_stations.begin(); it!=_stations.end(); it++) {
    s.append(static_cast<FKStationSignals *>(*it));
  }
  return s;
}
void LinearFKActiveArrayStations::taper ( const TimeRangeParameters range,
const TaperParameters param 
)

References ArrayCore::FKStationSignals::isSelected(), LinearFKActiveStationSignals::taper(), and TRACE.

{
  TRACE;
  for(QList<LinearFKActiveStationSignals *>::iterator it=_stations.begin(); it!= _stations.end(); it++ ) {
    LinearFKActiveStationSignals * s=*it;
    if(s->isSelected()) s->taper(range, param);
  }
}
{return &_timeWindows;}

Can be called only after a successful LOCK_SAMPLES.

References ArrayCore::FKStationSignals::isSelected(), TRACE, and GeopsyCore::StationProcessSignals::unlockSamples().

{
  TRACE;
  for(QList<LinearFKActiveStationSignals *>::iterator it=_stations.begin();it!=_stations.end();++it) {
    LinearFKActiveStationSignals * stat=*it;
    if(stat->isSelected()) stat->unlockSamples();
  }
}

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