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

this is the VLBI initializer that creats every objects and passes them to the VLBI_scheduler More...

#include <Initializer.h>

Inheritance diagram for VieVS::Initializer:
Collaboration diagram for VieVS::Initializer:

Classes

struct  Parameters
 Parameters used in VLBI_initializer. More...
 
struct  PRECALC
 pre calculated values More...
 

Public Types

enum  MemberType {
  MemberType::station, MemberType::source, MemberType::satellite, MemberType::spacecraft,
  MemberType::baseline
}
 possible member types More...
 

Public Member Functions

 Initializer ()
 
 Initializer (const std::string &path)
 constructor More...
 
 Initializer (const boost::property_tree::ptree &xml)
 constructor More...
 
const boost::property_tree::ptree & getXml () const
 getter for VieSchedpp.xml content More...
 
void precalcSubnettingSrcIds () noexcept
 pre calculates all possible second scans used for subnetting More...
 
void createStations (const SkdCatalogReader &reader, std::ofstream &of) noexcept
 creates all selected stations from sked catalogs More...
 
void initializeStations () noexcept
 initializes all stations with settings from VieSchedpp.xml file More...
 
void precalcAzElStations () noexcept
 precalc azimuth elevations for stations More...
 
void initializeBaselines () noexcept
 initializes all baselines with settings from VieSchedpp.xml file More...
 
void createSources (const SkdCatalogReader &reader, std::ofstream &of) noexcept
 creates all possible sources from sked catalogs More...
 
void createSatellites (const SkdCatalogReader &reader, std::ofstream &of) noexcept
 creates all possible satellites from TLE files More...
 
void createSpacecrafts (const SkdCatalogReader &reader, std::ofstream &of) noexcept
 creates all possible spacecrafts More...
 
void initializeSources (MemberType type) noexcept
 initializes all sources with settings from VieSchedpp.xml file More...
 
void initializeGeneral (std::ofstream &of) noexcept
 initializes general block with settings from VieSchedpp.xml file More...
 
void initializeWeightFactors () noexcept
 initializes the weight factors More...
 
void initializeSkyCoverages () noexcept
 inintializes the sky Coverage lookup table More...
 
void initializeObservingMode (const SkdCatalogReader &skdCatalogs, std::ofstream &of) noexcept
 reads the observing mode information from VieSchedpp.xml file More...
 
void initializeObservingMode (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) noexcept
 creates dummy observing modes file More...
 
void connectObservingMode (std::ofstream &of) noexcept
 sets station names to observing mode and displays summary More...
 
void initializeFocusCornersAlgorithm () noexcept
 initializes focus corner algorithm for intensives if there is one defined in the VieSchedpp.xml file More...
 
void initializeSourceSequence () noexcept
 initializes a custom source sequence if there is one defined in the VieSchedpp.xml file More...
 
std::unordered_map< std::string, std::vector< std::string > > readGroups (boost::property_tree::ptree root, MemberType type) noexcept
 reads all groups specified in the root tree More...
 
void applyMultiSchedParameters (const VieVS::MultiScheduling::Parameters &parameters, int version)
 applies all multi scheduling parameters to the initializer More...
 
std::vector< MultiScheduling::ParametersreadMultiSched (std::ostream &out)
 reads multiSched block from VieSchedpp.xml file More...
 
void initializeAstrometricCalibrationBlocks (std::ofstream &of)
 initializes astrometric calibration block with settings from VieSchedpp.xml file More...
 
void initializeCalibrationBlocks ()
 initializes calibration block with settings from VieSchedpp.xml file More...
 
void statisticsLogHeader (std::ofstream &of, const std::vector< VieVS::MultiScheduling::Parameters > &ms)
 writes statistics log header More...
 
void initializeOptimization (std::ofstream &of)
 initializes optimization conditions with settings from VieSchedpp.xml file More...
 
void initializeHighImpactScanDescriptor (std::ofstream &of)
 initializes high impact scan descriptors with settings from VieSchedpp.xml file More...
 
const NetworkgetNetwork ()
 getter for session network 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 Member Functions

static void initializeAstronomicalParameteres () noexcept
 initializes astronomical parameters More...
 

