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

representation of a VLBI scan More...

#include <Scan.h>

Inheritance diagram for VieVS::Scan:
Collaboration diagram for VieVS::Scan:

Classes

struct  ScanSequence
 specify custom scan sequence rules More...
 

Public Types

enum  ScanConstellation { ScanConstellation::single, ScanConstellation::subnetting }
 scan constellation type More...
 
enum  ScanType {
  ScanType::highImpact, ScanType::standard, ScanType::fillin, ScanType::astroCalibrator,
  ScanType::calibrator
}
 scan type More...
 

Public Member Functions

bool check ()
 internal debugging function that checks if the number of pointing vectors is equal to nsta More...
 
 Scan (std::vector< PointingVector > &pointingVectors, std::vector< unsigned int > &endOfLastScan, ScanType type)
 constructor More...
 
 Scan (std::vector< PointingVector > pv, ScanTimes times, std::vector< Observation > obs, ScanType type=Scan::ScanType::standard)
 constructor More...
 
 Scan (const boost::property_tree::ptree &ptree, Network &network, const SourceList &sourceList, ScanType type=Scan::ScanType::standard)
 constructor based on property tree More...
 
void setType (ScanType type) noexcept
 sets the scan type More...
 
const ScanTimesgetTimes () const noexcept
 getter to get all scan times More...
 
ScanTimesreferenceTime () noexcept
 referenct to all scan times More...
 
unsigned long getNSta () const noexcept
 getter for number of stations More...
 
unsigned long getStationId (int idx) const noexcept
 getter for station id for one index More...
 
unsigned long getSourceId () const noexcept
 getter for source id More...
 
const PointingVectorgetPointingVector (int idx, Timestamp ts=Timestamp::start) const noexcept
 getter for pointing vector for an index More...
 
PointingVectorreferencePointingVector (int idx, Timestamp ts=Timestamp::start) noexcept
 reference to pointing vector for an index More...
 
double getScore () const noexcept
 getter for the total score of this scan More...
 
ScanType getType () const noexcept
 getter for scan type More...
 
ScanConstellation getScanConstellation () const noexcept
 getter for scan constellation type More...
 
const ObservationgetObservation (int idx) const noexcept
 getter for a single observations More...
 
ObservationrefObservation (int idx) noexcept
 referemce to a single observations More...
 
ObservationrefObservation (unsigned long staid1, unsigned long staid2)
 referemce to a single observations More...
 
std::vector< Observation > & refObservations ()
 referemces to all observations More...
 
const std::vector< Observation > & getObservations () const noexcept
 get all observations More...
 
bool removeStation (int idx, const std::shared_ptr< const AbstractSource > &source) noexcept
 delete the pointing vector at position idx and all its corresponding times and observations More...
 
bool removeObservation (int iobs, const std::shared_ptr< const AbstractSource > &source) noexcept
 delete the observation at position iobs from scan More...
 
boost::optional< unsigned long > findIdxOfStationId (unsigned long id) const noexcept
 finds the index of an station id More...
 
void addTimes (int idx, unsigned int fieldSystem, unsigned int slew, unsigned int preob) noexcept
 adds scan times More...
 
bool constructObservations (const Network &network, const std::shared_ptr< const AbstractSource > &source) noexcept
 constructs all possible observations More...
 
bool checkIdleTimes (std::vector< unsigned int > &maxIdle, const std::shared_ptr< const AbstractSource > &source) noexcept
 checks if the idle time is not too long More...
 
bool calcObservationDuration (const Network &network, const std::shared_ptr< const AbstractSource > &source, const std::shared_ptr< const Mode > &mode) noexcept
 calculates the scan durations per observation More...
 
double getAverageSNR (const Network &network, const std::shared_ptr< const AbstractSource > &source, const std::shared_ptr< const Mode > &mode)
 calculates the average SNR of all observations in this scan More...
 
bool scanDuration (const Network &network, const std::shared_ptr< const AbstractSource > &source) noexcept
 calculates the total scan duration per station More...
 
std::vector< unsigned long > getStationIds () const noexcept
 getter for all station ids More...
 
void calcScore (const std::vector< double > &astas, const std::vector< double > &asrcs, const std::vector< double > &abls, unsigned int minTime, unsigned int maxTime, const Network &network, const std::shared_ptr< const AbstractSource > &source, bool subnetting, const std::vector< double > &idleScore) noexcept
 calculates the score of a scan More...
 
void calcScore (const std::vector< double > &astas, const std::vector< double > &asrcs, const std::vector< double > &abls, unsigned int minTime, unsigned int maxTime, const Network &network, const std::shared_ptr< const AbstractSource > &source, std::unordered_map< unsigned long, double > &staids2skyCoverageScore, const std::vector< double > &idleScore) noexcept
 calculates the score of a scan More...
 
void calcScore_subnetting (const std::vector< double > &astas, const std::vector< double > &asrcs, const std::vector< double > &abls, unsigned int minTime, unsigned int maxTime, const Network &network, const std::shared_ptr< const AbstractSource > &source, const std::unordered_map< unsigned long, double > &staids2skyCoverageScore, const std::vector< double > &idleScore) noexcept
 calculates the score of a scan More...
 
void calcScore (unsigned int minTime, unsigned int maxTime, const Network &network, const std::shared_ptr< const AbstractSource > &source, double hiscore, bool subnetting)
 calc score for high impact scans More...
 
