VieSched++
VieVS VLBI Scheduling Software
VieVS::ObservingMode Class Reference

observing modes More...

#include <ObservingMode.h>

Inheritance diagram for VieVS::ObservingMode:
Collaboration diagram for VieVS::ObservingMode:

Public Types

enum  Property { Property::required, Property::optional }
 all possible flux information type More...
 
enum  Backup {
  Backup::minValueTimes, Backup::maxValueTimes, Backup::internalModel, Backup::value,
  Backup::none
}
 all possible backup models More...
 
enum  Type { Type::simple, Type::sked, Type::custom }
 observing mode types More...
 

Public Member Functions

 ObservingMode ()
 constructor More...
 
 ObservingMode (const boost::property_tree::ptree &tree, const std::vector< std::string > &staNames)
 constructor More...
 
void setStationNames (const std::vector< std::string > &names)
 set station names More...
 
void readFromSkedCatalogs (const SkdCatalogReader &skd)
 read observin mode from sked catalogs More...
 
boost::property_tree::ptree toPropertytree () const
 converts object to property tree More...
 
void simpleMode (unsigned long nsta, double samplerate, unsigned int bits, const std::unordered_map< std::string, unsigned int > &band2channel, const std::unordered_map< std::string, double > &band2wavelength, double efficiencyFactor=-1)
 add observing mode from simple manual model More...
 
void addMode (const std::shared_ptr< const Mode > &newMode)
 add new observing mode More...
 
void addBlock (const std::shared_ptr< const If > &newIf)
 add IF block More...
 
void addBlock (const std::shared_ptr< const Bbc > &newBbc)
 add BBC block More...
 
void addBlock (const std::shared_ptr< const Freq > &newFreq)
 add FREQ block More...
 
void addBlock (const std::shared_ptr< const Track > &newTrack)
 add TRACKS block More...
 
void addBlock (const std::string &newTrackFrameFormat)
 add track frame format More...
 
const std::shared_ptr< const Mode > & getMode (unsigned long id) const
 get MODE block More...
 
void toVexModeBlock (std::ofstream &of) const
 write MODE section in vex format More...
 
void toVexFreqBlock (std::ofstream &of) const
 write FREQ section in vex format More...
 
void toVexBbcBlock (std::ofstream &of) const
 write BBC section in vex format More...
 
void toVexIfBlock (std::ofstream &of) const
 write IF section in vex format More...
 
void toVexTracksBlock (std::ofstream &of) const
 write FREQ section in vex format More...
 
void summary (std::ofstream &of) const
 write observing mode summary More...
 
void operationNotesSummary (std::ofstream &of) const
 write observing mode summary for operation notes More...
 
void calcMeanFrequencies ()
 calculate mean frequencies More...
 
void addDummyBands (const std::map< std::string, std::vector< double >> &band)
 add bands manually More...
 
const std::vector< std::string > & getStationNames () const
 getter for all station names More...
 
const std::vector< std::shared_ptr< const Mode > > & getModes () const
 getter for all MODE blocks More...
 
const std::vector< std::shared_ptr< const If > > & getIfs () const
 getter for all IF blocks More...
 
const std::vector< std::shared_ptr< const Bbc > > & getBbcs () const
 getter for all BBC blocks More...
 
const std::vector< std::shared_ptr< const Freq > > & getFreqs () const
 getter for all FREQ blocks More...
 
const std::vector< std::shared_ptr< const Track > > & getTracks () const
 getter for all TRACKS blocks More...
 
const std::vector< std::shared_ptr< const std::string > > & getTrackFrameFormats () const
 getter for all track frame formats More...
 
std::shared_ptr< const ModegetModePerIndex (int idx)
 get MODE block per index More...
 
std::shared_ptr< const FreqgetFreqPerIndex (int idx)
 get FREQ block per index More...
 
std::shared_ptr< const BbcgetBbcPerIndex (int idx)
 get BBC block per index More...
 
std::shared_ptr< const IfgetIfPerIndex (int idx)
 get IF block per index More...
 
std::shared_ptr< const TrackgetTracksPerIndex (int idx)
 get TRACKS block per index More...
 
