casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Member Functions | Private Attributes | List of all members
casa::PlotMSAtm Class Reference

PlotMSAtm: plotms class for calculating atmospheric transmission curve for bandpass plots. More...

#include <PlotMSAtm.h>

Public Member Functions

 PlotMSAtm (casacore::String filename, PlotMSSelection &userSel, bool showatm, bool isMS, bool xAxisIsChan, PlotMSCacheBase *parent)
 construct with bandpass table name More...
 
 ~PlotMSAtm ()
 
casacore::String filename ()
 accessors More...
 
PlotMSSelection selection ()
 
bool showatm ()
 
bool xAxisIsChan ()
 
void setShowAtm (bool showatm)
 
void setXAxisIsChan (bool isChan)
 
void calcAtmTskyCurve (casacore::Vector< casacore::Double > &curve, casacore::Int spw, casacore::Int scan, const casacore::Vector< casacore::Double > &chanFreqs)
 passes arguments through to calcOverlayCurve More...
 
void calcImageCurve (casacore::Vector< casacore::Double > &curve, casacore::Int spw, casacore::Int scan, const casacore::Vector< casacore::Double > &chanFreqs)
 calculates image frequencies then calls calcOverlayCurve More...
 
casacore::Double getPwv ()
 
casacore::Double getAirmass ()
 
bool canShowImageCurve ()
 image sideband curve helpers More...
 
bool hasReceiverTable ()
 
bool canGetLOsForSpw ()
 

Private Member Functions

 PlotMSAtm (const PlotMSAtm &other)
 
PlotMSAtmoperator= (const PlotMSAtm &other)
 
void setUpMS (casacore::String filename, PlotMSSelection &userSel)
 info from MS More...
 
void getMSTimes (MeasurementSet &ms)
 
void getMSFields (MeasurementSet &ms)
 
void setUpCalTable (casacore::String filename, PlotMSSelection &userSel)
 info from cal tables More...
 
void getCalTimes (NewCalTable &ct)
 
void getCalFields (NewCalTable &ct)
 
void getCalMS ()
 
casacore::Vector
< casacore::Double
calcOverlayCurve (casacore::Int spw, casacore::Int scan, const casacore::Vector< casacore::Double > &chanFreqs)
 common function for plotbandpass CalcAtmTransmission algorithm Returns curve vector (atm, tsky, image sideband); More...
 
void applyMSSelection (PlotMSSelection &selection, casacore::MeasurementSet &selms)
 for user selection then each chunk's spw and scan More...
 
void applyCalSelection (PlotMSSelection &selection, NewCalTable &selct)
 
void getMeanWeather ()
 calculated values More...
 
casacore::Table selectWeatherTable (casacore::Table &intable, casacore::String tempUnits, casacore::String pressureUnits)
 
void getMedianPwv ()
 
casacore::Double computeMeanAirmass ()
 
casacore::Double getPointingElevation ()
 
casacore::Double getFieldElevation (casacore::Int fieldId)
 
casacore::Double getMeanScantime ()
 
atm::AtmProfile * getAtmProfile ()
 atmosphere tool More...
 
bool getLO1FreqForSpw (double &freq, int spw)
 image sideband curve More...
 
bool calcImageFrequencies (casacore::Vector< casacore::Double > &imageFreqs, casacore::Int spw, const casacore::Vector< casacore::Double > &chanFreqs)
 
void getUniqueTimes (casacore::Vector< casacore::Double > inputTimes, casacore::Vector< casacore::Double > &uniqueTimes)
 utility functions Determine unique time values in input vector More...
 
void getUniqueFields (casacore::Vector< casacore::Int > allfields)
 Sets fields_ = unique values in FIELD column. More...
 
template<typename T >
casacore::Vector< T > getValuesInTimeRange (casacore::Vector< T > inputCol, casacore::Vector< casacore::Double > timesCol, casacore::Double mintime, casacore::Double maxtime)
 
template<typename T >
void getClosestValues (casacore::Vector< T > &values, casacore::Vector< casacore::Double > &times, casacore::Vector< T > &data, double mintime, double maxtime)
 
void getTimeRange (casacore::Double &mintime, casacore::Double &maxtime)
 use cal table times if available, else ms times More...
 

Private Attributes

casacore::String filename_
 
casacore::String tableName_
 
casacore::String telescopeName_
 
bool showatm_
 
bool isMS_
 
bool xIsChan_
 
bool canCalculatePwv_
 
bool canCalculateWeather_
 
PlotMSCacheBaseparent_
 
PlotMSSelection selection_
 
casacore::MeasurementSetms_
 
casacore::MeasurementSetselms_
 
NewCalTablecaltable_
 
NewCalTableselct_
 
int selectedSpw_
 updated for every spw/scan selection: More...
 
int selectedScan_
 
casacore::Double pwv_
 
casacore::Double airmass_
 
casacore::Vector
< casacore::Double
mstimes_
 
casacore::Vector
< casacore::Double
caltimes_
 
casacore::Vector< casacore::Intfields_
 
casacore::Record weather_
 
std::map< int, double > loFreqForSpw_
 