bool calcScore (const std::vector< double > &prevLowElevationScores, const std::vector< double > &prevHighElevationScores, const Network &network, unsigned int minRequiredTime, unsigned int maxRequiredTime, const std::shared_ptr< const AbstractSource > &source, bool subnetting)
 calculates the score for a astrometric calibrator block scan More...
 
void calcScoreCalibrator (const Network &network, const std::shared_ptr< const AbstractSource > &source, const std::vector< double > &astas, double meanSNR, unsigned int minRequiredTime, unsigned int maxRequiredTime)
 calculates the score for a calibrator block scan More...
 
bool rigorousUpdate (Network &network, const std::shared_ptr< const AbstractSource > &source, const std::shared_ptr< const Mode > &mode, const boost::optional< StationEndposition > &endposition=boost::none) noexcept
 checks a scan with rigorous models More...
 
void addTagalongStation (const PointingVector &pv_start, const PointingVector &pv_end, const std::vector< Observation > &observations, unsigned int slewtime, const Station &station)
 adds observation to scan in tagalong mode More...
 
boost::optional< ScancopyScan (const std::vector< unsigned long > &ids, const std::shared_ptr< const AbstractSource > &source) const noexcept
 makes a hard copy of a scan with all stations from parameter ids More...
 
unsigned long getNObs () const noexcept
 getter for number of observations More...
 
unsigned long getNObs (unsigned long staid) const noexcept
 getter for number of observations per station More...
 
void setFixedScanDuration (unsigned int scanDuration) noexcept
 set fixed scan duration More...
 
void output (unsigned long observed_scan_nr, const Network &network, const std::shared_ptr< const AbstractSource > &source, std::ofstream &of) const noexcept
 outputs information of this scan to the current console More...
 
bool setScanTimes (const std::vector< unsigned int > &eols, const std::vector< unsigned int > &fieldSystemTime, const std::vector< unsigned int > &slewTime, const std::vector< unsigned int > &preob, unsigned int scanStart, const std::vector< unsigned int > &observingTimes)
 set scan times More...
 
bool setScanTimes (const std::vector< unsigned int > &eols, const std::vector< unsigned int > &fieldSystemTime, const std::vector< unsigned int > &slewTime, const std::vector< unsigned int > &preob, const std::vector< unsigned int > &scanStart, const std::vector< unsigned int > &observingTimes)
 set scan times More...
 
void setPointingVectorsEndtime (std::vector< PointingVector > pv_end)
 set pointing vector at scan end time More...
 
void setObservations (std::vector< Observation > obs)
 sets observation vector More...
 
void createDummyObservations (const Network &network)
 create dummy observations More...
 
void setPointingVector (int idx, PointingVector pv, Timestamp ts)
 set pointing vector More...
 
void removeUnnecessaryObservingTime (Network &network, const std::shared_ptr< const AbstractSource > &thisSource, std::ofstream &of, Timestamp ts)
 remove unnecessary observing time More...
 
void removeAdditionalObservingTime (unsigned int time, const Station &thisSta, const std::shared_ptr< const AbstractSource > &thisSource, std::ofstream &of, Timestamp ts)
 remove additional observing time More...
 
void updateObservingTime ()
 updates the time of each observation according to the observing times of the station More...
 
bool prepareForScanEnd (Network &network, const std::shared_ptr< const AbstractSource > &source, const std::shared_ptr< const Mode > &mode, unsigned int endTime)
 remove stations from scan whose observations last longer then session More...
 
std::string getName (unsigned long indexOfThisScanInList, const std::vector< Scan > &otherScans) const
 get scan name in vex format More...
 
unsigned long indexOfObservation (unsigned long staid1, unsigned long staid2) const
 check if a obseration betwen two stations is scheduled More...
 
std::string toSkedOutputTimes (const std::shared_ptr< const AbstractSource > &source, unsigned long nMaxSta) const
 output observing duration in sked output format More...
 
void includesStations (std::vector< char > &flag) const
 checks if station is participating and notes it in flag vector More...
 
boost::property_tree::ptree toPropertyTree (const Network &network, const std::string &sourceName) const
 convert scan to property tree 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 std::string toString (ScanType type_)
 translates ScanType to string More...
 
static std::string toString (ScanConstellation type_)
 translates ScanConstellation to string More...
 
static unsigned long numberOfCreatedObjects ()
 get total number of created scans More...
 

Static Public Attributes

static unsigned int nScanSelections { 0 }
 number of selected main scans More...
 
static ScanSequence scanSequence
 scan sequence rules More...
 

Private Member Functions

bool rigorousSlewtime (Network &network, const std::shared_ptr< const AbstractSource > &source) noexcept
 scan constellation type More...
 
bool rigorousTotalObservingDuration (Network &network, const std::shared_ptr< const AbstractSource > &source) noexcept
 rigorous total observing duration calculation More...
 
bool rigorousScanStartTimeAlignment (Network &network, const std::shared_ptr< const AbstractSource > &source, const std::shared_ptr< const Mode > &mode) noexcept
 rigorous scan alignment More...
 
bool rigorousScanVisibility (Network &network, const std::shared_ptr< const AbstractSource > &source, bool &stationRemoved) noexcept
 rigorous scan visibility More...
 
bool rigorousScanCanReachEndposition (const Network &network, const std::shared_ptr< const AbstractSource > &thisSource, const boost::optional< StationEndposition > &endposition, bool &stationRemoved)
 rigorous check if scan can reach required endposition More...
 
bool rigorousSunDistance (const Network &network, const std::shared_ptr< const AbstractSource > &thisSource)
 rigorous check if sun distance is large enough More...
 
