GBTACSTable.h
Classes
- GBTACSTable -- A GBTBackendTable for the ACS (full description)
Types
- NoVanVleck
-
No vanVleck correction will be done.
- Schwab
-
The correction from Schwab as implemented in the VanVleck class.
- Old
-
The old correction from the Arecibo code.
- DefaultVanVleck = Schwab
-
the default correction
- NoSmoothing
-
No smoothing
- Hanning
-
hanning smoothing
- Hamming
-
hamming smoothing
- DefaultSmoothing = Hanning
-
the default smoothing
Interface
- Public Members
- GBTACSTable(const String &fileName, VanVleckCorr vanVleckCorr=DefaultVanVleck, Smoothing smoothing = DefaultSmoothing, Int vvsize=65, Bool useDCBias = False, Double dcbias=0.0, Int minbiasfactor=-1, Bool fixlags = False, String fixlagslog="", Double sigmaFactor = 6.0, Int spikeStart = 200)
- ~GBTACSTable()
- virtual Bool reopen(const String &fileName, Bool resync)
- virtual Bool reopen(const String &fileName)
- virtual Array<Float> rawdata(uInt whichSampler)
- virtual Array<Float> data(uInt whichSampler)
- virtual Array<Bool> badData(uInt whichSampler)
- virtual Array<Float> zeroChannel(uInt whichSampler)
- virtual Double spacing()
- virtual Bool isValid() const
- virtual Bool switchOK() const
- virtual Int nlevels() const
- virtual Float integrat(uInt whichSampler, uInt whichState) const
- virtual Double dmjd()
- virtual Double timeMid()
- virtual String bank()
- Private Members
- void vanVleck()
- void getACInfo(Double &threshold, Double &dcbias, Int &biasfactor, Int nlevel, Vector<Double> &aclags)
- void vanVleckLags(Vector<Double> &lags, Int nlevel, Double thresh1, Double thresh2, Double dcbias1, Double dcbias2)
- void pow3lev()
- void vanvleck3lev()
- void pow9lev()
- void vanvleck9lev()
- void applyFFT()
- void smooth()
- void hamming()
- void hanning()
- Bool checkForBadData(Int nspectra)
- Bool checkForDiscontinuities(Vector<Float> lags, Bool &badData, uInt spec)
- void reportBadLags(uInt spec, String badChanStr, String comment="")
- Bool init()
- String bankPortPhase(const String &bank, Int port, Int phase)
- GBTACSTable()
- GBTACSTable(const GBTACSTable &)
- GBTACSTable &operator=(const GBTACSTable &)
Review Status
- Date Reviewed:
- yyyy/mm/dd
Prerequisite
Etymology
Synopsis
GBTACSTable is a GBTBackendTable with some additional
methods specific to the ACS.
Example
Motivation
Member Description
define the vanVleck correction to used.
define the smoothing to apply after the data have been corrected
GBTACSTable(const String &fileName, VanVleckCorr vanVleckCorr=DefaultVanVleck, Smoothing smoothing = DefaultSmoothing, Int vvsize=65, Bool useDCBias = False, Double dcbias=0.0, Int minbiasfactor=-1, Bool fixlags = False, String fixlagslog="", Double sigmaFactor = 6.0, Int spikeStart = 200)
Construct it from a file name. Use the indicated vanVleck correction
and smoothing in the data method. The vvsize is the table size
used when the Schwab correction (the default) is requested. If
useDCBias is True, an attemp is made to use the DCBias (the average
of the autocorrrelations over the last 5% of the lags) in the vanVleck
correction if the Schwab correction is specified. If usebias is False
then dcbias is used as the bias. If minbiasfactor is >= 0 then the
nearest integer >= minbiasfactor is found that, when multiplied by
0.5/65536, raises the mean of the last 5% of the lags to just > 0.0.
This is an attempt to correct for a truncation error introduced when
the lags are converted to 32-bit values.
virtual Bool reopen(const String &fileName, Bool resync)
Attach this GBTACSTable to a new file name.
when resync is True, if fileName is the same as the
currently opened file, if there is one, then this just
closes and reopens the FITS file setting things right
back to the next row in the table, if there is one
virtual Bool reopen(const String &fileName)
the default reopen from FITSTabular uses resync=True
virtual Array<Float> rawdata(uInt whichSampler)
get the raw data from the specific sampler
virtual Array<Float> data(uInt whichSampler)
get the data from the specific sampler,
applying the vanVleck correction and smoothing specified
virtual Array<Bool> badData(uInt whichSampler)
is the data bad for the specific sampler
virtual Array<Float> zeroChannel(uInt whichSampler)
the zero channel for the specific sampler
virtual Double spacing()
the channel spacing as deduced from the CDELT keyword and number of lags
virtual Bool isValid() const
separate isValid needed here to watch for problems in init
virtual Bool switchOK() const
Do the switching signals in ACT_STATE follow the
documentation? Prior to FITSVER 1.2 they had the
opposite sense.
virtual Int nlevels() const
return the number of sampler levels being used at the moment
virtual Float integrat(uInt whichSampler, uInt whichState) const
The value of the INTEGRAT field in the current row for
the given sampler and state
virtual Double dmjd()
The DMJD value from the current row
virtual Double timeMid()
The value of the TIME-MID field in the current row
A string giving the bank here
void getACInfo(Double &threshold, Double &dcbias, Int &biasfactor, Int nlevel, Vector<Double> &aclags)
get information from an AC lag vector
void vanVleckLags(Vector<Double> &lags, Int nlevel, Double thresh1, Double thresh2, Double dcbias1, Double dcbias2)
This actually does the correction - in place
Functions related to the old vv correction
these are all in-place operations on itsCachedData
3-level sampling
9-level sampling
smoothing functions
check for bad data, sets itsCachedBadData and returns True if
there was any bad data.
Checks a lag set for any discontinuties in 1024-lag chunks.
A discontinuity is when a 1024-lag chunk is more than nsigma
from the mean of the 512-lags on either side of that chunk.
This will also fix it when one is found if itsFixLags is true.
When fixed, that information is logged to the named logfile.
If not fixed, then this should be flagged as bad. Returns True
if any discontinuities were found. badData is set to True when
the discontinuity was not fixed. The first 1024-lag segment is
not checked here. If that is offset then it should get flagged
elsewhere because the zero lag will be unphysical. The first
1024 segement can not be fixed.
Generates a report for a given bad lag
initializes shapes and the cachedLevel, clears the booleans and
the cached row number - does not read any data.
utility functions
Undefined and inaccessible.
GBTACSTable &operator=(const GBTACSTable &)