- Public Member Functions inherited from VieVS::VieVS_Object
 VieVS_Object (unsigned long id)
 constructor More...
 
const unsigned long getId () const
 get object id More...
 
bool hasValidId () const
 check if id is valid More...
 
bool hasId (unsigned long id) const
 check if object has specific id More...
 
void setId (unsigned long id)
 set object id More...
 
std::string printId () const
 object id string More...
 

Static Public Attributes

static Type type = VieVS::ObservingMode::Type::simple
 flag if manual observation mode was selected More...
 
static std::unordered_map< std::string, double > minSNR
 minimum signal to noise ration per band More...
 
static std::unordered_map< std::string, PropertystationProperty
 is band required or optional for station More...
 
static std::unordered_map< std::string, BackupstationBackup
 backup version for station More...
 
static std::unordered_map< std::string, double > stationBackupValue
 backup value for station More...
 
static std::unordered_map< std::string, PropertysourceProperty
 is band required or optional for source More...
 
static std::unordered_map< std::string, BackupsourceBackup
 backup version for source More...
 
static std::unordered_map< std::string, double > sourceBackupValue
 backup value for source More...
 
static std::set< std::string > bands
 list of all observed bands More...
 
static std::unordered_map< std::string, double > wavelengths
 backup wavelength for commonly used bands More...
 

Private Member Functions

void readSkdFreq (const std::shared_ptr< Mode > &mode, const SkdCatalogReader &skd, const std::map< int, std::pair< int, Freq::Net_sideband >> &channelNr2Bbc)
 create FREQ block from skd catalogs More...
 
std::map< int, std::pair< int, Freq::Net_sideband > > readSkdTracks (const std::shared_ptr< Mode > &mode, const SkdCatalogReader &skd)
 create TRACKS block from skd catalogs More...
 
void readSkdIf (const std::shared_ptr< Mode > &mode, const SkdCatalogReader &skd)
 create IF block from skd catalogs More...
 
void readSkdBbc (const std::shared_ptr< Mode > &mode, const SkdCatalogReader &skd)
 create BBC block from skd catalogs More...
 
void readSkdTrackFrameFormat (const std::shared_ptr< Mode > &mode, const SkdCatalogReader &skd)
 create track frame format from skd catalogs More...
 
void toTrackFrameFormatDefinitions (std::ofstream &of) const
 create track frame format blocks in vex format More...
 
std::vector< unsigned long > getStationIds (const boost::property_tree::ptree &tree)
 get list of station ids from property tree More...
 

Private Attributes

std::vector< std::string > stationNames_
 station names More...
 
std::vector< std::shared_ptr< const Mode > > modes_
 list of all MODE blocks More...
 
std::vector< std::shared_ptr< const If > > ifs_
 list of all IF blocks More...
 
std::vector< std::shared_ptr< const Bbc > > bbcs_
 list of all BBC blocks More...
 
std::vector< std::shared_ptr< const Freq > > freqs_
 list of all FREQ blocks More...
 
std::vector< std::shared_ptr< const Track > > tracks_
 list of all TRACKs blocks More...
 
std::vector< std::shared_ptr< const std::string > > trackFrameFormats_
 list of all track frame formats More...
 

Static Private Attributes

static unsigned long nextId = 0
 next id for this object type More...
 

Detailed Description

observing modes

following vex standard

Author
Matthias Schartner
Date
27.10.2018

Member Enumeration Documentation

all possible backup models

Author
Matthias Schartner
Enumerator
minValueTimes 

use minimum value found in other bands times a factor

maxValueTimes 

use maximum value found in other bands times a factor

internalModel 

use internal model to derive flux density of sources (sources only)

value 

use specific value

none 

no backup model

all possible flux information type

Author
Matthias Schartner
Enumerator
required 

this band information is required. If this information is missing this object is not used.

optional 

calculated based on backup model

this band information is only optional. If information is available it is used, otherwise it is

observing mode types

Author
Matthias Schartner
Enumerator
simple 

simple observing mode

sked 

observing mode from sked catalogs

custom 

custom observing mode

Constructor & Destructor Documentation

ObservingMode::ObservingMode ( )

constructor