Private Member Functions

void stationSetup (std::vector< std::vector< Station::Event >> &events, const boost::property_tree::ptree &tree, const std::unordered_map< std::string, ParameterSettings::ParametersStations > &parameters, const std::unordered_map< std::string, std::vector< std::string >> &groups, const Station::Parameters &parentPARA) noexcept
 station setup function More...
 
void sourceSetup (std::vector< std::vector< AbstractSource::Event >> &events, const boost::property_tree::ptree &tree, const std::unordered_map< std::string, ParameterSettings::ParametersSources > &parameters, const std::unordered_map< std::string, std::vector< std::string >> &groups, const AbstractSource::Parameters &parentPARA, MemberType type) noexcept
 source setup function More...
 
void baselineSetup (std::vector< std::vector< Baseline::Event >> &events, const boost::property_tree::ptree &tree, const std::unordered_map< std::string, ParameterSettings::ParametersBaselines > &parameters, const std::unordered_map< std::string, std::vector< std::string >> &groups, const Baseline::Parameters &parentPARA) noexcept
 baseline setup function More...
 
unsigned int minutesVisible (std::shared_ptr< const AbstractSource > source, const AbstractSource::Parameters &parameters, unsigned int start, unsigned int end)
 number of minutes where source is visible More...
 
std::vector< unsigned long > getMembers (const std::string &name, const std::vector< Station > &stations)
 get members of station group More...
 
std::vector< unsigned long > getMembers (const std::string &name, const std::vector< Baseline > &baselines)
 get members of baseline group More...
 
std::vector< unsigned long > getMembers (const std::string &name, const SourceList &sourceList)
 get members of source group More...
 
std::unordered_map< std::string, std::unique_ptr< AbstractFlux > > generateFluxObject (const std::string &name, const std::string &commonname, const std::map< std::string, std::vector< std::string >> &fluxCatalog, bool fluxNecessary, std::ofstream &of)
 

Private Attributes

int version_ = 0
 version More...
 
boost::property_tree::ptree xml_
 content of VieSchedpp.xml file More...
 
SourceList sourceList_
 session source list More...
 
Network network_
 station network More...
 
std::shared_ptr< ObservingModeobsModes_ = nullptr
 observing mode More...
 
Parameters parameters_
 parameters More...
 
PRECALC preCalculated_
 pre calculated values More...
 
std::unordered_map< std::string, std::vector< std::string > > staGroups_
 station groups More...
 
std::unordered_map< std::string, std::vector< std::string > > srcGroups_
 source groups More...
 
std::unordered_map< std::string, std::vector< std::string > > satGroups_
 satellite groups More...
 
std::unordered_map< std::string, std::vector< std::string > > spacecraftGroups_
 spacecraft groups More...
 
std::unordered_map< std::string, std::vector< std::string > > blGroups_
 baseline groups More...
 
boost::optional< HighImpactScanDescriptorhimp_
 high impact scan descriptor More...
 
std::vector< CalibratorBlockcalib_
 calibrator impact scan descriptor More...
 
boost::optional< MultiScheduling::ParametersmultiSchedulingParameters_
 multi scheduling paramters More...
 

Static Private Attributes

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

Friends

class Scheduler
 
class SkdParser
 

Detailed Description

this is the VLBI initializer that creats every objects and passes them to the VLBI_scheduler

Author
Matthias Schartner
Date
28.06.2017

Member Enumeration Documentation

possible member types

Author
Matthias Schartner
Enumerator
station 

stations wise group

source 

source wise group

satellite 

satellite wise group

spacecraft 

spacecraft wise group

baseline 

baseline wise group

Constructor & Destructor Documentation

Initializer::Initializer ( )
Initializer::Initializer ( const std::string &  path)
explicit

constructor

Author
Matthias Schartner
Parameters
pathpath to VieSchedpp.xml file

Here is the call graph for this function:

Initializer::Initializer ( const boost::property_tree::ptree &  xml)
explicit

constructor

Author
Matthias Schartner
Parameters
xmlVieSchedpp.xml file

Here is the call graph for this function:

Member Function Documentation

void Initializer::applyMultiSchedParameters ( const VieVS::MultiScheduling::Parameters parameters,
int  version 
)

applies all multi scheduling parameters to the initializer

Author
Matthias Schartner
Parameters
versionversion number
parametersmulti scheduling parameters

Here is the call graph for this function:

Here is the caller graph for this function:

void Initializer::baselineSetup ( std::vector< std::vector< Baseline::Event >> &  events,
const boost::property_tree::ptree &  tree,
const std::unordered_map< std::string, ParameterSettings::ParametersBaselines > &  parameters,
const std::unordered_map< std::string, std::vector< std::string >> &  groups,
const Baseline::Parameters parentPARA 
)
privatenoexcept

baseline setup function

Author
Matthias Schartner

As a start all parameter form parentPARA are used. If different parameter values are defined in the event these parameters are used instead of the parentPARA parameters.

Parameters
eventslist of all events for baseline
treeproperty tree that holds baseline setup information
parametersall defined parameters
groupsall defined groups
parentPARApreviously used parameters which are are use as template

Here is the call graph for this function:

Here is the caller graph for this function:

void Initializer::connectObservingMode ( std::ofstream &  of)
noexcept

sets station names to observing mode and displays summary

Author
Matthias Schartner
Parameters
ofoutstream to log file

Here is the call graph for this function:

Here is the caller graph for this function:

void Initializer::createSatellites ( const SkdCatalogReader reader,
std::ofstream &  of 
)
noexcept

creates all possible satellites from TLE files

Author
Matthias Schartner
Parameters
readersked catalogs
ofoutstream to log file

Here is the call graph for this function:

Here is the caller graph for this function:

void Initializer::createSources ( const SkdCatalogReader reader,
std::ofstream &  of 
)
noexcept

creates all possible sources from sked catalogs

Author
Matthias Schartner
Parameters
readersked catalogs
ofoutstream to log file

Here is the call graph for this function:

Here is the caller graph for this function:

void Initializer::createSpacecrafts ( const SkdCatalogReader reader,
std::ofstream &  of 
)
noexcept

creates all possible spacecrafts

Author
Matthias Schartner
Parameters
readersked catalogs
ofoutstream to log file

Here is the caller graph for this function:

void Initializer::createStations ( const SkdCatalogReader reader,
std::ofstream &  of 
)
noexcept

creates all selected stations from sked catalogs

Author
Matthias Schartner
Parameters
readersked catalog reader
ofoutstream to log file

Here is the call graph for this function:

Here is the caller graph for this function:

unordered_map< string, unique_ptr< AbstractFlux > > Initializer::generateFluxObject ( const std::string &  name,
const std::string &  commonname,
const std::map< std::string, std::vector< std::string >> &  fluxCatalog,
bool  fluxNecessary,
std::ofstream &  of 
)
private

< baseline length of flux information (type B)

< corresponding flux information for baseline length (type B)

Here is the caller graph for this function:

std::vector< unsigned long > Initializer::getMembers ( const std::string &  name,
const std::vector< Station > &  stations 
)
private

get members of station group

Author
Matthias Schartner
Parameters
namegroup name
stationslist of all available stations
Returns
list of station ids

Here is the caller graph for this function:

std::vector< unsigned long > Initializer::getMembers ( const std::string &  name,
const std::vector< Baseline > &  baselines 
)
private

get members of baseline group

Author
Matthias Schartner
Parameters
namegroup name
baselineslist of all available baselines
Returns
list of baseline ids
std::vector< unsigned long > Initializer::getMembers ( const std::string &  name,
const SourceList sourceList 
)
private

get members of source group

Author
Matthias Schartner
Parameters
namegroup name
sourceListlist of all available sources
Returns
list of source ids

Here is the call graph for this function:

const Network& VieVS::Initializer::getNetwork ( )
inline

getter for session network

Author
Matthias Schartner

This function should only be used for the GUI!

Returns
network object
const boost::property_tree::ptree& VieVS::Initializer::getXml ( ) const
inline

getter for VieSchedpp.xml content

Author
Matthias Schartner
Returns
VieSchedpp.xml content

Here is the call graph for this function:

void Initializer::initializeAstrometricCalibrationBlocks ( std::ofstream &  of)

initializes astrometric calibration block with settings from VieSchedpp.xml file

Author
Matthias Schartner
Parameters
ofoutstream to log file

Here is the call graph for this function:

Here is the caller graph for this function:

void Initializer::initializeAstronomicalParameteres ( )
staticnoexcept

initializes astronomical parameters

Author
Matthias Schartner

Here is the call graph for this function:

Here is the caller graph for this function:

void Initializer::initializeBaselines ( )
noexcept

initializes all baselines with settings from VieSchedpp.xml file

Author
Matthias Schartner

Here is the call graph for this function:

Here is the caller graph for this function:

void Initializer::initializeCalibrationBlocks ( )

initializes calibration block with settings from VieSchedpp.xml file

Author
Matthias Schartner

Here is the call graph for this function:

Here is the caller graph for this function:

void Initializer::initializeFocusCornersAlgorithm ( )
noexcept

initializes focus corner algorithm for intensives if there is one defined in the VieSchedpp.xml file

Author
Matthias Schartner

Here is the caller graph for this function:

void Initializer::initializeGeneral ( std::ofstream &  of)
noexcept

initializes general block with settings from VieSchedpp.xml file

Author
Matthias Schartner
Parameters
ofoutstream to log file

Here is the call graph for this function:

Here is the caller graph for this function:

void Initializer::initializeHighImpactScanDescriptor ( std::ofstream &  of)

initializes high impact scan descriptors with settings from VieSchedpp.xml file

Author
Matthias Schartner
Parameters
ofoutstream to log file

Here is the call graph for this function:

Here is the caller graph for this function:

void VieVS::Initializer::initializeObservingMode ( const SkdCatalogReader skdCatalogs,
std::ofstream &  of 
)
noexcept

reads the observing mode information from VieSchedpp.xml file

Author
Matthias Schartner
Parameters
skdCatalogssked catalogs
ofoutstream to log file

Here is the caller graph for this function:

void Initializer::initializeObservingMode ( 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 
)
noexcept

creates dummy observing modes file

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)
void Initializer::initializeOptimization ( std::ofstream &  of)

initializes optimization conditions with settings from VieSchedpp.xml file

Author
Matthias Schartner
Parameters
ofoutstream to log file

Here is the call graph for this function:

Here is the caller graph for this function:

void Initializer::initializeSkyCoverages ( )
noexcept

inintializes the sky Coverage lookup table

Author
Matthias Schartner

Here is the call graph for this function:

Here is the caller graph for this function:

void Initializer::initializeSources ( MemberType  type)
noexcept

initializes all sources with settings from VieSchedpp.xml file

Author
Matthias Schartner
Parameters
typesource member type

Here is the call graph for this function:

Here is the caller graph for this function:

void Initializer::initializeSourceSequence ( )
noexcept

initializes a custom source sequence if there is one defined in the VieSchedpp.xml file

Author
Matthias Schartner

Here is the call graph for this function:

Here is the caller graph for this function:

void Initializer::initializeStations ( )
noexcept

initializes all stations with settings from VieSchedpp.xml file

Author
Matthias Schartner

Here is the call graph for this function:

Here is the caller graph for this function:

void Initializer::initializeWeightFactors ( )
noexcept

initializes the weight factors

Author
Matthias Schartner

Here is the caller graph for this function:

unsigned int Initializer::minutesVisible ( std::shared_ptr< const AbstractSource source,
const AbstractSource::Parameters parameters,
unsigned int  start,
unsigned int  end 
)
private

number of minutes where source is visible

Author
Matthias Schartner
Parameters
sourcetarget source
parameterssource parameters
startstart time
endend time
Returns
number of minutes where source was visible

Here is the call graph for this function:

Here is the caller graph for this function:

void Initializer::precalcAzElStations ( )
noexcept

precalc azimuth elevations for stations

Author
Matthias Schartner

Here is the call graph for this function:

Here is the caller graph for this function:

void Initializer::precalcSubnettingSrcIds ( )
noexcept

pre calculates all possible second scans used for subnetting

Author
Matthias Schartner

Here is the call graph for this function:

Here is the caller graph for this function:

unordered_map< string, vector< string > > Initializer::readGroups ( boost::property_tree::ptree  root,
MemberType  type 
)
noexcept

reads all groups specified in the root tree

Author
Matthias Schartner
Parameters
roottree start point
typegroup type
Returns
key is group name, value is list of group members

Here is the call graph for this function:

Here is the caller graph for this function:

vector< MultiScheduling::Parameters > Initializer::readMultiSched ( std::ostream &  out)

reads multiSched block from VieSchedpp.xml file

Author
Matthias Schartner
Returns
vector of all possible multisched parameter combination

Here is the call graph for this function:

Here is the caller graph for this function:

void Initializer::sourceSetup ( std::vector< std::vector< AbstractSource::Event >> &  events,
const boost::property_tree::ptree &  tree,
const std::unordered_map< std::string, ParameterSettings::ParametersSources > &  parameters,
const std::unordered_map< std::string, std::vector< std::string >> &  groups,
const AbstractSource::Parameters parentPARA,
MemberType  type 
)
privatenoexcept

source setup function

Author
Matthias Schartner

As a start all parameter form parentPARA are used. If different parameter values are defined in the event these parameters are used instead of the parentPARA parameters.

Parameters
eventslist of all events for sources
treeproperty tree that holds source setup information
parametersall defined parameters
groupsall defined groups
parentPARApreviously used parameters which are are use as template
typesource member type

Here is the call graph for this function:

Here is the caller graph for this function:

void Initializer::stationSetup ( std::vector< std::vector< Station::Event >> &  events,
const boost::property_tree::ptree &  tree,
const std::unordered_map< std::string, ParameterSettings::ParametersStations > &  parameters,
const std::unordered_map< std::string, std::vector< std::string >> &  groups,
const Station::Parameters parentPARA 
)
privatenoexcept

station setup function

Author
Matthias Schartner

As a start all parameter form parentPARA are used. If different parameter values are defined in the event these parameters are used instead of the parentPARA parameters.

Parameters
eventslist of all events for stations
treeproperty tree that holds station setup information
parametersall defined parameters
groupsall defined groups
parentPARApreviously used parameters which are are use as template

Here is the call graph for this function:

Here is the caller graph for this function:

void Initializer::statisticsLogHeader ( std::ofstream &  of,
const std::vector< VieVS::MultiScheduling::Parameters > &  ms 
)

writes statistics log header

Author
Matthias Schartner
Parameters
ofoutstream to statistics.csv file
msvector multi scheduling parameters

Here is the call graph for this function:

Here is the caller graph for this function:

Friends And Related Function Documentation

friend class Scheduler
friend
friend class SkdParser
friend

Member Data Documentation

std::unordered_map<std::string, std::vector<std::string> > VieVS::Initializer::blGroups_
private

baseline groups

std::vector<CalibratorBlock> VieVS::Initializer::calib_
private

calibrator impact scan descriptor

boost::optional<HighImpactScanDescriptor> VieVS::Initializer::himp_
private

high impact scan descriptor

boost::optional<MultiScheduling::Parameters> VieVS::Initializer::multiSchedulingParameters_
private

multi scheduling paramters

Network VieVS::Initializer::network_
private

station network

unsigned long Initializer::nextId = 0
staticprivate

next id for this object type

std::shared_ptr<ObservingMode> VieVS::Initializer::obsModes_ = nullptr
private

observing mode

Parameters VieVS::Initializer::parameters_
private

parameters

PRECALC VieVS::Initializer::preCalculated_
private

pre calculated values

std::unordered_map<std::string, std::vector<std::string> > VieVS::Initializer::satGroups_
private

satellite groups

SourceList VieVS::Initializer::sourceList_
private

session source list

std::unordered_map<std::string, std::vector<std::string> > VieVS::Initializer::spacecraftGroups_
private

spacecraft groups

std::unordered_map<std::string, std::vector<std::string> > VieVS::Initializer::srcGroups_
private

source groups

std::unordered_map<std::string, std::vector<std::string> > VieVS::Initializer::staGroups_
private

station groups

int VieVS::Initializer::version_ = 0
private

version

boost::property_tree::ptree VieVS::Initializer::xml_
private

content of VieSchedpp.xml file


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