const unsigned int MAX_ATM_CALC_CHAN_
 

Detailed Description

PlotMSAtm: plotms class for calculating atmospheric transmission curve for bandpass plots.

Prerequisite

Etymology

From "plotms", "atmospheric".

Synopsis

The PlotMSAtm class computes atmospheric transmission curves based on the algorithm in the plotbandpass task. Needed information is obtained from the bandpass table and its MeasurementSet if possible, else defaults based on observatory are used. The calculated values are returned in a vector whose size is equal to the number of channels.

Example

Motivation

This class is used by the plotms CalCache class to obtain atmospheric transmission curve values for plotting the curve overlay on a bandpass plot.

Definition at line 73 of file PlotMSAtm.h.

Constructor & Destructor Documentation

casa::PlotMSAtm::PlotMSAtm ( casacore::String  filename,
PlotMSSelection userSel,
bool  showatm,
bool  isMS,
bool  xAxisIsChan,
PlotMSCacheBase parent 
)

construct with bandpass table name

casa::PlotMSAtm::~PlotMSAtm ( )
casa::PlotMSAtm::PlotMSAtm ( const PlotMSAtm other)
private

Member Function Documentation

void casa::PlotMSAtm::applyCalSelection ( PlotMSSelection selection,
NewCalTable selct 
)
private
void casa::PlotMSAtm::applyMSSelection ( PlotMSSelection selection,
casacore::MeasurementSet selms 
)
private

for user selection then each chunk's spw and scan

void casa::PlotMSAtm::calcAtmTskyCurve ( casacore::Vector< casacore::Double > &  curve,
casacore::Int  spw,
casacore::Int  scan,
const casacore::Vector< casacore::Double > &  chanFreqs 
)

passes arguments through to calcOverlayCurve

void casa::PlotMSAtm::calcImageCurve ( casacore::Vector< casacore::Double > &  curve,
casacore::Int  spw,
casacore::Int  scan,
const casacore::Vector< casacore::Double > &  chanFreqs 
)

calculates image frequencies then calls calcOverlayCurve

bool casa::PlotMSAtm::calcImageFrequencies ( casacore::Vector< casacore::Double > &  imageFreqs,
casacore::Int  spw,
const casacore::Vector< casacore::Double > &  chanFreqs 
)
private
casacore::Vector<casacore::Double> casa::PlotMSAtm::calcOverlayCurve ( casacore::Int  spw,
casacore::Int  scan,
const casacore::Vector< casacore::Double > &  chanFreqs 
)
private

common function for plotbandpass CalcAtmTransmission algorithm Returns curve vector (atm, tsky, image sideband);

bool casa::PlotMSAtm::canGetLOsForSpw ( )

Referenced by canShowImageCurve().

bool casa::PlotMSAtm::canShowImageCurve ( )
inline

image sideband curve helpers

Definition at line 104 of file PlotMSAtm.h.

References canGetLOsForSpw(), and hasReceiverTable().

casacore::Double casa::PlotMSAtm::computeMeanAirmass ( )
private
casacore::String casa::PlotMSAtm::filename ( )
inline

accessors

Definition at line 83 of file PlotMSAtm.h.

References filename_.

casacore::Double casa::PlotMSAtm::getAirmass ( )
inline

Definition at line 101 of file PlotMSAtm.h.

References airmass_.

atm::AtmProfile* casa::PlotMSAtm::getAtmProfile ( )
private

atmosphere tool

void casa::PlotMSAtm::getCalFields ( NewCalTable ct)
private
void casa::PlotMSAtm::getCalMS ( )
private
void casa::PlotMSAtm::getCalTimes ( NewCalTable ct)
private
template<typename T >
void casa::PlotMSAtm::getClosestValues ( casacore::Vector< T > &  values,
casacore::Vector< casacore::Double > &  times,
casacore::Vector< T > &  data,
double  mintime,
double  maxtime 
)
private
casacore::Double casa::PlotMSAtm::getFieldElevation ( casacore::Int  fieldId)
private
bool casa::PlotMSAtm::getLO1FreqForSpw ( double &  freq,
int  spw 
)
private

image sideband curve

casacore::Double casa::PlotMSAtm::getMeanScantime ( )
private
void casa::PlotMSAtm::getMeanWeather ( )
private

calculated values

void casa::PlotMSAtm::getMedianPwv ( )
private
void casa::PlotMSAtm::getMSFields ( MeasurementSet ms)
private
void casa::PlotMSAtm::getMSTimes ( MeasurementSet ms)
private
casacore::Double casa::PlotMSAtm::getPointingElevation ( )
private
casacore::Double casa::PlotMSAtm::getPwv ( )
inline

Definition at line 100 of file PlotMSAtm.h.

References pwv_.

void casa::PlotMSAtm::getTimeRange ( casacore::Double mintime,
casacore::Double maxtime 
)
private

use cal table times if available, else ms times

void casa::PlotMSAtm::getUniqueFields ( casacore::Vector< casacore::Int allfields)
private

Sets fields_ = unique values in FIELD column.

