version  0.0.1
Defines the C++ API for MsPASS
Public Member Functions | Public Attributes | List of all members
mspass::algorithms::TimeWindow Class Reference

Defines a time window. More...

#include <TimeWindow.h>

Public Member Functions

 TimeWindow ()
 
 TimeWindow (const double ts, const double te)
 
 TimeWindow (const TimeWindow &parent)
 
TimeWindowoperator= (const TimeWindow &parent)
 
TimeWindow shift (const double tshift) const
 
double length ()
 

Public Attributes

double start
 
double end
 

Detailed Description

Defines a time window.

Time windows are a common concept in time series analysis and seismology in particular. The object definition here has no concept of a time standard. It simply defines an interval in terms of a pair of real numbers.

Constructor & Destructor Documentation

◆ TimeWindow() [1/2]

mspass::algorithms::TimeWindow::TimeWindow ( )
inline

Default constructor.

27 {start=0.0;end=1.0e99;};
double start
Definition: TimeWindow.h:19
double end
Definition: TimeWindow.h:23

References end, and start.

◆ TimeWindow() [2/2]

mspass::algorithms::TimeWindow::TimeWindow ( const double  ts,
const double  te 
)
inline

Parameterized constructor.

Parameters
ts- start time
te- end time
33 {start=ts;end=te;};

References end, and start.

Member Function Documentation

◆ length()

double mspass::algorithms::TimeWindow::length ( )
inline

Returns the window length

62  {
63  return(end-start);
64  };

References end, and start.

◆ shift()

TimeWindow mspass::algorithms::TimeWindow::shift ( const double  tshift) const
inline

Returns a new time window translated by tshift argument.

52  {
53  TimeWindow newwindow(*this);
54  newwindow.start+=tshift;
55  newwindow.end += tshift;
56  return(newwindow);
57  }
TimeWindow()
Definition: TimeWindow.h:27

References end, and start.

Member Data Documentation

◆ end

double mspass::algorithms::TimeWindow::end

End time of the window.

◆ start

double mspass::algorithms::TimeWindow::start

Start time of the window.


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