bool rigorousSourceVelocity (Network &network, const std::shared_ptr< const AbstractSource > &thisSource)
 rigorous check that source is not moving faster than antenna slew speed More...
 
double calcScore_numberOfObservations (unsigned long maxObs) const noexcept
 calculates the score for number of observations More...
 
double calcScore_averageBaselines (const std::vector< double > &abls) const noexcept
 calculates score for average baseline observations More...
 
double calcScore_averageStations (const std::vector< double > &astas, unsigned long nMaxBls) const noexcept
 calculates score for average station observations More...
 
double calcScore_averageSources (const std::vector< double > &asrcs, unsigned long nMaxBls) const noexcept
 calculates score for average source observations More...
 
double calcScore_duration (unsigned long nMaxSta, unsigned int minTime, unsigned int maxTime) const noexcept
 calculates score for duration More...
 
double calcScore_idleTime (const std::vector< double > &idleScore) const noexcept
 calculates score based on idle time More...
 
double calcScore_closures (unsigned long nclosures_max, const std::shared_ptr< const AbstractSource > &source) const noexcept
 calculte score based on number of independent closure phases and amplitudes More...
 
double weight_stations (const std::vector< Station > &stations)
 mean of the weight factors for each participating station More...
 
double weight_baselines (const std::vector< Baseline > &baselines)
 mean of the weight factors for each participating baselines More...
 
double calcScore_lowElevation (unsigned long nmaxsta)
 calculate score for low elevation scans More...
 
double calcScore_lowDeclination (unsigned long nMaxObs)
 calculate score for low declination scans More...
 
double calcScore_firstPart (const std::vector< double > &astas, const std::vector< double > &asrcs, const std::vector< double > &abls, unsigned int minTime, unsigned int maxTime, const Network &network, const std::shared_ptr< const AbstractSource > &source, bool subnetting, const std::vector< double > &idleScore)
 first part of score calculation More...
 
double calcScore_secondPart (double this_score, const Network &network, const std::shared_ptr< const AbstractSource > &source, bool ignoreScanSequence=false)
 second part of score calculations More...
 

Private Attributes

unsigned long nsta_
 number of stations in this scan More...
 
unsigned long srcid_
 observed source id More...
 
double score_
 total score More...
 
ScanTimes times_
 time information More...
 
std::vector< PointingVectorpointingVectorsStart_
 pointing vectors at start of the scan More...
 
std::vector< PointingVectorpointingVectorsEnd_
 pointing vectors at end of the scan More...
 
std::vector< Observationobservations_
 all observed baselines More...
 
ScanType type_
 type of the scan More...
 
ScanConstellation constellation_
 

Static Private Attributes

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

Detailed Description

representation of a VLBI scan

Author
Matthias Schartner
Date
29.06.2017

Member Enumeration Documentation

scan constellation type

Author
Matthias Schartner
Enumerator
single 

single source scan

subnetting 

subnetting scan

enum VieVS::Scan::ScanType
strong

scan type

Author
Matthias Schartner
Enumerator
highImpact 

high impact scan

standard 

standard scan

fillin 

fillin mode scan

astroCalibrator 

astrometric calibrator scan

calibrator 

fringe finder

Constructor & Destructor Documentation

VieVS::Scan::Scan ( std::vector< PointingVector > &  pointingVectors,
std::vector< unsigned int > &  endOfLastScan,
ScanType  type 
)

constructor

Author
Matthias Schartner

This constructor is used to create all single source scans

Parameters
pointingVectorsall pointing vectors
endOfLastScantime information for endtime of last scan for each station in seconds since session start
typescan type

Here is the caller graph for this function:

VieVS::Scan::Scan ( std::vector< PointingVector pv,
ScanTimes  times,
std::vector< Observation obs,
ScanType  type = Scan::ScanType::standard 
)

constructor

Author
Matthias Schartner

This constructor is used to create subnetting scans if the information for each single source scan is already available

Parameters
pvall pointing vectors
timesall scan times
obsall observations
typescan type (default = Scan::ScanType::standard)
Scan::Scan ( const boost::property_tree::ptree &  ptree,
Network network,
const SourceList sourceList,
Scan::ScanType  type = Scan::ScanType::standard 
)

constructor based on property tree

Author
Matthias Schartner

Here is the call graph for this function:

Member Function Documentation

void Scan::addTagalongStation ( const PointingVector pv_start,
const PointingVector pv_end,
const std::vector< Observation > &  observations,
unsigned int  slewtime,
const Station station 
)

adds observation to scan in tagalong mode

Author
Matthias Schartner
Parameters
pv_startpointing vector at start time
pv_endpointing vector at end time
observationsall observations
slewtimeslew time in seconds
stationtagalong station

Here is the call graph for this function:

Here is the caller graph for this function:

void Scan::addTimes ( int  idx,
unsigned int  fieldSystem,
unsigned int  slew,
unsigned int  preob 
)
noexcept

adds scan times

Author
Matthias Schartner
Parameters
idxindex of element
fieldSystemfield system time in seconds
slewslew time in seconds
preobcalibration time in secons

Here is the call graph for this function:

Here is the caller graph for this function:

bool Scan::calcObservationDuration ( const Network network,
const std::shared_ptr< const AbstractSource > &  source,
const std::shared_ptr< const Mode > &  mode 
)
noexcept

calculates the scan durations per observation