void casa::PlotMSAtm::getUniqueTimes ( casacore::Vector< casacore::Double inputTimes,
casacore::Vector< casacore::Double > &  uniqueTimes 
)
private

utility functions Determine unique time values in input vector

template<typename T >
casacore::Vector<T> casa::PlotMSAtm::getValuesInTimeRange ( casacore::Vector< T >  inputCol,
casacore::Vector< casacore::Double timesCol,
casacore::Double  mintime,
casacore::Double  maxtime 
)
private
bool casa::PlotMSAtm::hasReceiverTable ( )

Referenced by canShowImageCurve().

PlotMSAtm& casa::PlotMSAtm::operator= ( const PlotMSAtm other)
private
PlotMSSelection casa::PlotMSAtm::selection ( )
inline

Definition at line 84 of file PlotMSAtm.h.

References selection_.

casacore::Table casa::PlotMSAtm::selectWeatherTable ( casacore::Table intable,
casacore::String  tempUnits,
casacore::String  pressureUnits 
)
private
void casa::PlotMSAtm::setShowAtm ( bool  showatm)
inline

Definition at line 88 of file PlotMSAtm.h.

References showatm(), and showatm_.

void casa::PlotMSAtm::setUpCalTable ( casacore::String  filename,
PlotMSSelection userSel 
)
private

info from cal tables

void casa::PlotMSAtm::setUpMS ( casacore::String  filename,
PlotMSSelection userSel 
)
private

info from MS

void casa::PlotMSAtm::setXAxisIsChan ( bool  isChan)
inline

Definition at line 89 of file PlotMSAtm.h.

References xIsChan_.

bool casa::PlotMSAtm::showatm ( )
inline

Definition at line 85 of file PlotMSAtm.h.

References showatm_.

Referenced by setShowAtm().

bool casa::PlotMSAtm::xAxisIsChan ( )
inline

Definition at line 86 of file PlotMSAtm.h.

References xIsChan_.

Member Data Documentation

casacore::Double casa::PlotMSAtm::airmass_
private

Definition at line 184 of file PlotMSAtm.h.

Referenced by getAirmass().

NewCalTable* casa::PlotMSAtm::caltable_
private

Definition at line 180 of file PlotMSAtm.h.

casacore::Vector<casacore::Double> casa::PlotMSAtm::caltimes_
private

Definition at line 185 of file PlotMSAtm.h.

bool casa::PlotMSAtm::canCalculatePwv_
private

Definition at line 175 of file PlotMSAtm.h.

bool casa::PlotMSAtm::canCalculateWeather_
private

Definition at line 176 of file PlotMSAtm.h.

casacore::Vector<casacore::Int> casa::PlotMSAtm::fields_
private

Definition at line 186 of file PlotMSAtm.h.

casacore::String casa::PlotMSAtm::filename_
private

Definition at line 171 of file PlotMSAtm.h.

Referenced by filename().

bool casa::PlotMSAtm::isMS_
private

Definition at line 173 of file PlotMSAtm.h.

std::map<int, double> casa::PlotMSAtm::loFreqForSpw_
private

Definition at line 188 of file PlotMSAtm.h.

const unsigned int casa::PlotMSAtm::MAX_ATM_CALC_CHAN_
private

Definition at line 189 of file PlotMSAtm.h.

casacore::MeasurementSet* casa::PlotMSAtm::ms_
private

Definition at line 179 of file PlotMSAtm.h.

casacore::Vector<casacore::Double> casa::PlotMSAtm::mstimes_
private

Definition at line 185 of file PlotMSAtm.h.

PlotMSCacheBase* casa::PlotMSAtm::parent_
private

Definition at line 177 of file PlotMSAtm.h.

casacore::Double casa::PlotMSAtm::pwv_
private

Definition at line 184 of file PlotMSAtm.h.

Referenced by getPwv().

NewCalTable * casa::PlotMSAtm::selct_
private

Definition at line 180 of file PlotMSAtm.h.

int casa::PlotMSAtm::selectedScan_
private

Definition at line 183 of file PlotMSAtm.h.

int casa::PlotMSAtm::selectedSpw_
private

updated for every spw/scan selection:

Definition at line 183 of file PlotMSAtm.h.

PlotMSSelection casa::PlotMSAtm::selection_
private

Definition at line 178 of file PlotMSAtm.h.

Referenced by selection().

casacore::MeasurementSet * casa::PlotMSAtm::selms_
private

Definition at line 179 of file PlotMSAtm.h.

bool casa::PlotMSAtm::showatm_
private

Definition at line 172 of file PlotMSAtm.h.

Referenced by setShowAtm(), and showatm().

casacore::String casa::PlotMSAtm::tableName_
private

Definition at line 171 of file PlotMSAtm.h.

casacore::String casa::PlotMSAtm::telescopeName_
private

Definition at line 171 of file PlotMSAtm.h.

casacore::Record casa::PlotMSAtm::weather_
private

Definition at line 187 of file PlotMSAtm.h.

bool casa::PlotMSAtm::xIsChan_
private

Definition at line 174 of file PlotMSAtm.h.

Referenced by setXAxisIsChan(), and xAxisIsChan().


The documentation for this class was generated from the following file: