|
DP3
|
General info about DP3 data processing attributes like averaging. More...
#include <DPInfo.h>
Public Member Functions | |
| DPInfo (unsigned int n_correlations=0, unsigned int n_original_channels=0, std::string antenna_set=std::string()) | |
| const std::vector< double > & | antennaDiam () const |
| const std::vector< int > & | antennaMap () const |
| const std::vector< std::string > & | antennaNames () const |
| const std::vector< casacore::MPosition > & | antennaPos () const |
| const std::string & | antennaSet () const |
| const std::vector< int > & | antennaUsed () const |
| const casacore::MPosition & | arrayPos () const |
| const casacore::MPosition | arrayPosCopy () const |
| const std::vector< std::vector< double > > & | BdaChanFreqs () const |
| const std::vector< std::vector< double > > & | BdaChanWidths () const |
| const casacore::MDirection & | beamCorrectionDir () const |
| int | beamCorrectionMode () const |
| const std::vector< double > & | chanFreqs (std::size_t baseline=0) const |
| bool | channelsAreRegular () const |
| Determine if the channels have a regular layout. More... | |
| const std::vector< double > & | chanWidths (std::size_t baseline=0) const |
| void | clearMetaChanged () |
| const std::string & | dataColumnName () const |
| const casacore::MDirection & | delayCenter () const |
| const casacore::MDirection | delayCenterCopy () const |
| const std::vector< double > & | effectiveBW (std::size_t baseline=0) const |
| double | firstTime () const |
| const std::string & | flagColumnName () const |
| const std::vector< int > & | getAnt1 () const |
| const std::vector< int > & | getAnt2 () const |
| const std::vector< int > & | getAutoCorrIndex () const |
| const std::vector< double > & | getBaselineLengths () const |
| Get the lengths of the baselines (in meters). More... | |
| std::map< std::string, Direction > & | GetDirections () |
| const std::map< std::string, Direction > & | GetDirections () const |
| const std::vector< std::string > | GetUsedAntennaNames () const |
| bool | hasBDAChannels () const |
| bool | isBDAIntervalFactorInteger () const |
| double | lastTime () const |
| bool | metaChanged () const |
| Has the meta data been changed in a step (precluding an update)? More... | |
| const std::string & | msName () const |
| unsigned int | nantenna () const |
| unsigned int | nbaselines () const |
| unsigned int | nchan () const |
| unsigned int | nchanAvg () const |
| unsigned int | ncorr () const |
| unsigned int | ntime () const |
| unsigned int | ntimeAvg (unsigned int baseline=0) const |
| const std::vector< unsigned int > & | ntimeAvgs () const |
| const casacore::MDirection & | originalPhaseCenter () const |
| unsigned int | origNChan () const |
| const casacore::MDirection & | phaseCenter () const |
| const casacore::MDirection | phaseCenterCopy () const |
| Direction | phaseCenterDirection () const |
| const std::set< aocommon::PolarizationEnum > & | polarizations () const |
| double | refFreq () const |
| void | RemoveUnusedAntennas () |
| Remove unused stations from the antenna lists. More... | |
| const std::vector< double > & | resolutions (std::size_t baseline=0) const |
| void | SelectBaselines (const std::vector< unsigned int > &baselines) |
| void | SelectChannels (unsigned int start_channel, unsigned int n_channels) |
| void | setAntennas (const std::vector< std::string > &antNames, const std::vector< double > &antDiam, const std::vector< casacore::MPosition > &antPos, const std::vector< int > &ant1, const std::vector< int > &ant2) |
| Set the info for the given antennae and baselines. More... | |
| void | setArrayInformation (const casacore::MPosition &arrayPos, const casacore::MDirection &phaseCenter, const casacore::MDirection &delayCenter, const casacore::MDirection &tileBeamDir) |
| void | setBeamCorrectionDir (const casacore::MDirection &dir) |
| void | setBeamCorrectionMode (int mode) |
| void | setChannels (std::vector< double > &&chanFreqs, std::vector< double > &&chanWidths, std::vector< double > &&resolutions=std::vector< double >(), std::vector< double > &&effectiveBW=std::vector< double >(), double refFreq=0, int spectralWindow=0) |
| void | setChannels (std::vector< std::vector< double >> &&chanFreqs, std::vector< std::vector< double >> &&chanWidths, std::vector< std::vector< double >> &&resolutions=std::vector< std::vector< double >>(), std::vector< std::vector< double >> &&effectiveBW=std::vector< std::vector< double >>(), double refFreq=0, int spectralWindow=0) |
| void | setIsBDAIntervalFactorInteger (bool isIntervalInteger) |
| void | setMetaChanged () |
| Set change of meta data. More... | |
| void | setMsName (const std::string &ms_name) |
| void | setMsNames (const std::string &ms_name, const std::string &data_column_name, const std::string &flag_column_name, const std::string &weight_column_name) |
| void | setPhaseCenter (const casacore::MDirection &phase_center) |
| void | setPolarizations (const std::set< aocommon::PolarizationEnum > &polarizations) |
| void | setTimeIntervalAndSteps (double timeInterval, unsigned int ntime) |
| Set the time interval and the number of time steps. More... | |
| void | setTimes (double first_time, double last_time, double time_interval) |
| int | spectralWindow () const |
| unsigned int | startchan () const |
| double | startTime () const |
| const casacore::MDirection & | tileBeamDir () const |
| const casacore::MDirection | tileBeamDirCopy () const |
| double | timeInterval () const |
| double | totalBW () const |
| void | update (std::vector< unsigned int > &&timeAvg) |
| Update the info for the given average factors. More... | |
| unsigned int | update (unsigned int chanAvg, unsigned int timeAvg) |
| const std::string & | weightColumnName () const |
General info about DP3 data processing attributes like averaging.
This class contains the information about the number of correlations, channels, baselines, and times. It is initialized by the first step and updated by steps like Averager that change the number of channels or times. Steps can take information from it to know about shapes.
|
explicit |
|
inline |
|
inline |
Get the indices of all antennae in the used antenna vector above. -1 means that the antenna is not used. E.g. [0,-1,1,-1,-1,2,3] for the example above.
|
inline |
|
inline |
|
inline |
|
inline |
Get the antenna numbers actually used in the (selected) baselines. E.g. [0,2,5,6]
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get the beam correction mode.
|
inline |
| bool dp3::base::DPInfo::channelsAreRegular | ( | ) | const |
Determine if the channels have a regular layout.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| const std::vector<int>& dp3::base::DPInfo::getAutoCorrIndex | ( | ) | const |
Get the baseline table index of the autocorrelations. A negative value means there are no autocorrelations for that antenna.
| const std::vector<double>& dp3::base::DPInfo::getBaselineLengths | ( | ) | const |
Get the lengths of the baselines (in meters).
|
inline |
|
inline |
| const std::vector<std::string> dp3::base::DPInfo::GetUsedAntennaNames | ( | ) | const |
|
inline |
|
inline |
|
inline |
|
inline |
Has the meta data been changed in a step (precluding an update)?
|
inline |
|
inline |
|
inline |
|
inline |
Number of channels after channel selection and averaging. This is the number of channels that a step can expect the data to have as input.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
The number of channels that the input measurement set has. This is from before any channel selection or averaging is done.
|
inline |
|
inline |
| Direction dp3::base::DPInfo::phaseCenterDirection | ( | ) | const |
|
inline |
|
inline |
| void dp3::base::DPInfo::RemoveUnusedAntennas | ( | ) |
Remove unused stations from the antenna lists.
|
inline |
| void dp3::base::DPInfo::SelectBaselines | ( | const std::vector< unsigned int > & | baselines | ) |
Select a subset of the baselines.
| baselines | A list with the indices of the baselines that must remain. All other baselines are removed. |
| void dp3::base::DPInfo::SelectChannels | ( | unsigned int | start_channel, |
| unsigned int | n_channels | ||
| ) |
Select a subset of the channels.
| start_channel | Start channel, relative to the current first channel. |
| n_channels | Number of channels to select. |
| void dp3::base::DPInfo::setAntennas | ( | const std::vector< std::string > & | antNames, |
| const std::vector< double > & | antDiam, | ||
| const std::vector< casacore::MPosition > & | antPos, | ||
| const std::vector< int > & | ant1, | ||
| const std::vector< int > & | ant2 | ||
| ) |
Set the info for the given antennae and baselines.
| void dp3::base::DPInfo::setArrayInformation | ( | const casacore::MPosition & | arrayPos, |
| const casacore::MDirection & | phaseCenter, | ||
| const casacore::MDirection & | delayCenter, | ||
| const casacore::MDirection & | tileBeamDir | ||
| ) |
|
inline |
|
inline |
Set the beam correction mode.
| mode | An integer representation of an everybeam::BeamMode value. |
| void dp3::base::DPInfo::setChannels | ( | std::vector< double > && | chanFreqs, |
| std::vector< double > && | chanWidths, | ||
| std::vector< double > && | resolutions = std::vector< double >(), |
||
| std::vector< double > && | effectiveBW = std::vector< double >(), |
||
| double | refFreq = 0, |
||
| int | spectralWindow = 0 |
||
| ) |
Set the frequency info. An empty resolutions or effectiveBW is default to chanWidths. total_bandwidth_ is set to the sum of effectiveBW. If refFreq is 0, it is set to the middle of chanFreqs (mean if even).
| std::invalid_argument | When vector sizes do not match. |
| void dp3::base::DPInfo::setChannels | ( | std::vector< std::vector< double >> && | chanFreqs, |
| std::vector< std::vector< double >> && | chanWidths, | ||
| std::vector< std::vector< double >> && | resolutions = std::vector< std::vector< double >>(), |
||
| std::vector< std::vector< double >> && | effectiveBW = std::vector< std::vector< double >>(), |
||
| double | refFreq = 0, |
||
| int | spectralWindow = 0 |
||
| ) |
Set the frequency info, using different info per baseline. total_bandwidth_ is set to the sum of effectiveBW, which should be equal for all baselines. If refFreq is 0, it is set to the middle of chanFreqs (mean if even). of the baseline with the most channels.
| chanFreqs | Channel frequencies for each baseline in Hz. |
| chanWidths | Channel widths for each baseline in Hz. |
| resolutions | Channel resolution for each baseline in Hz. If omitted/empty, channel widths are used. |
| effectiveBW | Effective bandwidth for the channels in each baseline |
| std::invalid | argument When a vector has an incorrect size. The size of the vector arguments should be the number of baselines. For each baseline, the number of elements in the vectors for that baseline should be equal. |
|
inline |
|
inline |
Set change of meta data.
|
inline |
| void dp3::base::DPInfo::setMsNames | ( | const std::string & | ms_name, |
| const std::string & | data_column_name, | ||
| const std::string & | flag_column_name, | ||
| const std::string & | weight_column_name | ||
| ) |
|
inline |
|
inline |
|
inline |
Set the time interval and the number of time steps.
| void dp3::base::DPInfo::setTimes | ( | double | first_time, |
| double | last_time, | ||
| double | time_interval | ||
| ) |
Set time information and derive the number of time slots.
| first_time | Centroid time of the first time slot, in mjd seconds. |
| last_time | Centroid time of the last time slot, in mjd seconds. |
| time_interval | Time interval between two time slots, in mjd seconds. |
|
inline |
|
inline |
Index of first selected channel in the input measurement set. Averaging does not affect this number.
|
inline |
|
inline |
|
inline |
|
inline |
Difference in time between two consecutive timesteps. In case the measurement set is baseline-dependently (BD) averaged, this is the unit time interval value, which is basically the interval before BD averaging.
|
inline |
| void dp3::base::DPInfo::update | ( | std::vector< unsigned int > && | timeAvg | ) |
Update the info for the given average factors.
| unsigned int dp3::base::DPInfo::update | ( | unsigned int | chanAvg, |
| unsigned int | timeAvg | ||
| ) |
Update the info for the given average factors. If chanAvg is higher than the actual nr of channels, it is reset. The same is true for timeAvg. It returns the possibly reset nr of channels to average.
|
inline |