Author
Matthias Schartner
Parameters
networkstation network
sourceobserved source
modeobserving mode
Returns
true is scan is still valid, otherwise false

Here is the call graph for this function:

Here is the caller graph for this function:

void Scan::calcScore ( const std::vector< double > &  astas,
const std::vector< double > &  asrcs,
const std::vector< double > &  abls,
unsigned int  minTime,
unsigned int  maxTime,
const Network network,
const std::shared_ptr< const AbstractSource > &  source,
bool  subnetting,
const std::vector< double > &  idleScore 
)
noexcept

calculates the score of a scan

Author
Matthias Schartner

usually used for single scan sources

Parameters
astasprecalculated vector of average station score
asrcsprecalculated vector of average source score
ablsprecalculated vector of average baseline score
minTimeminimum time required for a scan in seconds
maxTimemaximum time required for a scan in seconds
networkstation network
sourceobserved source
subnettingsubnetting flag
idleScoreprecalculated vector of extra scores due to long idle time

Here is the call graph for this function:

Here is the caller graph for this function:

void VieVS::Scan::calcScore ( const std::vector< double > &  astas,
const std::vector< double > &  asrcs,
const std::vector< double > &  abls,
unsigned int  minTime,
unsigned int  maxTime,
const Network network,
const std::shared_ptr< const AbstractSource > &  source,
std::unordered_map< unsigned long, double > &  staids2skyCoverageScore,
const std::vector< double > &  idleScore 
)
noexcept

calculates the score of a scan

Author
Matthias Schartner

usually used for single scan sources

Parameters
astasprecalculated vector of average station score
asrcsprecalculated vector of average source score
ablsprecalculated vector of average baselines score
minTimeminimum time required for a scan in seconds
maxTimemaximum time required for a scan in seconds
networkstation network
sourceobserved source
staids2skyCoverageScorestores the score of each pointing vector
idleScoreprecalculated vector of extra scores due to long idle time
void Scan::calcScore ( unsigned int  minTime,
unsigned int  maxTime,
const Network network,
const std::shared_ptr< const AbstractSource > &  source,
double  hiscore,
bool  subnetting 
)

calc score for high impact scans

Author
Matthias Schartner
Parameters
minTimeminimum time required for a scan in seconds
maxTimemaximum time required for a scan in seconds
networkstation network
sourceobserved source
hiscorehigh impact score
subnettingsubnetting flag

Here is the call graph for this function:

bool Scan::calcScore ( const std::vector< double > &  prevLowElevationScores,
const std::vector< double > &  prevHighElevationScores,
const Network network,
unsigned int  minRequiredTime,
unsigned int  maxRequiredTime,
const std::shared_ptr< const AbstractSource > &  source,
bool  subnetting 
)

calculates the score for a astrometric calibrator block scan

Author
Matthias Schartner
Parameters
prevLowElevationScoresscore for previouse low elevation scans
prevHighElevationScoresscore for previouse high elevation scans
networkstation network
minRequiredTimeminimum time required for a scan in seconds
maxRequiredTimemaximum time required for a scan in seconds
sourceobserved source
subnettingsubnetting flag

Here is the call graph for this function:

double Scan::calcScore_averageBaselines ( const std::vector< double > &  abls) const
privatenoexcept

calculates score for average baseline observations

Author
Matthias Schartner
Parameters
ablsprecalculated vector of average baseline observations
Returns
score

Here is the caller graph for this function:

double Scan::calcScore_averageSources ( const std::vector< double > &  asrcs,
unsigned long  nMaxBls 
) const
privatenoexcept

calculates score for average source observations

Author
Matthias Schartner
Parameters
asrcsprecalculated vector of average source observations
nMaxBlsmaximum possible number of baselines
Returns
score

Here is the caller graph for this function:

double Scan::calcScore_averageStations ( const std::vector< double > &  astas,
unsigned long  nMaxBls 
) const
privatenoexcept

calculates score for average station observations

Author
Matthias Schartner
Parameters
astasprecalculated vector of average station observations
nMaxBlsmaximum possible number of baselines
Returns
score

Here is the caller graph for this function:

double Scan::calcScore_closures ( unsigned long  nclosures_max,
const std::shared_ptr< const AbstractSource > &  source 
) const
privatenoexcept

calculte score based on number of independent closure phases and amplitudes

Author
Matthias Schartner
Parameters
nclosures_maxnumber of theoretically possible independent closure phases and amplitudes
sourceobserved source
Returns
score based on number of independent closure phases and amplitudes

Here is the caller graph for this function:

double Scan::calcScore_duration ( unsigned long  nMaxSta,
unsigned int  minTime,
unsigned int  maxTime 
) const
privatenoexcept

calculates score for duration

Author
Matthias Schartner
Parameters
nMaxStanumber of stations in network
minTimeminimum time required for a scan in seconds
maxTimemaximum time required for a scan in seconds
Returns
score

Here is the call graph for this function:

Here is the caller graph for this function:

double Scan::calcScore_firstPart ( const std::vector< double > &  astas,
const std::vector< double > &  asrcs,
const std::vector< double > &  abls,
unsigned int  minTime,
unsigned int  maxTime,
const Network network,
const std::shared_ptr< const AbstractSource > &  source,
bool  subnetting,
const std::vector< double > &  idleScore 
)
private

first part of score calculation

Author
Matthias Schartner

mainly additive scores

