1#ifndef _BASICTIMESERIES_H_
2#define _BASICTIMESERIES_H_
3#include <boost/archive/text_iarchive.hpp>
4#include <boost/archive/text_oarchive.hpp>
62 double time(
const int i)
const {
63 return (
mt0 +
mdt *
static_cast<double>(i));
78 return (
mt0 + (
static_cast<double>(
nsamp) - 1.0) *
mdt);
82 bool shifted()
const {
return t0shift_is_valid; };
111 t0shift_is_valid =
true;
123 virtual void ator(
const double tshift);
140 virtual void shift(
const double dt);
153 double dt()
const {
return this->
mdt; };
161 bool time_is_relative()
const {
174 double t0()
const {
return this->
mt0; };
197 virtual void set_dt(
const double sample_interval) {
mdt = sample_interval; };
269 bool t0shift_is_valid;
275 friend boost::serialization::access;
276 template <
class Archive>
277 void serialize(Archive &ar,
const unsigned int version) {
283 ar & t0shift_is_valid;
Base class for time series objects.
Definition BasicTimeSeries.h:35
BasicTimeSeries()
Definition BasicTimeSeries.cc:45
size_t nsamp
Definition BasicTimeSeries.h:255
virtual void set_dt(const double sample_interval)
Set the sample interval.
Definition BasicTimeSeries.h:197
void set_live()
Definition BasicTimeSeries.h:151
double get_t0shift() const
Definition BasicTimeSeries.h:85
bool shifted() const
Definition BasicTimeSeries.h:82
double samprate() const
Definition BasicTimeSeries.h:169
virtual void rtoa()
Definition BasicTimeSeries.cc:22
virtual ~BasicTimeSeries()
Virtual destructor.
Definition BasicTimeSeries.h:55
size_t npts() const
Definition BasicTimeSeries.h:171
virtual void shift(const double dt)
Definition BasicTimeSeries.cc:75
virtual void set_npts(const size_t npts)
Set the number of samples attribute for data.
Definition BasicTimeSeries.h:209
double time(const int i) const
Definition BasicTimeSeries.h:62
double t0() const
Definition BasicTimeSeries.h:174
bool mlive
Definition BasicTimeSeries.h:243
double time_reference() const
Definition BasicTimeSeries.cc:84
bool live() const
Definition BasicTimeSeries.h:142
std::vector< double > time_axis() const
Definition BasicTimeSeries.cc:98
bool dead() const
Definition BasicTimeSeries.h:145
BasicTimeSeries & operator=(const BasicTimeSeries &parent)
Definition BasicTimeSeries.cc:63
bool time_is_UTC() const
Definition BasicTimeSeries.h:155
void force_t0_shift(const double t)
Force a t0 shift value on data.
Definition BasicTimeSeries.h:109
TimeReferenceType tref
Definition BasicTimeSeries.h:265
int sample_number(double t) const
Definition BasicTimeSeries.h:72
virtual void set_t0(const double t0in)
Set the data start time.
Definition BasicTimeSeries.h:221
void set_tref(const TimeReferenceType newtref)
Force the time standard.
Definition BasicTimeSeries.h:233
void kill()
Definition BasicTimeSeries.h:147
virtual void ator(const double tshift)
Definition BasicTimeSeries.cc:9
double mdt
Definition BasicTimeSeries.h:247
double mt0
Definition BasicTimeSeries.h:251
double dt() const
Definition BasicTimeSeries.h:153
double endtime() const noexcept
Definition BasicTimeSeries.h:77
Define metadata keys.
Definition BasicSpectrum.h:6
TimeReferenceType
Type of time standard for time series data.
Definition BasicTimeSeries.h:14