VieSched++
VieVS VLBI Scheduling Software
VieVS::AbstractSource Class Referenceabstract

representation of an abstract source which can be scheduled More...

#include <AbstractSource.h>

Inheritance diagram for VieVS::AbstractSource:
Collaboration diagram for VieVS::AbstractSource:

Classes

struct  Event
 changes in parameters More...
 
struct  Optimization
 optimization conditions More...
 
class  Parameters
 source parameters More...
 
struct  Statistics
 statistics More...
 

Public Types

enum  TryToFocusOccurrency { TryToFocusOccurrency::once, TryToFocusOccurrency::perScan }
 source parameters More...
 
enum  TryToFocusType { TryToFocusType::additive, TryToFocusType::multiplicative }
 try to focus type More...
 

Public Member Functions

 AbstractSource (const std::string &src_name, const std::string &src_name2, std::unordered_map< std::string, std::unique_ptr< AbstractFlux >> &src_flux)
 constructor More...
 
virtual ~AbstractSource ()=default
 
const ParametersgetPARA () const
 getter of parameter object More...
 
ParametersreferencePARA ()
 reference of parameter object More...
 
OptimizationreferenceCondition ()
 reference for optimization conditions More...
 
virtual std::vector< double > getSourceInCrs (unsigned int time, const std::shared_ptr< const Position > &sta_pos) const =0
 get source position in CRS More...
 
virtual std::pair< double, double > getRaDe (unsigned int time, const std::shared_ptr< const Position > &sta_pos) const noexcept=0
 
virtual void toVex (std::ofstream &of) const =0
 
virtual void toNgsHeader (std::ofstream &of) const =0
 
std::string getRaString (double ang) const noexcept
 getter for right ascension string More...
 
std::string getDeString (double ang) const noexcept
 getter for declination string More...
 
unsigned long getNObs () const noexcept
 getter for number of observed baselines More...
 
unsigned long getNClosures () const noexcept
 getter for number of independent closure phases and amplitudes More...
 
void increaseNObs () noexcept
 increase number of observations by one More...
 
unsigned int getNscans () const
 geter for number of already scheduled scans to this source More...
 
unsigned int getNTotalScans () const
 geter for number of already scheduled scans to this source More...
 
const OptimizationgetOptimization () const
 get optimization conditons More...
 
unsigned int lastScanTime () const noexcept
 looks for last scan time More...
 
void setEVENTS (std::vector< Event > &EVENTS) noexcept
 sets all events to this source More...
 
ParametersrefParaForMultiScheduling ()
 reference parameters to add multi-scheduling setup More...
 
void setNextEvent (unsigned int nextEvent)
 set next event index More...
 
double getMaxFlux () const noexcept
 get maxium possible flux density More...
 
double getSunDistance (unsigned int time, const std::shared_ptr< const Position > &sta_pos) const noexcept
 get sun distance More...
 
double observedFlux (const std::string &band, unsigned int time, double gmst, const std::vector< double > &dxyz) const noexcept
 observed flux density per band More...
 
std::pair< double, double > calcUV (unsigned int time, double gmst, const std::vector< double > &dxyz) const noexcept
 calc projection of baseline in uv plane More...
 
virtual bool checkForNewEvent (unsigned int time, bool &hardBreak) noexcept
 this function checks if it is time to change the parameters More...
 
void update (unsigned long nsta, unsigned long nbl, unsigned int time, bool addToStatistics) noexcept
 updates scan to this source More...
 
void clearObservations ()
 clear all observations More...
 
void setStatistics (const Statistics &stat)
 set source statistics More...
 
const StatisticsgetStatistics () const
 get source statistics More...
 
double observedFlux_model (double wavelength, unsigned int time, double gmst, const std::vector< double > &dxyz) const
 calculate flux density of any band based on available flux densities More...
 
bool hasFluxInformation (const std::string &band) const
 checks if flux information is available More...
 
- Public Member Functions inherited from VieVS::VieVS_NamedObject
 VieVS_NamedObject (std::string name, unsigned long id)
 constructor More...
 
 VieVS_NamedObject (std::string name, std::string alternativeName, unsigned long id)
 constructor More...
 
const std::string & getName () const
 get object name More...
 
const std::string & getAlternativeName () const
 get object alternative name More...
 
bool hasAlternativeName () const
 check if object has alternative name More...
 
bool hasName (const std::string &name) const
 check if object has name More...
 
void changeName (const std::string &newName)
 change name of object 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...
 

Private Attributes

std::shared_ptr< std::unordered_map< std::string, std::unique_ptr< AbstractFlux > > > flux_
 source flux information per band More...
 
std::vector< Eventevents_
 list of all events More...
 
std::shared_ptr< Optimizationcondition_
 optimization conditions More...
 
Statistics statistics_
 statistics More...
 
Parameters parameters_
 parameters More...
 
unsigned int nextEvent_ { 0 }
 index of next event More...
 
