#include <TimeSeriesComponent.h>

Public Types | |
| typedef std::vector< double > ::iterator | tdatait |
Public Member Functions | |
| std::vector< double > & | GetData () |
| Access for data vector, for ease of use and efficiency we return a reference. | |
| const std::vector< double > & | GetData () const |
| gplib::rvec | GetUblasData () |
| For some methods we prefer to get the data as a ublas vector, we return a copy. | |
| double | GetSamplerate () const |
| Return samplerate in Hz. | |
| void | SetSamplerate (const double rate) |
| Set sampling rate in Hz. | |
| void | SetDt (const double dt) |
| Set delta t in s. | |
| double | GetDt () const |
| Return dt in s. | |
| std::string | GetName () const |
| Return name of the component. | |
| void | SetName (const std::string &n) |
| Modify name of the component. | |
| void | Resample (const double newdt) |
| resample to a new dt by interpolation | |
| void | ShiftStart (const int npts) |
| Shift the start of the recording by npts points. | |
| void | ShiftEnd (const int npts) |
| Shift the end of the recording by npts points. | |
| TimeSeriesComponent & | operator= (const TimeSeriesComponent &source) |
| TimeSeriesComponent & | operator*= (const double factor) |
| Multiply each element of the time series by a constant factor. | |
| TimeSeriesComponent & | operator/= (const double numerator) |
| Devide each element of the time series by a constant number. | |
| TimeSeriesComponent & | operator+= (const double shift) |
| Add a constant shift to each element of the time series. | |
| TimeSeriesComponent & | operator-= (const double shift) |
| Substract a constant shift from each element of the time series. | |
| TimeSeriesComponent & | operator+= (const TimeSeriesComponent &other) |
| Add two time series point by point and store the result in the current object. | |
| TimeSeriesComponent & | operator-= (const TimeSeriesComponent &other) |
| Substract two time series point by point and store the result in the current object. | |
| TimeSeriesComponent (const TimeSeriesComponent &source) | |
| TimeSeriesComponent () | |
| virtual | ~TimeSeriesComponent () |
This is the base class for both MT and Seismic data, all common functionality will be in this class. Furthermore all functions should be implemented to use this class unless they need functionality specific to the method. We inherit from ring_operators to provide a set of useful mathematical operators with minimum implementation
Definition at line 19 of file TimeSeriesComponent.h.
| typedef std::vector<double>::iterator TimeSeriesComponent::tdatait |
Definition at line 32 of file TimeSeriesComponent.h.
| TimeSeriesComponent::TimeSeriesComponent | ( | const TimeSeriesComponent & | source | ) |
Definition at line 18 of file TimeSeriesComponent.cpp.
| TimeSeriesComponent::TimeSeriesComponent | ( | ) |
Definition at line 9 of file TimeSeriesComponent.cpp.
| TimeSeriesComponent::~TimeSeriesComponent | ( | ) | [virtual] |
Definition at line 14 of file TimeSeriesComponent.cpp.
| const std::vector<double>& TimeSeriesComponent::GetData | ( | ) | const [inline] |
Definition at line 38 of file TimeSeriesComponent.h.
| std::vector<double>& TimeSeriesComponent::GetData | ( | ) | [inline] |
Access for data vector, for ease of use and efficiency we return a reference.
Definition at line 34 of file TimeSeriesComponent.h.
Referenced by ApplyFilter::AddInputChannel(), ApplyFilter::AddReferenceChannel(), RecCalc::CalcRecData(), MultiRecCalc::CalcRecData(), CleanComponent(), MoveoutCorrection::DoCorrection(), TimeSeries::erase(), LemiTsFormat::GetData(), CsvFormat::GetData(), BirrpAsciiFormat::GetData(), init(), main(), Normalize(), C1DRecObjective::PostParallel(), Restore(), TimeSeries::Size(), SeismicDataComp::WriteAsAscii(), SeismicDataComp::WriteAsSac(), MtuFormat::WriteData(), CsvFormat::WriteData(), and BirrpAsciiFormat::WriteData().
| double TimeSeriesComponent::GetDt | ( | ) | const [inline] |
Return dt in s.
Definition at line 62 of file TimeSeriesComponent.h.
Referenced by RecCalc::CalcRecData(), MoveoutCorrection::DoCorrection(), main(), Resample(), SeismicDataComp::WriteAsAscii(), and SeismicDataComp::WriteAsSac().
| std::string TimeSeriesComponent::GetName | ( | ) | const [inline] |
Return name of the component.
Definition at line 67 of file TimeSeriesComponent.h.
Referenced by main(), and SeismicDataComp::WriteBack().
| double TimeSeriesComponent::GetSamplerate | ( | ) | const [inline] |
Return samplerate in Hz.
Definition at line 47 of file TimeSeriesComponent.h.
Referenced by TimeSeries::GetSamplerate().
| TimeSeriesComponent & TimeSeriesComponent::operator*= | ( | const double | factor | ) |
Multiply each element of the time series by a constant factor.
Definition at line 103 of file TimeSeriesComponent.cpp.
Referenced by operator/=().
| TimeSeriesComponent & TimeSeriesComponent::operator+= | ( | const TimeSeriesComponent & | other | ) |
Add two time series point by point and store the result in the current object.
Definition at line 122 of file TimeSeriesComponent.cpp.
References data.
| TimeSeriesComponent & TimeSeriesComponent::operator+= | ( | const double | shift | ) |
Add a constant shift to each element of the time series.
Definition at line 116 of file TimeSeriesComponent.cpp.
Referenced by operator-=().
| TimeSeriesComponent & TimeSeriesComponent::operator-= | ( | const TimeSeriesComponent & | other | ) |
Substract two time series point by point and store the result in the current object.
Definition at line 133 of file TimeSeriesComponent.cpp.
References data.
| TimeSeriesComponent & TimeSeriesComponent::operator-= | ( | const double | shift | ) |
Substract a constant shift from each element of the time series.
Definition at line 127 of file TimeSeriesComponent.cpp.
References operator+=().
| TimeSeriesComponent & TimeSeriesComponent::operator/= | ( | const double | numerator | ) |
Devide each element of the time series by a constant number.
Definition at line 109 of file TimeSeriesComponent.cpp.
References operator*=().
| TimeSeriesComponent & TimeSeriesComponent::operator= | ( | const TimeSeriesComponent & | source | ) |
Definition at line 60 of file TimeSeriesComponent.cpp.
References data, name, samplerate, and starttime.
| void TimeSeriesComponent::Resample | ( | const double | newdt | ) |
resample to a new dt by interpolation
Definition at line 73 of file TimeSeriesComponent.cpp.
References GetDt().
| void TimeSeriesComponent::SetDt | ( | const double | dt | ) | [inline] |
Set delta t in s.
Definition at line 57 of file TimeSeriesComponent.h.
Referenced by RecCalc::CalcRecData(), and MultiRecCalc::CalcRecData().
| void TimeSeriesComponent::SetName | ( | const std::string & | n | ) | [inline] |
Modify name of the component.
Definition at line 72 of file TimeSeriesComponent.h.
Referenced by SeismicDataComp::ReadData(), and TimeSeries::TimeSeries().
| void TimeSeriesComponent::SetSamplerate | ( | const double | rate | ) | [inline] |
Set sampling rate in Hz.
Definition at line 52 of file TimeSeriesComponent.h.
Referenced by LemiTsFormat::GetData(), and BirrpAsciiFormat::GetData().
| void TimeSeriesComponent::ShiftEnd | ( | const int | npts | ) |
Shift the end of the recording by npts points.
if npts < 0 we cut abs(npts) from the end, otherwise we add npts 0s at the end
Definition at line 46 of file TimeSeriesComponent.cpp.
| void TimeSeriesComponent::ShiftStart | ( | const int | npts | ) |
Shift the start of the recording by npts points.
if npts < 0 we cut abs(npts) from the beginning, otherwise we add npts 0s at the beginning this will also adjust the starttime accordingly
Definition at line 26 of file TimeSeriesComponent.cpp.
1.5.8