Public Types | Public Slots | Public Member Functions
Results Class Reference

Brief description of class still missing. More...

#include <Results.h>

Inheritance diagram for Results:
SciFigs::GraphicSheet SciFigs::GraphicSheetMenu QGpGuiTools::PropertyContext QGpGuiTools::PropertyItem QGpCoreTools::XMLClass

List of all members.

Public Types

enum  CurveType {
  Dispersion, DispersionGrid, Ellipticity, ShAmplification,
  MagnetoTelluric
}

Public Slots

void exportDAT (QString fileName=QString::null)
void setAutomaticLimits (bool a)
void setThreshold ()

Public Member Functions

void addBackground (GeophysicalModel *m)
void calculateBackground ()
ResultsThreadcalculator () const
void clearBackground ()
GeophysicalModelcreateModel () const
void resizeEvent (QResizeEvent *)
 Results (const Acquisition *acq)
 Results (QWidget *parent=0)
bool setCurveType (CurveType curveType, int &argc, char **argv)
void setForeground (GeophysicalModel *m)
 ~Results ()
 ~Results ()

Detailed Description

Brief description of class still missing.

Full description of class still missing


Member Enumeration Documentation

Enumerator:
Dispersion 
DispersionGrid 
Ellipticity 
ShAmplification 
MagnetoTelluric 

Constructor & Destructor Documentation

Results::Results ( const Acquisition acq)

Description of constructor still missing

References SciFigs::LineLayer::addLine(), Acquisition::apparentResistivityHistogram(), Acquisition::currentHistogram(), Acquisition::fileName(), SciFigs::HistogramLayer::set(), SciFigs::PlotLine2D::setCurve(), TRACE, Acquisition::variabilityHistogram(), Acquisition::varVoltageCurve(), and Acquisition::voltageHistogram().

  : GraphicSheetMenu(0)
{
  TRACE;
  setWindowTitle("evabem ["+acq->fileName()+"]");

  Settings::getSize(this, "Results");
  createObjects();
  addActions();

  _acquisition=acq;

  _currentLayer->set(_acquisition->currentHistogram());
  setLimits(_currentLayer);
  _voltageLayer->set(_acquisition->voltageHistogram());
  setLimits(_voltageLayer);
  _variabilityLayer->set(_acquisition->variabilityHistogram());
  setLimits(_variabilityLayer);
  _apparentResistivityLayer->set(_acquisition->apparentResistivityHistogram());
  setLimits(_apparentResistivityLayer);
  PlotLine2D * l=static_cast<PlotLine2D *>(_variabilityVoltageLayer->addLine());
  l->setCurve(_acquisition->varVoltageCurve());
}

Description of destructor still missing

References TRACE.

{
  TRACE;
}
Results::Results ( QWidget *  parent = 0)

Description of constructor still missing

References TRACE.

    : GraphicSheet(parent)
{
  TRACE;

  _backgroundThread=0;
  _foregroundThread=0;
  _automaticLimits=true;

  setWindowTitle("Results");
}

Member Function Documentation

References ResultsThread::addModel(), and TRACE.

Referenced by MainWindow::addBackground(), and MainWindow::setBackground().

{
  TRACE;
  _backgroundThread->addModel(m);
  _backgroundModels.append(m);
}

References ResultsThread::modelDeepUpdate(), and ResultsThread::setModelLimits().

Referenced by MainWindow::setBackground().

{
  calculate(_backgroundThread, _backgroundModels);
  if(_automaticLimits) {
    _backgroundThread->setModelLimits();
  }
  _backgroundThread->modelDeepUpdate();
}
ResultsThread* Results::calculator ( ) const [inline]

Referenced by MainWindow::scan().

{return _foregroundThread;}

References ResultsThread::clear(), ResultsThread::modelDeepUpdate(), and TRACE.

Referenced by MainWindow::setBackground().

{
  TRACE;
  _backgroundThread->clear();
  _backgroundModels.clear();
  _backgroundThread->modelDeepUpdate();
}

References ResultsThread::createModel(), and TRACE.

Referenced by MainWindow::setBackground().

{
  TRACE;
  return _backgroundThread->createModel();
}
void Results::exportDAT ( QString  fileName = QString::null) [slot]

References MSG_ID, QGpCoreTools::tr(), TRACE, and Acquisition::write().

Referenced by main().