Author
Matthias Schartner
ObservingMode::ObservingMode ( const boost::property_tree::ptree &  tree,
const std::vector< std::string > &  staNames 
)

constructor

Author
Matthias Schartner
Parameters
treeinput property tree from xml file
staNamesstation names

Here is the call graph for this function:

Member Function Documentation

void VieVS::ObservingMode::addBlock ( const std::shared_ptr< const If > &  newIf)
inline

add IF block

Author
Matthias Schartner
Parameters
newIfIF block

Here is the caller graph for this function:

void VieVS::ObservingMode::addBlock ( const std::shared_ptr< const Bbc > &  newBbc)
inline

add BBC block

Author
Matthias Schartner
Parameters
newBbcBBC block
void VieVS::ObservingMode::addBlock ( const std::shared_ptr< const Freq > &  newFreq)
inline

add FREQ block

Author
Matthias Schartner
Parameters
newFreqFREQ block
void VieVS::ObservingMode::addBlock ( const std::shared_ptr< const Track > &  newTrack)
inline

add TRACKS block

Author
Matthias Schartner
Parameters
newTrackTRACKS block
void VieVS::ObservingMode::addBlock ( const std::string &  newTrackFrameFormat)
inline

add track frame format

Author
Matthias Schartner
Parameters
newTrackFrameFormattrack frame format
void ObservingMode::addDummyBands ( const std::map< std::string, std::vector< double >> &  band)

add bands manually

Author
Matthias Schartner
Parameters
bandlist of bands and frequencies

Here is the caller graph for this function:

void VieVS::ObservingMode::addMode ( const std::shared_ptr< const Mode > &  newMode)
inline

add new observing mode

Author
Matthias Schartner
Parameters
newModenew observing mode

Here is the caller graph for this function:

void ObservingMode::calcMeanFrequencies ( )

calculate mean frequencies

Author
Matthias Schartner

Here is the call graph for this function:

Here is the caller graph for this function:

std::shared_ptr<const Bbc> VieVS::ObservingMode::getBbcPerIndex ( int  idx)
inline

get BBC block per index

Author
Matthias Schartner

This function is used for setting up manual observing mode in the GUI

Parameters
idxindex of requried block
Returns
required block
const std::vector<std::shared_ptr<const Bbc> >& VieVS::ObservingMode::getBbcs ( ) const
inline

getter for all BBC blocks

Author
Matthias Schartner

This function is used for setting up manual observing mode in the GUI

Returns
list of all BBC blocks
std::shared_ptr<const Freq> VieVS::ObservingMode::getFreqPerIndex ( int  idx)
inline

get FREQ block per index

Author
Matthias Schartner

This function is used for setting up manual observing mode in the GUI

Parameters
idxindex of requried block
Returns
required block
const std::vector<std::shared_ptr<const Freq> >& VieVS::ObservingMode::getFreqs ( ) const
inline

getter for all FREQ blocks

Author
Matthias Schartner

This function is used for setting up manual observing mode in the GUI

Returns
list of all FREQ blocks
std::shared_ptr<const If> VieVS::ObservingMode::getIfPerIndex ( int  idx)
inline

get IF block per index

Author
Matthias Schartner

This function is used for setting up manual observing mode in the GUI

Parameters
idxindex of requried block
Returns
required block
const std::vector<std::shared_ptr<const If> >& VieVS::ObservingMode::getIfs ( ) const
inline

getter for all IF blocks

Author
Matthias Schartner

This function is used for setting up manual observing mode in the GUI

Returns
list of all IF blocks
const std::shared_ptr<const Mode>& VieVS::ObservingMode::getMode ( unsigned long  id) const
inline

get MODE block

Author
Matthias Schartner
Parameters
id
Returns
MODE block

Here is the call graph for this function:

Here is the caller graph for this function:

std::shared_ptr<const Mode> VieVS::ObservingMode::getModePerIndex ( int  idx)
inline

get MODE block per index

Author
Matthias Schartner

This function is used for setting up manual observing mode in the GUI

Parameters
idxindex of requried block
Returns
required block
const std::vector<std::shared_ptr<const Mode> >& VieVS::ObservingMode::getModes ( ) const
inline

getter for all MODE blocks

Author
Matthias Schartner

