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 56 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 59 of file LineFilter.cc.
LineFilter::LineFilter | ( | const LineFilter & | x | ) |
Build a LineFilter identical to an existing filter.
Copy constructor.
Definition at line 77 of file LineFilter.cc.
LineFilter::~LineFilter | ( | void | ) |
Destroy the LineFilter object and release the function storage.
Virtual destructor.
Definition at line 75 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 1085 of file LineFilter.cc.
void LineFilter::apply | ( | WaveData & | ts | ) |
Operate on wavearray object.
Definition at line 1124 of file LineFilter.cc.
|
inline |
Definition at line 108 of file LineFilter.hh.
|
inline |
Definition at line 243 of file LineFilter.hh.
LineFilter * LineFilter::clone | ( | void | ) | const |
Clone a LineFilter.
Definition at line 88 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 92 of file LineFilter.cc.
|
inline |
Definition at line 115 of file LineFilter.hh.
bool LineFilter::DumpTrend | ( | const char * | fname, |
int | app = 0 |
||
) |
Definition at line 1423 of file LineFilter.cc.
double LineFilter::fScan | ( | const WaveData & | TD | ) |
Definition at line 814 of file LineFilter.cc.
|
inline |
Definition at line 261 of file LineFilter.hh.
Definition at line 488 of file LineFilter.cc.
Definition at line 353 of file LineFilter.cc.
Definition at line 692 of file LineFilter.cc.
Definition at line 227 of file LineFilter.cc.
|
inline |
Definition at line 257 of file LineFilter.hh.
Definition at line 1238 of file LineFilter.cc.
double LineFilter::Interference | ( | WaveData & | TD, |
double | omega | ||
) |
Definition at line 1017 of file LineFilter.cc.
|
inline |
Definition at line 246 of file LineFilter.hh.
|
inline |
Definition at line 265 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 120 of file LineFilter.cc.
|
inline |
Definition at line 123 of file LineFilter.hh.
bool LineFilter::LoadTrend | ( | const char * | fname | ) |
Definition at line 1507 of file LineFilter.cc.
Definition at line 298 of file LineFilter.cc.
Definition at line 110 of file LineFilter.cc.
|
inline |
Definition at line 236 of file LineFilter.hh.
TSeries LineFilter::operator() | ( | const TSeries & | ts | ) |
Definition at line 1115 of file LineFilter.cc.
|
inline |
Definition at line 102 of file LineFilter.hh.
void LineFilter::reset | ( | ) |
Clear/release the internal History vector and reset the current time.
Definition at line 170 of file LineFilter.cc.
void LineFilter::resize | ( | size_t | dS = 0 | ) |
Definition at line 181 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 142 of file LineFilter.cc.
void LineFilter::setFScan | ( | double | f = 0. , |
double | sn = 2. , |
||
double | fS = 0.45 , |
||
int | nS = 20 |
||
) |
Definition at line 203 of file LineFilter.cc.
|
inline |
Definition at line 249 of file LineFilter.hh.
bool LineFilter::badData |
Definition at line 185 of file LineFilter.hh.
bool LineFilter::clean |
Definition at line 184 of file LineFilter.hh.
wavearray<double> LineFilter::ct |
Definition at line 198 of file LineFilter.hh.
Time LineFilter::CurrentTime |
Definition at line 194 of file LineFilter.hh.
size_t LineFilter::dumpStart |
Definition at line 190 of file LineFilter.hh.
double LineFilter::fBand |
Definition at line 181 of file LineFilter.hh.
WaveData LineFilter::Filter |
Definition at line 206 of file LineFilter.hh.
int LineFilter::FilterID |
Definition at line 171 of file LineFilter.hh.
int LineFilter::FilterState |
Definition at line 191 of file LineFilter.hh.
double LineFilter::Frequency |
Definition at line 172 of file LineFilter.hh.
Definition at line 202 of file LineFilter.hh.
WaveData LineFilter::LineSD |
Definition at line 205 of file LineFilter.hh.
unsigned int LineFilter::nBand |
Definition at line 179 of file LineFilter.hh.
unsigned int LineFilter::nFirst |
Definition at line 175 of file LineFilter.hh.
unsigned int LineFilter::nLast |
Definition at line 176 of file LineFilter.hh.
int LineFilter::nLPF |
Definition at line 182 of file LineFilter.hh.
WaveData LineFilter::NoiseSD |
Definition at line 204 of file LineFilter.hh.
bool LineFilter::noScan |
Definition at line 186 of file LineFilter.hh.
int LineFilter::nRIF |
Definition at line 187 of file LineFilter.hh.
int LineFilter::nScan |
Definition at line 178 of file LineFilter.hh.
int LineFilter::nStep |
Definition at line 177 of file LineFilter.hh.
int LineFilter::nSubs |
Definition at line 180 of file LineFilter.hh.
int LineFilter::nWave |
Definition at line 183 of file LineFilter.hh.
bool LineFilter::reFine |
Definition at line 189 of file LineFilter.hh.
Interval LineFilter::Sample |
Definition at line 196 of file LineFilter.hh.
double LineFilter::SeedFrequency |
Definition at line 192 of file LineFilter.hh.
double LineFilter::SNR |
Definition at line 188 of file LineFilter.hh.
wavearray<double> LineFilter::st |
Definition at line 199 of file LineFilter.hh.
Time LineFilter::StartTime |
Definition at line 195 of file LineFilter.hh.
double LineFilter::Stride |
Definition at line 174 of file LineFilter.hh.
double LineFilter::Window |
Definition at line 173 of file LineFilter.hh.
wavearray<double> LineFilter::wt |
Definition at line 200 of file LineFilter.hh.