Parameters
astasprecalculated vector of average station observations
asrcsprecalculated vector of average source observations
ablsprecalculated vector of average baseline observations
minTimeminimum time required for a scan in seconds
maxTimemaximum time required for a scan in seconds
networkstation network
sourceobserved source
subnettingsubnetting flag
idleScoreprecalculated vector of extra scores due to long idle time
Returns
score

Here is the call graph for this function:

Here is the caller graph for this function:

double Scan::calcScore_idleTime ( const std::vector< double > &  idleScore) const
privatenoexcept

calculates score based on idle time

Author
Matthias Schartner
Parameters
idleScoreprecalculated vector of extra scores due to long idle time
Returns
score

Here is the caller graph for this function:

double Scan::calcScore_lowDeclination ( unsigned long  nMaxObs)
private

calculate score for low declination scans

Author
Matthias Schartner
Parameters
nMaxObsmaximum number of possible observations in network
Returns
score for low declination scans

Here is the caller graph for this function:

double Scan::calcScore_lowElevation ( unsigned long  nmaxsta)
private

calculate score for low elevation scans

Author
Matthias Schartner
Parameters
nmaxstanumber of stations in network
Returns
score for low elevation scans

Here is the caller graph for this function:

double Scan::calcScore_numberOfObservations ( unsigned long  maxObs) const
privatenoexcept

calculates the score for number of observations

Author
Matthias Schartner
Parameters
maxObsmaximum possible number of observations
Returns
score

Here is the caller graph for this function:

double Scan::calcScore_secondPart ( double  this_score,
const Network network,
const std::shared_ptr< const AbstractSource > &  source,
bool  ignoreScanSequence = false 
)
private

second part of score calculations

Author
Matthias Schartner

mainly multiplicative scores

Parameters
this_scorecurrent score
networkstation network
sourceobserved source
ignoreScanSequenceignore scan sequence in score calculation
Returns
total score

Here is the call graph for this function:

Here is the caller graph for this function:

void Scan::calcScore_subnetting ( const std::vector< double > &  astas,
const std::vector< double > &  asrcs,
const std::vector< double > &  abls,
unsigned int  minTime,
unsigned int  maxTime,
const Network network,
const std::shared_ptr< const AbstractSource > &  source,
const std::unordered_map< unsigned long, double > &  staids2skyCoverageScore,
const std::vector< double > &  idleScore 
)
noexcept

calculates the score of a scan

Author
Matthias Schartner

usually used for subnetting sources. This is for improved runtime because the skyCoverage score for each pointing vector already exists.

Parameters
astasprecalculated vector of average station score
asrcsprecalculated vector of average source score
ablsprecalculated vector of average baseline score
minTimeminimum time required for a scan in seconds
maxTimemaximum time required for a scan in seconds
networkstation network
sourceobserved source
staids2skyCoverageScorestored score for each pointing vector
idleScoreprecalculated vector of extra scores due to long idle time

Here is the call graph for this function:

Here is the caller graph for this function:

void Scan::calcScoreCalibrator ( const Network network,
const std::shared_ptr< const AbstractSource > &  source,
const std::vector< double > &  astas,
double  meanSNR,
unsigned int  minRequiredTime,
unsigned int  maxRequiredTime 
)

calculates the score for a calibrator block scan

Author
Matthias Schartner
Parameters
networkstation network
sourceobserved source
astasprecalculated vector of average station score
meanSNRaverage SNR
minRequiredTimeminimum time required for a scan in seconds
maxRequiredTimemaximum time required for a scan in seconds

Here is the call graph for this function:

Here is the caller graph for this function:

bool VieVS::Scan::check ( )
inline

internal debugging function that checks if the number of pointing vectors is equal to nsta

Author
Matthias Schartner

Usually unused

Returns
true if everything is ok

Here is the call graph for this function:

bool Scan::checkIdleTimes ( std::vector< unsigned int > &  maxIdle,
const std::shared_ptr< const AbstractSource > &  source 
)
noexcept

checks if the idle time is not too long

Author
Matthias Schartner

this function removes stations whichs idle times is too long. The order of the station pointing vectors must be the same as the order of the max Idle parameter.

Parameters
maxIdlemaximum allowed idle time
sourceobserved source
Returns
true if scan is still valid, false if scan is no longer valid

Here is the call graph for this function:

Here is the caller graph for this function:

bool Scan::constructObservations ( const Network network,
const std::shared_ptr< const AbstractSource > &  source 
)
noexcept

constructs all possible observations

Author
Matthias Schartner
Parameters
sourceobserved source

Here is the call graph for this function:

Here is the caller graph for this function:

boost::optional< Scan > Scan::copyScan ( const std::vector< unsigned long > &  ids,
const std::shared_ptr< const AbstractSource > &  source 
) const
noexcept

makes a hard copy of a scan with all stations from parameter ids

Author
Matthias Schartner
Parameters
idsids of all stations which should be copied
sourceobserved source
Returns
copy of scan with the stations from ids parameter or none if no valid scan can be created

Here is the call graph for this function:

Here is the caller graph for this function:

void Scan::createDummyObservations ( const Network network)

create dummy observations

Author
Matthias Schartner
Parameters
networkstation network

Here is the call graph for this function:

Here is the caller graph for this function:

boost::optional< unsigned long > Scan::findIdxOfStationId ( unsigned long  id) const
noexcept

finds the index of an station id

Author
Matthias Schartner
Parameters
idstation id
Returns
index

Here is the caller graph for this function:

double Scan::getAverageSNR ( const Network network,
const std::shared_ptr< const AbstractSource > &  source,
const std::shared_ptr< const Mode > &  mode 
)

