The LineFilter class containes methods to track and remove quasi- monochromatic lines.
a TSeries by 2^N. The TSeries data are filtered before decimation to remove aliasing. Line Removal.
Definition at line 38 of file LineFilter.hh.
Public Member Functions | |
LineFilter (void) | |
Build an empty LineFilter. More... | |
LineFilter (double f, double T=0., int fid=1, int nT=1) | |
LineFilter constructor filter type (default fid = 1) and time interval T to estimate and remove interference (T=0 - the whole input TS is used). More... | |
LineFilter (const LineFilter &x) | |
Build a LineFilter identical to an existing filter. More... | |
~LineFilter (void) | |
Destroy the LineFilter object and release the function storage. More... | |
TSeries | apply (const TSeries &ts) |
The argument time series is filtered to remove lines, and the argument TSeries ts is left unchanged. More... | |
void | apply (WaveData &ts) |
Operate on wavearray object. More... | |
FilterIO & | apply (const FilterIO &in) |
double | axb (double, double) |
LineFilter * | clone (void) const |
Clone a LineFilter. More... | |
void | dataCheck (const TSeries &ts) const |
Check the data for validity. More... | |
void | dataCheck (const FilterIO &in) const |
bool | DumpTrend (const char *, int=0) |
double | fScan (const WaveData &) |
Time | getCurrentTime (void) const |
lineData | getHeteroLine (WaveData &) |
lineData | getLine (WaveData &) |
double | getOmega (const WaveData &, int=2) |
WaveData | getPSD (const WaveData &, int=1) |
Time | getStartTime (void) const |
wavearray< float > | getTrend (int, char) |
double | Interference (WaveData &, double) |
long | intw (double) |
bool | inUse (void) const |
bool | isDataValid (const TSeries &ts) const |
Check the data for validity. More... | |
bool | isDataValid (const FilterIO &in) const |
bool | LoadTrend (const char *) |
double | makeFilter (const WaveData &, int=0) |
unsigned int | maxLine (int) |
double | newRate (double) |
TSeries | operator() (const TSeries &ts) |
FilterIO & | operator() (const FilterIO &in) |
void | reset () |
Clear/release the internal History vector and reset the current time. More... | |
void | resize (size_t=0) |
void | setFilter (int nF=1, int nL=0, int nS=1, int nD=-1, int nB=5, int nR=6, int nW=8) |
void | setFScan (double f=0., double sn=2., double fS=0.45, int nS=20) |
double | wrap (double) |
Public Attributes | |
bool | badData |
bool | clean |
wavearray< double > | ct |
Time | CurrentTime |
size_t | dumpStart |
double | fBand |
WaveData | Filter |
int | FilterID |
int | FilterState |
double | Frequency |
std::list< lineData > | lineList |
WaveData | LineSD |
unsigned int | nBand |
unsigned int | nFirst |
unsigned int | nLast |
int | nLPF |
WaveData | NoiseSD |
bool | noScan |
int | nRIF |
int | nScan |
int | nStep |
int | nSubs |
int | nWave |
bool | reFine |
Interval | Sample |
double | SeedFrequency |
double | SNR |
wavearray< double > | st |
Time | StartTime |
double | Stride |
double | Window |
wavearray< double > | wt |
#include <LineFilter.hh>
LineFilter::LineFilter | ( | void | ) |
LineFilter constructor filter type (default fid = 1) and time interval T to estimate and remove interference (T=0 - the whole input TS is used).
Constructor. Set parameters of the line filter
f | - line base frequency |
T | - time interval to estimate interference (T=0 - the whole TS is used) |
fid | - filter ID: 1 - use resampling and FFT with noise floor estimation 0 - use resampling and FFT, no noise floor estimation -1 - heterodyne estimation of amplitude and phase, frequency=const -2 - -1 + Hann window -3 - the same as -2, but sin(), cos() and Hann() are tabulated |
nT | - number of interval T sub0divisions |
Definition at line 41 of file LineFilter.cc.
LineFilter::LineFilter | ( | const LineFilter & | x | ) |
Build a LineFilter identical to an existing filter.
Copy constructor.
Definition at line 59 of file LineFilter.cc.
LineFilter::~LineFilter | ( | void | ) |
Destroy the LineFilter object and release the function storage.
Virtual destructor.
Definition at line 57 of file LineFilter.cc.
TSeries LineFilter::apply | ( | const TSeries & | ts | ) |
The argument time series is filtered to remove lines, and the argument TSeries ts is left unchanged.
Return cleaned TSeries.
Definition at line 1067 of file LineFilter.cc.
void LineFilter::apply | ( | WaveData & | ts | ) |
Operate on wavearray object.
Definition at line 1106 of file LineFilter.cc.
|
inline |
Definition at line 90 of file LineFilter.hh.
|
inline |
Definition at line 225 of file LineFilter.hh.
LineFilter * LineFilter::clone | ( | void | ) | const |
Clone a LineFilter.
Definition at line 70 of file LineFilter.cc.
void LineFilter::dataCheck | ( | const TSeries & | ts | ) | const |
Check the data for validity.
If the data are not applicable for line removal, an exception is thrown.
Definition at line 74 of file LineFilter.cc.
|
inline |
Definition at line 97 of file LineFilter.hh.
bool LineFilter::DumpTrend | ( | const char * | fname, |
int | app = 0 |
||
) |
Definition at line 1405 of file LineFilter.cc.
double LineFilter::fScan | ( | const WaveData & | TD | ) |
Definition at line 796 of file LineFilter.cc.
|
inline |
Definition at line 243 of file LineFilter.hh.
Definition at line 470 of file LineFilter.cc.
Definition at line 335 of file LineFilter.cc.
Definition at line 674 of file LineFilter.cc.
Definition at line 209 of file LineFilter.cc.
|
inline |
Definition at line 239 of file LineFilter.hh.
Definition at line 1220 of file LineFilter.cc.
double LineFilter::Interference | ( | WaveData & | TD, |
double | omega | ||
) |
Definition at line 999 of file LineFilter.cc.
|
inline |
Definition at line 228 of file LineFilter.hh.
|
inline |
Definition at line 247 of file LineFilter.hh.
bool LineFilter::isDataValid | ( | const TSeries & | ts | ) | const |
Check the data for validity.
Performs the same data checks as dataCheck() but returns a boolean status instead f throwing an exception.
Definition at line 102 of file LineFilter.cc.
|
inline |
Definition at line 105 of file LineFilter.hh.
bool LineFilter::LoadTrend | ( | const char * | fname | ) |
Definition at line 1489 of file LineFilter.cc.
Definition at line 280 of file LineFilter.cc.
Definition at line 92 of file LineFilter.cc.
|
inline |
Definition at line 218 of file LineFilter.hh.
TSeries LineFilter::operator() | ( | const TSeries & | ts | ) |
Definition at line 1097 of file LineFilter.cc.
|
inline |
Definition at line 84 of file LineFilter.hh.
void LineFilter::reset | ( | ) |
Clear/release the internal History vector and reset the current time.
Definition at line 152 of file LineFilter.cc.
void LineFilter::resize | ( | size_t | dS = 0 | ) |
Definition at line 163 of file LineFilter.cc.
void LineFilter::setFilter | ( | int | nF = 1 , |
int | nL = 0 , |
||
int | nS = 1 , |
||
int | nD = -1 , |
||
int | nB = 5 , |
||
int | nR = 6 , |
||
int | nW = 8 |
||
) |
Definition at line 124 of file LineFilter.cc.
void LineFilter::setFScan | ( | double | f = 0. , |
double | sn = 2. , |
||
double | fS = 0.45 , |
||
int | nS = 20 |
||
) |
Definition at line 185 of file LineFilter.cc.
|
inline |
Definition at line 231 of file LineFilter.hh.
bool LineFilter::badData |
Definition at line 167 of file LineFilter.hh.
bool LineFilter::clean |
Definition at line 166 of file LineFilter.hh.
wavearray<double> LineFilter::ct |
Definition at line 180 of file LineFilter.hh.
Time LineFilter::CurrentTime |
Definition at line 176 of file LineFilter.hh.
size_t LineFilter::dumpStart |
Definition at line 172 of file LineFilter.hh.
double LineFilter::fBand |
Definition at line 163 of file LineFilter.hh.
WaveData LineFilter::Filter |
Definition at line 188 of file LineFilter.hh.
int LineFilter::FilterID |
Definition at line 153 of file LineFilter.hh.
int LineFilter::FilterState |
Definition at line 173 of file LineFilter.hh.
double LineFilter::Frequency |
Definition at line 154 of file LineFilter.hh.
Definition at line 184 of file LineFilter.hh.
WaveData LineFilter::LineSD |
Definition at line 187 of file LineFilter.hh.
unsigned int LineFilter::nBand |
Definition at line 161 of file LineFilter.hh.
unsigned int LineFilter::nFirst |
Definition at line 157 of file LineFilter.hh.
unsigned int LineFilter::nLast |
Definition at line 158 of file LineFilter.hh.
int LineFilter::nLPF |
Definition at line 164 of file LineFilter.hh.
WaveData LineFilter::NoiseSD |
Definition at line 186 of file LineFilter.hh.
bool LineFilter::noScan |
Definition at line 168 of file LineFilter.hh.
int LineFilter::nRIF |
Definition at line 169 of file LineFilter.hh.
int LineFilter::nScan |
Definition at line 160 of file LineFilter.hh.
int LineFilter::nStep |
Definition at line 159 of file LineFilter.hh.
int LineFilter::nSubs |
Definition at line 162 of file LineFilter.hh.
int LineFilter::nWave |
Definition at line 165 of file LineFilter.hh.
bool LineFilter::reFine |
Definition at line 171 of file LineFilter.hh.
Interval LineFilter::Sample |
Definition at line 178 of file LineFilter.hh.
double LineFilter::SeedFrequency |
Definition at line 174 of file LineFilter.hh.
double LineFilter::SNR |
Definition at line 170 of file LineFilter.hh.
wavearray<double> LineFilter::st |
Definition at line 181 of file LineFilter.hh.
Time LineFilter::StartTime |
Definition at line 177 of file LineFilter.hh.
double LineFilter::Stride |
Definition at line 156 of file LineFilter.hh.
double LineFilter::Window |
Definition at line 155 of file LineFilter.hh.
wavearray<double> LineFilter::wt |
Definition at line 182 of file LineFilter.hh.