This function is used for setting up manual observing mode in the GUI

Returns
list of all MODE blocks
std::vector< unsigned long > ObservingMode::getStationIds ( const boost::property_tree::ptree &  tree)
private

get list of station ids from property tree

Author
Matthias Schartner
Parameters
treeinput property tree
Returns
list of station ids

Here is the caller graph for this function:

const std::vector<std::string>& VieVS::ObservingMode::getStationNames ( ) const
inline

getter for all station names

Author
Matthias Schartner

This function is used for setting up manual observing mode in the GUI

Returns
all station names
const std::vector<std::shared_ptr<const std::string> >& VieVS::ObservingMode::getTrackFrameFormats ( ) const
inline

getter for all track frame formats

Author
Matthias Schartner

This function is used for setting up manual observing mode in the GUI

Returns
list of all track frame formats
const std::vector<std::shared_ptr<const Track> >& VieVS::ObservingMode::getTracks ( ) const
inline

getter for all TRACKS blocks

Author
Matthias Schartner

This function is used for setting up manual observing mode in the GUI

Returns
list of all TRACKS blocks
std::shared_ptr<const Track> VieVS::ObservingMode::getTracksPerIndex ( int  idx)
inline

get TRACKS block per index

Author
Matthias Schartner

This function is used for setting up manual observing mode in the GUI

Parameters
idxindex of requried block
Returns
required block
void ObservingMode::operationNotesSummary ( std::ofstream &  of) const

write observing mode summary for operation notes

Author
Matthias Schartner
Parameters
ofoperation Nnotes file stream

Here is the caller graph for this function:

void ObservingMode::readFromSkedCatalogs ( const SkdCatalogReader skd)

read observin mode from sked catalogs

Author
Matthias Schartner
Parameters
skdsked catalog reader

Here is the call graph for this function:

Here is the caller graph for this function:

void ObservingMode::readSkdBbc ( const std::shared_ptr< Mode > &  mode,
const SkdCatalogReader skd 
)
private

create BBC block from skd catalogs

Author
Matthias Schartner
Parameters
modeMODE block
skdskd catalogs

Here is the call graph for this function:

Here is the caller graph for this function:

void ObservingMode::readSkdFreq ( const std::shared_ptr< Mode > &  mode,
const SkdCatalogReader skd,
const std::map< int, std::pair< int, Freq::Net_sideband >> &  channelNr2Bbc 
)
private

create FREQ block from skd catalogs

Author
Matthias Schartner
Parameters
modeMODE block
skdskd catalogs
channelNr2Bbcchannel number to bbc

Here is the call graph for this function:

Here is the caller graph for this function:

void ObservingMode::readSkdIf ( const std::shared_ptr< Mode > &  mode,
const SkdCatalogReader skd 
)
private

create IF block from skd catalogs

Author
Matthias Schartner
Parameters
modeMODE block
skdskd catalogs

Here is the call graph for this function:

Here is the caller graph for this function:

void ObservingMode::readSkdTrackFrameFormat ( const std::shared_ptr< Mode > &  mode,
const SkdCatalogReader skd 
)
private

create track frame format from skd catalogs

Author
Matthias Schartner
Parameters
modeMODE block
skdskd catalogs

Here is the call graph for this function:

Here is the caller graph for this function:

std::map< int, pair< int, Freq::Net_sideband > > ObservingMode::readSkdTracks ( const std::shared_ptr< Mode > &  mode,
const SkdCatalogReader skd 
)
private

create TRACKS block from skd catalogs

Author
Matthias Schartner
Parameters
modeMODE block
skdskd catalogs
Returns
channel number to bbc number map

Here is the call graph for this function:

Here is the caller graph for this function:

void VieVS::ObservingMode::setStationNames ( const std::vector< std::string > &  names)
inline

set station names

Author
Matthias Schartner
Parameters
nameslist of station names

Here is the call graph for this function:

void ObservingMode::simpleMode ( unsigned long  nsta,
double  samplerate,
unsigned int  bits,
const std::unordered_map< std::string, unsigned int > &  band2channel,
const std::unordered_map< std::string, double > &  band2wavelength,
double  efficiencyFactor = -1 
)