{
  TRACE;
  if(fileName.isEmpty()) {
    fileName=Message::getSaveFileName(tr("Export data"), tr("Res2dinv dat file (*.dat)"));
    if(fileName.isEmpty()) {
      return;
    }
  }
  QFile f(fileName);
  if(!f.open(QIODevice::WriteOnly)) {
    Message::warning(MSG_ID, tr("Export data"), tr("Cannot open file %1 for writing").arg(fileName), Message::cancel());
    return;
  }
  QTextStream s(&f);
  _acquisition->write(s, 1e-3*voltageThreshold(), variabilityThreshold());
}
void Results::resizeEvent ( QResizeEvent *  )

References TRACE.

{
  TRACE;
  Settings::setSize(this, "Results");
}
void Results::setAutomaticLimits ( bool  a) [slot]

References ResultsThread::setAutomaticLimits(), and TRACE.

{
  TRACE;
  _automaticLimits=a;
  _backgroundThread->setAutomaticLimits(a);
  _foregroundThread->setAutomaticLimits(a);
}
bool Results::setCurveType ( CurveType  curveType,
int &  argc,
char **  argv 
)

Set curve type and fetch related arguments in argv

References ResultsThread::clone(), DispersionGrid, ResultsThread::initModelGraphs(), ResultsThread::initResultsGraphs(), MagnetoTelluric, ResultsThread::setParameters(), and TRACE.

Referenced by LiveModelReader::setOptions().

{
  TRACE;
  switch(curveType) {
  case Dispersion:
    _backgroundThread=new DispersionThread(this);
    break;
  case DispersionGrid:
    _backgroundThread=new DispersionGridThread(this);
    break;
  case Ellipticity:
    _backgroundThread=new EllipticityThread(this);
    break;
  case ShAmplification:
    _backgroundThread=new ShAmplificationThread(this);
    break;
  case MagnetoTelluric:
    _backgroundThread=new MagnetoTelluricThread(this);
    break;
  }

  if(!_backgroundThread->setParameters(argc, argv)) {
    return false;
  }
  _foregroundThread=_backgroundThread->clone();

  _backgroundThread->initModelGraphs(this);
  _backgroundThread->setObjectName("background");

  _foregroundThread->initModelGraphs(*_backgroundThread);
  _foregroundThread->setObjectName("foreground");

  _backgroundThread->initResultsGraphs(this);
  _foregroundThread->initResultsGraphs(*_backgroundThread);
  return true;
}

References ResultsThread::modelDeepUpdate(), ResultsThread::setModel(), ResultsThread::setModelLimits(), and TRACE.

{
  TRACE;
  _foregroundThread->setModel(m);
  QList<GeophysicalModel *> mList;
  mList.append(m);
  calculate(_foregroundThread, mList);
  if(_automaticLimits) {
    _backgroundThread->setModelLimits();
  }
  _backgroundThread->modelDeepUpdate();
}
void Results::setThreshold ( ) [slot]

References SciFigs::ParallelBands::band(), SciFigs::AxisWindow::deepUpdate(), SciFigs::GraphContentLayer::graph(), SciFigs::GraphContentLayer::setOpacity(), SciFigs::ParallelBand::setValue(), Thresholds::setVariability(), Thresholds::setVoltage(), TRACE, Thresholds::variability(), and Thresholds::voltage().

{
  TRACE;
  Thresholds * d=new Thresholds(this);
  Settings::getWidget(d);
  d->setVariability(variabilityThreshold());
  d->setVoltage(voltageThreshold());
  if(d->exec()==QDialog::Accepted) {
    Settings::setWidget(d);
    double var=d->variability();
    if(var>0.0) {
      _thresholdVariabilityVoltageLayer[1]->setOpacity(1.0);
      _thresholdVariabilityLayer->setOpacity(1.0);
      _thresholdVariabilityVoltageLayer[1]->band(0).setValue(var);
      _thresholdVariabilityLayer->band(0).setValue(var);
    } else {
      _thresholdVariabilityVoltageLayer[1]->setOpacity(0.0);
      _thresholdVariabilityLayer->setOpacity(0.0);
    }
    double volt=d->voltage();
    if(volt>0.0) {
      _thresholdVariabilityVoltageLayer[0]->setOpacity(1.0);
      _thresholdVoltageLayer->setOpacity(1.0);
      _thresholdVariabilityVoltageLayer[0]->band(0).setValue(volt);
      _thresholdVoltageLayer->band(0).setValue(volt);
    } else {
      _thresholdVariabilityVoltageLayer[0]->setOpacity(0.0);
      _thresholdVoltageLayer->setOpacity(0.0);
    }
    _variabilityVoltageLayer->graph()->deepUpdate();
    _variabilityLayer->graph()->deepUpdate();
    _voltageLayer->graph()->deepUpdate();
  }
  delete d;
}

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