calculates the average SNR of all observations in this scan

Author
Matthias Schartner
Parameters
networkstation network
sourceobserved source
modeobserving mode
Returns
average SNR of all observations in this scan

Here is the call graph for this function:

Here is the caller graph for this function:

string Scan::getName ( unsigned long  indexOfThisScanInList,
const std::vector< Scan > &  otherScans 
) const

get scan name in vex format

Author
Matthias Schartner

Scan name is based on observation start. If two scans start at same time a suffix is added to distinguish the scans.

Parameters
indexOfThisScanInListindex of this scan in scan list
otherScanslist of all other scans
Returns
name of this scan

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned long VieVS::Scan::getNObs ( ) const
inlinenoexcept

getter for number of observations

Author
Matthias Schartner
Returns
number of baselines

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned long Scan::getNObs ( unsigned long  staid) const
noexcept

getter for number of observations per station

Author
Matthias Schartner
Parameters
staidstation id
Returns
number of observations with this station
unsigned long VieVS::Scan::getNSta ( ) const
inlinenoexcept

getter for number of stations

Author
Matthias Schartner
Returns
number of stations

Here is the caller graph for this function:

const Observation& VieVS::Scan::getObservation ( int  idx) const
inlinenoexcept

getter for a single observations

Author
Matthias Schartner
Parameters
idxindex of observation
Returns
observation
const std::vector<Observation>& VieVS::Scan::getObservations ( ) const
inlinenoexcept

get all observations

Author
Matthias Schartner
Returns
all observations

Here is the call graph for this function:

Here is the caller graph for this function:

const PointingVector& VieVS::Scan::getPointingVector ( int  idx,
Timestamp  ts = Timestamp::start 
) const
inlinenoexcept

getter for pointing vector for an index

Author
Matthias Schartner
Parameters
idxindex of required pointing vector
tstime stamp flag
Returns
pointing vector

Here is the caller graph for this function:

ScanConstellation VieVS::Scan::getScanConstellation ( ) const
inlinenoexcept

getter for scan constellation type

Author
Matthias Schartner
Returns
scan constellation type
double VieVS::Scan::getScore ( ) const
inlinenoexcept

getter for the total score of this scan

Author
Matthias Schartner
Returns
score of this scan

Here is the caller graph for this function:

unsigned long VieVS::Scan::getSourceId ( ) const
inlinenoexcept

getter for source id

Author
Matthias Schartner
Returns
source id

Here is the caller graph for this function:

unsigned long VieVS::Scan::getStationId ( int  idx) const
inlinenoexcept

getter for station id for one index

Author
Matthias Schartner
Parameters
idxindex of required station id
Returns
id of station

Here is the caller graph for this function:

vector< unsigned long > Scan::getStationIds ( ) const
noexcept

getter for all station ids

Author
Matthias Schartner
Returns
all station ids

Here is the caller graph for this function:

const ScanTimes& VieVS::Scan::getTimes ( ) const
inlinenoexcept

getter to get all scan times

Author
Matthias Schartner
Returns
all scan times

Here is the caller graph for this function:

ScanType VieVS::Scan::getType ( ) const
inlinenoexcept

getter for scan type

Author
Matthias Schartner
Returns
scan type

Here is the caller graph for this function:

void Scan::includesStations ( std::vector< char > &  flag) const

checks if station is participating and notes it in flag vector

Author
Matthias Schartner
Parameters
flagflag lists which stations were found

Here is the caller graph for this function:

unsigned long Scan::indexOfObservation ( unsigned long  staid1,
unsigned long  staid2 
) const

check if a obseration betwen two stations is scheduled

Author
Matthias Schartner
Parameters
staid1first station id
staid2second station id
Returns
index of observation between these two stations or -1 in case observation is not scheduled

Here is the caller graph for this function:

static unsigned long VieVS::Scan::numberOfCreatedObjects ( )
inlinestatic

get total number of created scans

Author
Matthias Schartner
Returns
total number of created scans

Here is the call graph for this function:

Here is the caller graph for this function:

void Scan::output ( unsigned long  observed_scan_nr,
const Network network,
const std::shared_ptr< const AbstractSource > &  source,
std::ofstream &  of 
) const
noexcept

outputs information of this scan to the current console

Author
Matthias Schartner
Parameters
observed_scan_nrscan number
networkstation network
sourceobserved source
ofoutstream file object

Here is the call graph for this function:

Here is the caller graph for this function:

bool Scan::prepareForScanEnd ( Network network,
const std::shared_ptr< const AbstractSource > &  source,
const std::shared_ptr< const Mode > &  mode,
unsigned int  endTime 
)

remove stations from scan whose observations last longer then session

Author
Matthias Schartner
Parameters
networkstation network
sourceobserved source
modeobserving mode
endTimesession end time
Returns
flag if scan is still valid

Here is the call graph for this function:

Here is the caller graph for this function:

PointingVector& VieVS::Scan::referencePointingVector ( int  idx,
Timestamp  ts = Timestamp::start 
)
inlinenoexcept

reference to pointing vector for an index

Author
Matthias Schartner
Parameters
idxindex of required pointing vector
tstime stamp flag
Returns
pointing vector

Here is the caller graph for this function:

ScanTimes& VieVS::Scan::referenceTime ( )
inlinenoexcept

referenct to all scan times

Author
Matthias Schartner
Returns
all scan times
Observation& VieVS::Scan::refObservation ( int  idx)
inlinenoexcept