unsigned int lastScan_ { 0 }
 last scan to this source More...
 
unsigned int nScans_ { 0 }
 number of scans to this source that have influence on scheduling algorithms More...
 
unsigned int nTotalScans_ { 0 }
 number of total scans More...
 
unsigned long nObs_ { 0 }
 number of observed baselines to this source More...
 
unsigned long nClosures_ { 0 }
 number of independent closure phases and amplitudes More...
 

Static Private Attributes

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

Detailed Description

representation of an abstract source which can be scheduled

First all source objects must be created, usually via the VLBI_initializer::createSourcesFromCatalogs() Afterwards sources need to be initialized via VLBI_initializer::initializeSources()

Author
Matthias Schartner
Date
28.06.2017

Member Enumeration Documentation

source parameters

Author
Matthias Schartner
Enumerator
once 
perScan 

try to focus type

Author
Matthias Schartner
Enumerator
additive 

additive type

multiplicative 

multiplicative type

Constructor & Destructor Documentation

AbstractSource::AbstractSource ( const std::string &  src_name,
const std::string &  src_name2,
std::unordered_map< std::string, std::unique_ptr< AbstractFlux >> &  src_flux 
)

constructor

Author
Matthias Schartner
Parameters
src_namename of the source
src_name2alternative name of source
src_ra_degright ascension in degrees
src_de_degdeclination in degrees
src_fluxflux information per band
virtual VieVS::AbstractSource::~AbstractSource ( )
virtualdefault

Member Function Documentation

std::pair< double, double > AbstractSource::calcUV ( unsigned int  time,
double  gmst,
const std::vector< double > &  dxyz 
) const
noexcept

calc projection of baseline in uv plane

Author
Matthias Schartner
Parameters
gmstgreenwich mean sidereal time
dxyzbaseline vector
Returns
projection of baseline vector in uv plane

Here is the call graph for this function:

Here is the caller graph for this function:

bool AbstractSource::checkForNewEvent ( unsigned int  time,
bool &  hardBreak 
)
virtualnoexcept

this function checks if it is time to change the parameters

Author
Matthias Schartner
Parameters
timecurrent time
hardBreakflags this to true if a hard break was found
Returns
true if a new event was found

Reimplemented in VieVS::Quasar.

Here is the call graph for this function:

Here is the caller graph for this function:

void AbstractSource::clearObservations ( )

clear all observations

Author
Matthias Schartner

Here is the call graph for this function:

Here is the caller graph for this function:

std::string AbstractSource::getDeString ( double  ang) const
noexcept

getter for declination string

Author
Matthias Schartner
Returns
declination string of the source

Here is the caller graph for this function:

double AbstractSource::getMaxFlux ( ) const
noexcept

get maxium possible flux density

Author
Matthias Schartner
Returns
maxium possible flux density

Here is the caller graph for this function:

unsigned long VieVS::AbstractSource::getNClosures ( ) const
inlinenoexcept

getter for number of independent closure phases and amplitudes

Author
Matthias Schartner
Returns
number of independent closure phases and amplitudes that are already observed for this source
unsigned long VieVS::AbstractSource::getNObs ( ) const
inlinenoexcept

getter for number of observed baselines

Author
Matthias Schartner
Returns
number of baselines already observed for this source
unsigned int VieVS::AbstractSource::getNscans ( ) const
inline

geter for number of already scheduled scans to this source

Author
Matthias Schartner
Returns
number of already scheduled scans that influence schedule
unsigned int VieVS::AbstractSource::getNTotalScans ( ) const
inline

geter for number of already scheduled scans to this source

Author
Matthias Schartner
Returns
number of already scheduled scans in total
const Optimization& VieVS::AbstractSource::getOptimization ( ) const
inline

get optimization conditons

Author
Matthias Schartner
Returns
optimization condition
const Parameters& VieVS::AbstractSource::getPARA ( ) const
inline

getter of parameter object

Author
Matthias Schartner
Returns
parameter object

Here is the caller graph for this function:

virtual std::pair<double, double> VieVS::AbstractSource::getRaDe ( unsigned int  time,
const std::shared_ptr< const Position > &  sta_pos 
) const
pure virtualnoexcept

Implemented in VieVS::Satellite, and VieVS::Quasar.

Here is the caller graph for this function:

std::string AbstractSource::getRaString ( double  ang) const
noexcept

getter for right ascension string

Author
Matthias Schartner
Returns
right ascension string of the source

Here is the caller graph for this function:

virtual std::vector<double> VieVS::AbstractSource::getSourceInCrs ( unsigned int  time,
const std::shared_ptr< const Position > &  sta_pos 
) const
pure virtual

get source position in CRS

Author
Matthias Schartner
Returns
source position vector

Implemented in VieVS::Quasar, and VieVS::Satellite.

Here is the caller graph for this function:

const Statistics& VieVS::AbstractSource::getStatistics ( ) const
inline

get source statistics

Author
Matthias Schartner
Returns
source statistics

Here is the call graph for this function:

double AbstractSource::getSunDistance ( unsigned int  time,
const std::shared_ptr< const Position > &  sta_pos 
) const
noexcept

get sun distance

Author
Matthias Schartner
Returns
sun distance

Here is the call graph for this function:

Here is the caller graph for this function:

bool VieVS::AbstractSource::hasFluxInformation ( const std::string &  band) const
inline

checks if flux information is available

Author
Matthias Schartner
Parameters
bandband name
Returns
true if flux information is available, otherwise false
void VieVS::AbstractSource::increaseNObs ( )
inlinenoexcept

increase number of observations by one

Author
Matthias Schartner
unsigned int VieVS::AbstractSource::lastScanTime ( ) const
inlinenoexcept

looks for last scan time

Author
Matthias Schartner
Returns
last observation time in seconds since session start
double AbstractSource::observedFlux ( const std::string &  band,
unsigned int  time,
double  gmst,
const std::vector< double > &  dxyz 
) const
noexcept

observed flux density per band

Author
Matthias Schartner
Parameters
bandobserved band
gmstgreenwhich meridian sedirial time
dxyzcoordinate difference of participating stations
Returns
observed flux density per band

Here is the call graph for this function:

Here is the caller graph for this function:

double AbstractSource::observedFlux_model ( double  wavelength,
unsigned int  time,
double  gmst,
const std::vector< double > &  dxyz 
) const

calculate flux density of any band based on available flux densities

Author
Matthias Schartner
Parameters
wavelengthtarget wavelength
gmstgreenwhich meridian sedirial time
dxyzcoordinate difference of participating stations
Returns
observed flux density for this wavelength

Here is the call graph for this function:

Here is the caller graph for this function:

Optimization& VieVS::AbstractSource::referenceCondition ( )
inline

reference for optimization conditions

Author
Matthias Schartner
Returns
optimization conditons

Here is the call graph for this function:

Parameters& VieVS::AbstractSource::referencePARA ( )
inline

reference of parameter object

Author
Matthias Schartner
Returns
reference to parameter object

Here is the caller graph for this function:

Parameters& VieVS::AbstractSource::refParaForMultiScheduling ( )
inline

reference parameters to add multi-scheduling setup

Author
Matthias Schartner
Returns
reference to parameters object
void VieVS::AbstractSource::setEVENTS ( std::vector< Event > &  EVENTS)
inlinenoexcept

sets all events to this source

Author
Matthias Schartner
Parameters
EVENTSlist of all events
void VieVS::AbstractSource::setNextEvent ( unsigned int  nextEvent)
inline

set next event index

Author
Matthias Schartner
Parameters
nextEventindex

Here is the call graph for this function:

void VieVS::AbstractSource::setStatistics ( const Statistics stat)
inline

set source statistics

Author
Matthias Schartner
Parameters
statsource statistics
virtual void VieVS::AbstractSource::toNgsHeader ( std::ofstream &  of) const
pure virtual

Implemented in VieVS::Quasar, and VieVS::Satellite.

Here is the caller graph for this function:

virtual void VieVS::AbstractSource::toVex ( std::ofstream &  of) const
pure virtual

Implemented in VieVS::Quasar, and VieVS::Satellite.

Here is the caller graph for this function:

void AbstractSource::update ( unsigned long  nsta,
unsigned long  nbl,
unsigned int  time,
bool  addToStatistics 
)
noexcept

updates scan to this source

Author
Matthias Schartner
Parameters
nstanumber of stations
nblnumber of baselines observed in scan to this source
timescan end time in seconds since start
addToStatisticsflag if scan should have an influence on the further scheduling process

Here is the caller graph for this function:

Member Data Documentation

std::shared_ptr<Optimization> VieVS::AbstractSource::condition_
private

optimization conditions

std::vector<Event> VieVS::AbstractSource::events_
private

list of all events

std::shared_ptr<std::unordered_map<std::string, std::unique_ptr<AbstractFlux> > > VieVS::AbstractSource::flux_
private

source flux information per band

unsigned int VieVS::AbstractSource::lastScan_ { 0 }
private

last scan to this source

unsigned long VieVS::AbstractSource::nClosures_ { 0 }
private

number of independent closure phases and amplitudes

unsigned int VieVS::AbstractSource::nextEvent_ { 0 }
private

index of next event

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

next id for this object type

unsigned long VieVS::AbstractSource::nObs_ { 0 }
private

number of observed baselines to this source

unsigned int VieVS::AbstractSource::nScans_ { 0 }
private

number of scans to this source that have influence on scheduling algorithms

unsigned int VieVS::AbstractSource::nTotalScans_ { 0 }
private

number of total scans

Parameters VieVS::AbstractSource::parameters_
private

parameters

Statistics VieVS::AbstractSource::statistics_
private

statistics


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