add observing mode from simple manual model

Author
Matthias Schartner
Parameters
nstanumber of stations
sampleratesample rate
bitssampling bits
band2channelband name to number of channels
band2wavelengthband name to wavelength
efficiencyFactorrecording efficiency factor (use -1 for internal calculation)

Here is the call graph for this function:

Here is the caller graph for this function:

void ObservingMode::summary ( std::ofstream &  of) const

write observing mode summary

Author
Matthias Schartner
Parameters
ofoutput file stream

Here is the call graph for this function:

Here is the caller graph for this function:

boost::property_tree::ptree ObservingMode::toPropertytree ( ) const

converts object to property tree

Author
Matthias Schartner
Returns
property tree

Here is the caller graph for this function:

void ObservingMode::toTrackFrameFormatDefinitions ( std::ofstream &  of) const
private

create track frame format blocks in vex format

Author
Matthias Schartner
Parameters
ofvex file stream

Here is the caller graph for this function:

void ObservingMode::toVexBbcBlock ( std::ofstream &  of) const

write BBC section in vex format

Author
Matthias Schartner
Parameters
ofvex file stream

Here is the caller graph for this function:

void ObservingMode::toVexFreqBlock ( std::ofstream &  of) const

write FREQ section in vex format

Author
Matthias Schartner
Parameters
ofvex file stream

Here is the caller graph for this function:

void ObservingMode::toVexIfBlock ( std::ofstream &  of) const

write IF section in vex format

Author
Matthias Schartner
Parameters
ofvex file stream

Here is the caller graph for this function:

void ObservingMode::toVexModeBlock ( std::ofstream &  of) const

write MODE section in vex format

Author
Matthias Schartner
Parameters
ofvex file stream

Here is the caller graph for this function:

void ObservingMode::toVexTracksBlock ( std::ofstream &  of) const

write FREQ section in vex format

Author
Matthias Schartner
Parameters
ofvex file stream

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

std::set< std::string > VieVS::ObservingMode::bands
static

list of all observed bands

std::vector<std::shared_ptr<const Bbc> > VieVS::ObservingMode::bbcs_
private

list of all BBC blocks

std::vector<std::shared_ptr<const Freq> > VieVS::ObservingMode::freqs_
private

list of all FREQ blocks

std::vector<std::shared_ptr<const If> > VieVS::ObservingMode::ifs_
private

list of all IF blocks

std::unordered_map< std::string, double > VieVS::ObservingMode::minSNR
static

minimum signal to noise ration per band

backup min SNR

std::vector<std::shared_ptr<const Mode> > VieVS::ObservingMode::modes_
private

list of all MODE blocks

unsigned long VieVS::ObservingMode::nextId = 0
staticprivate

next id for this object type

std::unordered_map< std::string, VieVS::ObservingMode::Backup > VieVS::ObservingMode::sourceBackup
static

backup version for source

std::unordered_map< std::string, double > VieVS::ObservingMode::sourceBackupValue
static

backup value for source

std::unordered_map< std::string, VieVS::ObservingMode::Property > VieVS::ObservingMode::sourceProperty
static

is band required or optional for source

std::unordered_map< std::string, VieVS::ObservingMode::Backup > VieVS::ObservingMode::stationBackup
static

backup version for station

std::unordered_map< std::string, double > VieVS::ObservingMode::stationBackupValue
static

backup value for station

std::vector<std::string> VieVS::ObservingMode::stationNames_
private

station names

std::unordered_map< std::string, VieVS::ObservingMode::Property > VieVS::ObservingMode::stationProperty
static

is band required or optional for station

std::vector<std::shared_ptr<const std::string> > VieVS::ObservingMode::trackFrameFormats_
private

list of all track frame formats

std::vector<std::shared_ptr<const Track> > VieVS::ObservingMode::tracks_
private

list of all TRACKs blocks

flag if manual observation mode was selected

std::unordered_map< std::string, double > VieVS::ObservingMode::wavelengths
static
Initial value:
{
{ "S", util::freqency2wavelenth( 2291 * 1e6 ) }, { "X", util::freqency2wavelenth( 8593 * 1e6 ) } }

backup wavelength for commonly used bands


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