referemce to a single observations

Author
Matthias Schartner
Parameters
idxindex of observation
Returns
observation
Observation & Scan::refObservation ( unsigned long  staid1,
unsigned long  staid2 
)

referemce to a single observations

Author
Matthias Schartner
Parameters
staid1station id 1
staid2station id 2
Returns
observation
std::vector<Observation>& VieVS::Scan::refObservations ( )
inline

referemces to all observations

Author
Matthias Schartner
Returns
vector of all observations
void Scan::removeAdditionalObservingTime ( unsigned int  time,
const Station thisSta,
const std::shared_ptr< const AbstractSource > &  thisSource,
std::ofstream &  of,
Timestamp  ts 
)

remove additional observing time

Author
Matthias Schartner

deprecated! use removeUnnecessaryObservingTime() instead

Parameters
timetime
thisStastation
thisSourceobserved source
ofoutfile stream
tstime stamp flag

Here is the call graph for this function:

Here is the caller graph for this function:

bool Scan::removeObservation ( int  iobs,
const std::shared_ptr< const AbstractSource > &  source 
)
noexcept

delete the observation at position iobs from scan

Author
Matthias Schartner

If a station has no longer any observations it gets removed

Parameters
iobsindex of observation
sourceobserved source
Returns
true if scan is still valid, false if scan is no longer valid

Here is the call graph for this function:

Here is the caller graph for this function:

bool Scan::removeStation ( int  idx,
const std::shared_ptr< const AbstractSource > &  source 
)
noexcept

delete the pointing vector at position idx and all its corresponding times and observations

Author
Matthias Schartner

If a scan no longer has enough stations or the number of baselines will get zero, it gets invalid.

Parameters
idxindex of element to delete
sourceobserved source
Returns
true if scan is still valid, false if scan is no longer valid

Here is the call graph for this function:

Here is the caller graph for this function:

void Scan::removeUnnecessaryObservingTime ( Network network,
const std::shared_ptr< const AbstractSource > &  thisSource,
std::ofstream &  of,
Timestamp  ts 
)

remove unnecessary observing time

Author
Matthias Schartner
Parameters
networkstation network
thisSourceobserved source
ofoutfile stream
tstime stamp flag

Here is the call graph for this function:

Here is the caller graph for this function:

bool Scan::rigorousScanCanReachEndposition ( const Network network,
const std::shared_ptr< const AbstractSource > &  thisSource,
const boost::optional< StationEndposition > &  endposition,
bool &  stationRemoved 
)
private

rigorous check if scan can reach required endposition

Author
Matthias Schartner
Parameters
networkstation network
thisSourceobserved source
endpositionrequired endposition
stationRemovedflag if a station got removed
Returns
true if scan is still valid, otherwise false

Here is the call graph for this function:

Here is the caller graph for this function:

bool Scan::rigorousScanStartTimeAlignment ( Network network,
const std::shared_ptr< const AbstractSource > &  source,
const std::shared_ptr< const Mode > &  mode 
)
privatenoexcept

rigorous scan alignment

Author
Matthias Schartner
Parameters
networkstation network
sourceobserved source
modeobserving mode
Returns
true if scan is still valid, otherwise false

Here is the call graph for this function:

Here is the caller graph for this function:

bool Scan::rigorousScanVisibility ( Network network,
const std::shared_ptr< const AbstractSource > &  source,
bool &  stationRemoved 
)
privatenoexcept

rigorous scan visibility

Author
Matthias Schartner
Parameters
networkstation network
sourceobserved source
stationRemovedflag if a station got removed
Returns
true if scan is still valid, otherwise false

Here is the call graph for this function:

Here is the caller graph for this function:

bool Scan::rigorousSlewtime ( Network network,
const std::shared_ptr< const AbstractSource > &  source 
)
privatenoexcept

scan constellation type

rigorous slew time calculation

Author
Matthias Schartner
Parameters
networkstation network
sourceobserved source
Returns
true if scan is still valid, otherwise false

Here is the call graph for this function:

Here is the caller graph for this function:

bool Scan::rigorousSourceVelocity ( Network network,
const std::shared_ptr< const AbstractSource > &  thisSource 
)
private

rigorous check that source is not moving faster than antenna slew speed

Author
Matthias Schartner
Parameters
networkstation network
thisSourceobserved source

Here is the call graph for this function:

Here is the caller graph for this function:

bool Scan::rigorousSunDistance ( const Network network,
const std::shared_ptr< const AbstractSource > &  thisSource 
)
private

rigorous check if sun distance is large enough

Author
Matthias Schartner
Parameters
networkstation network
thisSourceobserved source

Here is the call graph for this function:

Here is the caller graph for this function:

bool Scan::rigorousTotalObservingDuration ( Network network,
const std::shared_ptr< const AbstractSource > &  source 
)
privatenoexcept

rigorous total observing duration calculation

Author
Matthias Schartner
Parameters
networkstation network
sourceobserved source
Returns
true if scan is still valid, otherwise false

Here is the call graph for this function:

Here is the caller graph for this function:

bool Scan::rigorousUpdate ( Network network,
const std::shared_ptr< const AbstractSource > &  source,
const std::shared_ptr< const Mode > &  mode,
const boost::optional< StationEndposition > &  endposition = boost::none 
)
noexcept

checks a scan with rigorous models

Author
Matthias Schartner
Parameters
networkstation network
sourceobserved source
modeobserving mode
endpositionrequired endposition
Returns
true if scan is still valid, false if scan is no longer valid

