#include <TimeRange.h>
Public Member Functions | |
double | end () const |
TimeRange | intersection (const TimeRange &tw) const |
bool | intersects (const TimeRange &tw) const |
int | lengthSamples (double deltaT) const |
double | lengthSeconds () const |
void | operator= (const TimeRange &o) |
void | printDebug () const |
void | scale (double center, double factor) |
void | setEnd (double m) |
void | setStart (double m) |
void | shift (double s) |
TimeRange | shifted (double s) const |
void | sort () |
double | start () const |
TimeRange () | |
TimeRange (const TimeRange &o) | |
TimeRange (double start, double end) | |
~TimeRange () |
GeopsyCore::TimeRange::TimeRange | ( | ) | [inline] |
Referenced by GeopsyCore::TimeRangeParameters::absoluteRange(), and shifted().
{ _start=0.0; _end=0.0; }
GeopsyCore::TimeRange::TimeRange | ( | const TimeRange & | o | ) | [inline] |
{operator=(o);}
GeopsyCore::TimeRange::TimeRange | ( | double | start, |
double | end | ||
) | [inline] |
GeopsyCore::TimeRange::~TimeRange | ( | ) | [inline] |
{}
double GeopsyCore::TimeRange::end | ( | ) | const [inline] |
Referenced by GeopsyCore::SparseTimeRange::add(), GeopsyCore::TimeRangeList::add(), GeopsyCore::TimeRangeList::addOne(), GeopsyCore::TaperDelegate::apply(), DampingResults::compute(), GeopsyCore::StationProcessSignals::copyOriginalSignal(), RealTimeArrayManager::createTasks(), GeopsyCore::Signal::cut(), GeopsyGui::ChronogramLayer::exportGaps(), GeopsyGui::TimeRangeParameterWidget::getParameters(), ManualPick::init(), GeopsyCore::SparseKeepSignal::intersection(), GeopsyCore::SparseTimeRange::intersection(), GeopsyCore::SparseTimeRange::invert(), GeopsyCore::SparseKeepSignal::keeps(), GeopsyCore::Signal::maximumAmplitudeAt(), RealTimeArrayManager::maximumTime(), StackWeights::misfit(), GeopsyGui::TimeRangeParameterWidget::on_toType_activated(), GeopsyCore::SparseKeepSignal::remove(), GeopsyCore::TimeRangeList::remove(), GeopsyCore::SparseTimeRange::remove(), GeopsyCore::SparseTimeRange::removeGaps(), Process::run(), GraphicWindow::setLimits(), RealTimeArrayManager::setMaximumTime(), GeopsyGui::TimeRangeParameterWidget::setParameters(), GeopsyCore::SparseKeepSignal::setSampling(), GeopsyCore::StationSignals::setSampling(), GraphicWindow::signalsUpdate(), TimeRange(), GeopsyCore::TimeRangeList::timeRange(), GeopsyCore::TimeRangeList::TimeRangeList(), GeopsyCore::TimeRangeList::toString(), GeopsyCore::TimeRangeParameters::toString(), PtMotionResults::updateSignals(), GeopsyGui::TimeWindow::xml_attributes(), and GeopsyCore::TimeRangeParameters::xml_attributes().
{return _end;}
TimeRange GeopsyCore::TimeRange::intersection | ( | const TimeRange & | tw | ) | const [inline] |
Return true if this window has an intersection with tw, tw is modified to match the intersection of this window and tw.
Referenced by GeopsyCore::Signal::cut(), and Process::run().
{ TimeRange res; if(tw._end < _start || tw._start > _end) return res; if(tw._start < _start && _start < tw._end) res._start=_start; else res._start=tw._start; if(tw._start < _end && _end < tw._end) res._end=_end; else res._end=tw._end; return res; }
bool GeopsyCore::TimeRange::intersects | ( | const TimeRange & | tw | ) | const [inline] |
Referenced by GeopsyCore::SparseTimeRange::hit(), and GeopsyCore::TimeRangeList::remove().
{ if(tw._end < _start || tw._start > _end) return false; return true; }
int GeopsyCore::TimeRange::lengthSamples | ( | double | deltaT | ) | const [inline] |
Referenced by TFAResults::compute(), GeopsyCore::Signal::cut(), and SpectrumStation::start().
{return (int)round(lengthSeconds()/deltaT);}
double GeopsyCore::TimeRange::lengthSeconds | ( | ) | const [inline] |
Referenced by GeopsyCore::SparseTimeRange::add(), GeopsyCore::Signal::add(), LinearFKActiveStationSignals::beginPreprocess(), TFAResults::compute(), DampingResults::compute(), GeopsyCore::StationProcessSignals::copyOriginalSignal(), GeopsyCore::Signal::copySamplesFrom(), GeopsyCore::Signal::correlation(), GeopsyCore::Signal::cut(), GeopsyGui::ChronogramLayer::exportGaps(), FKLoopTask::exportMax(), GeopsyCore::SparseTimeRange::removeBlocks(), Acquisition::run(), Process::run(), HRFKTimeWindows::setComponent(), FKTimeWindows::setComponent(), MonoStation::SpectrumStationSignals::setProcessed(), HVStation::start(), StructureStation::start(), MonoStation::AbstractTool::start(), LinearFKActiveStationSignals::taper(), GeopsyCore::TimeRangeList::toString(), and T0Correlation::value().
{return _end-_start;}
void GeopsyCore::TimeRange::operator= | ( | const TimeRange & | o | ) | [inline] |
{ _start=o._start; _end=o._end; }
void GeopsyCore::TimeRange::printDebug | ( | ) | const |
void GeopsyCore::TimeRange::scale | ( | double | center, |
double | factor | ||
) | [inline] |
{ _start=center+(_start-center)*factor; _end=center+(_end-center)*factor; }
void GeopsyCore::TimeRange::setEnd | ( | double | m | ) | [inline] |
Sets end time. No control between start and end is performed.
Referenced by GeopsyCore::SparseTimeRange::add(), LinearFKActiveStationSignals::beginPreprocess(), GeopsyCore::Signal::cut(), GeopsyGui::TimeRangeParameterWidget::getParameters(), ManualPick::init(), GeopsyCore::SparseTimeRange::intersection(), RealTimeArrayManager::RealTimeArrayManager(), GeopsyCore::SparseTimeRange::remove(), GeopsyCore::SparseTimeRange::removeGaps(), GraphicWindow::setLimits(), RealTimeArrayManager::setMaximumTime(), Acquisition::setSignals(), GeopsyCore::TimeRangeParameters::setValue(), GraphicWindow::signalsUpdate(), GeopsyCore::TimeRangeList::timeRange(), GeopsyGui::TimeWindow::xml_setAttributes(), and GeopsyCore::TimeRangeParameters::xml_setAttributes().
{ _end=m; }
void GeopsyCore::TimeRange::setStart | ( | double | m | ) | [inline] |
Sets start time. No control between start and end is performed.
Referenced by GeopsyCore::SparseTimeRange::add(), LinearFKActiveStationSignals::beginPreprocess(), GeopsyGui::SignalLayer::boundingRect(), GeopsyCore::Signal::cut(), GeopsyGui::TimeRangeParameterWidget::getParameters(), ManualPick::init(), GeopsyCore::SparseTimeRange::intersection(), RealTimeArrayManager::RealTimeArrayManager(), GeopsyCore::SparseTimeRange::remove(), GraphicWindow::setLimits(), Acquisition::setSignals(), GeopsyCore::TimeRangeParameters::setValue(), GraphicWindow::signalsUpdate(), GeopsyCore::TimeRangeList::timeRange(), GeopsyGui::TimeWindow::xml_setAttributes(), and GeopsyCore::TimeRangeParameters::xml_setAttributes().
{ _start=m; }
void GeopsyCore::TimeRange::shift | ( | double | s | ) | [inline] |
{ _start+=s; _end+=s; }
TimeRange GeopsyCore::TimeRange::shifted | ( | double | s | ) | const [inline] |
References TimeRange().
Referenced by GeopsyCore::Signal::taper().
{ return TimeRange(_start+s, _end+s); }
void GeopsyCore::TimeRange::sort | ( | ) | [inline] |
{
if(_start>_end) {
qSwap(_start, _end);
}
}
double GeopsyCore::TimeRange::start | ( | ) | const [inline] |
Referenced by GeopsyCore::SparseTimeRange::add(), GeopsyCore::TimeRangeList::add(), GeopsyCore::Signal::add(), GeopsyCore::TimeRangeList::addOne(), GeopsyCore::TaperDelegate::apply(), LinearFKActiveStationSignals::beginPreprocess(), TFAResults::compute(), DampingResults::compute(), GeopsyCore::StationProcessSignals::copyOriginalSignal(), GeopsyCore::Signal::copySamplesFrom(), GeopsyCore::Signal::correlation(), GeopsyCore::Signal::cut(), GeopsyGui::ChronogramLayer::exportGaps(), FKLoopTask::exportResults(), GeopsyGui::TimeRangeParameterWidget::getParameters(), ManualPick::init(), GeopsyCore::SparseKeepSignal::intersection(), GeopsyCore::SparseTimeRange::intersection(), GeopsyCore::SparseTimeRange::invert(), GeopsyCore::SparseKeepSignal::keeps(), GeopsyCore::Signal::maximumAmplitudeAt(), GeopsyCore::SubSignalPool::merge(), StackWeights::misfit(), GeopsyGui::TimeRangeParameterWidget::on_fromType_activated(), GeopsyCore::SparseKeepSignal::remove(), GeopsyCore::TimeRangeList::remove(), GeopsyCore::SparseTimeRange::remove(), GeopsyCore::SparseTimeRange::removeGaps(), Process::run(), GraphicWindow::setLimits(), GeopsyGui::TimeRangeParameterWidget::setParameters(), GeopsyCore::SparseKeepSignal::setSampling(), GeopsyCore::StationSignals::setSampling(), Acquisition::setSignals(), GraphicWindow::signalsUpdate(), RealTimeArrayManager::start(), TimeRange(), GeopsyCore::TimeRangeList::timeRange(), GeopsyCore::TimeRangeList::TimeRangeList(), GeopsyCore::TimeRangeList::toString(), GeopsyCore::TimeRangeParameters::toString(), PtMotionResults::updateSignals(), T0Correlation::value(), GeopsyGui::TimeWindow::xml_attributes(), and GeopsyCore::TimeRangeParameters::xml_attributes().
{return _start;}