Here is the call graph for this function:

Here is the caller graph for this function:

bool Scan::scanDuration ( const Network network,
const std::shared_ptr< const AbstractSource > &  source 
)
noexcept

calculates the total scan duration per station

Author
Matthias Schartner

removes stations if the scan duration is longer than the maximum allowed scan duration

Parameters
networkstation network
sourceobserved source
Returns
true if scan is still valid, false if scan is no longer valid

Here is the call graph for this function:

Here is the caller graph for this function:

void Scan::setFixedScanDuration ( unsigned int  scanDuration)
noexcept

set fixed scan duration

Author
Matthias Schartner
Parameters
scanDurationscan duration in seconds

Here is the call graph for this function:

Here is the caller graph for this function:

void VieVS::Scan::setObservations ( std::vector< Observation obs)
inline

sets observation vector

Author
Helene Wolf
Parameters
obsobservations

Here is the call graph for this function:

void Scan::setPointingVector ( int  idx,
PointingVector  pv,
Timestamp  ts 
)

set pointing vector

Author
Matthias Schartner
Parameters
idxindex of pointing vector
pvnew pointing vector
tstime stamp flag

Here is the call graph for this function:

Here is the caller graph for this function:

void Scan::setPointingVectorsEndtime ( std::vector< PointingVector pv_end)

set pointing vector at scan end time

Author
Matthias Schartner
Parameters
pv_endpointing vector at scan end time

Here is the caller graph for this function:

bool Scan::setScanTimes ( const std::vector< unsigned int > &  eols,
const std::vector< unsigned int > &  fieldSystemTime,
const std::vector< unsigned int > &  slewTime,
const std::vector< unsigned int > &  preob,
unsigned int  scanStart,
const std::vector< unsigned int > &  observingTimes 
)

set scan times

Author
Matthias Schartner
Parameters
eolsend of last scan per station
fieldSystemTimefield system time per station
slewTimeslew time per station
preobcalibration time per station
scanStartscan start time
observingTimesobserving time per station
Returns

Here is the call graph for this function:

Here is the caller graph for this function:

bool VieVS::Scan::setScanTimes ( const std::vector< unsigned int > &  eols,
const std::vector< unsigned int > &  fieldSystemTime,
const std::vector< unsigned int > &  slewTime,
const std::vector< unsigned int > &  preob,
const std::vector< unsigned int > &  scanStart,
const std::vector< unsigned int > &  observingTimes 
)

set scan times

Author
Helene Wolf
Parameters
eolsend of last scan per station
fieldSystemTimefield system time per station
slewTimeslew time per station
preobcalibration time per station
scanStartscan start time per station
observingTimesobserving time per station
Returns
flag if times are valid
void VieVS::Scan::setType ( ScanType  type)
inlinenoexcept

sets the scan type

Author
Matthias Schartner
Parameters
typenew scan type
boost::property_tree::ptree Scan::toPropertyTree ( const Network network,
const std::string &  sourceName 
) const

convert scan to property tree

Author
Matthias Schartner

This function is used by the GUI

Parameters
networkstation network
sourceNamesource name
Returns
property tree of scan

Here is the call graph for this function:

Here is the caller graph for this function:

std::string Scan::toSkedOutputTimes ( const std::shared_ptr< const AbstractSource > &  source,
unsigned long  nMaxSta 
) const

output observing duration in sked output format

Author
Matthias Schartner
Parameters
sourceobservedSource
nMaxStamaximum number of station
Returns
line output in sked format

Here is the call graph for this function:

Here is the caller graph for this function:

static std::string VieVS::Scan::toString ( ScanType  type_)
inlinestatic

translates ScanType to string

Author
Matthias Schartner
Returns
string of scan type

Here is the caller graph for this function:

static std::string VieVS::Scan::toString ( ScanConstellation  type_)
inlinestatic

translates ScanConstellation to string

Author
Matthias Schartner
Returns
string of scan constellation
void Scan::updateObservingTime ( )

updates the time of each observation according to the observing times of the station

Author
Matthias Schartner

Here is the call graph for this function:

Here is the caller graph for this function:

double Scan::weight_baselines ( const std::vector< Baseline > &  baselines)
private

mean of the weight factors for each participating baselines

Author
Matthias Schartner
Returns
mean of the weight factors

Here is the caller graph for this function:

double Scan::weight_stations ( const std::vector< Station > &  stations)
private

mean of the weight factors for each participating station

Author
Matthias Schartner
Parameters
stationslist of all stations
Returns
mean of weight factors

Here is the caller graph for this function:

Member Data Documentation

ScanConstellation VieVS::Scan::constellation_
private
unsigned long Scan::nextId = 0
staticprivate

next id for this object type

unsigned int Scan::nScanSelections { 0 }
static

number of selected main scans

unsigned long VieVS::Scan::nsta_
private

number of stations in this scan

std::vector<Observation> VieVS::Scan::observations_
private

all observed baselines

std::vector<PointingVector> VieVS::Scan::pointingVectorsEnd_
private

pointing vectors at end of the scan

std::vector<PointingVector> VieVS::Scan::pointingVectorsStart_
private

pointing vectors at start of the scan

Scan::ScanSequence Scan::scanSequence
static

scan sequence rules

double VieVS::Scan::score_
private

total score

unsigned long VieVS::Scan::srcid_
private

observed source id

ScanTimes VieVS::Scan::times_
private

time information

ScanType VieVS::Scan::type_
private

type of the scan


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