![]() |
VieSched++
VieVS VLBI Scheduling Software
|
FREQ section of observing mode. More...
#include <Freq.h>
Classes | |
class | Chan_def |
Channel definition for observing mode. More... | |
Public Types | |
enum | Net_sideband { Net_sideband::U, Net_sideband::L, Net_sideband::UC, Net_sideband::LC, Net_sideband::undefined } |
net sideband types More... | |
Public Member Functions | |
Freq (std::string name) | |
constructor More... | |
Freq (const boost::property_tree::ptree &tree) | |
constructor More... | |
void | addChannel (std::string bandId, double sky_freq, Net_sideband net_sideband, double chan_bandwidth, std::string chan_id, std::string bbc_id, std::string phase_cal_id) |
add new channel More... | |
boost::property_tree::ptree | toPropertytree () const |
converts object to property tree More... | |
std::vector< double > | getFrequencies (const std::string &band) const |
get all frequencies for a specific band More... | |
void | setSampleRate (double sample_rate) |
set sample rate More... | |
const std::set< std::string > & | getBands () const |
get list of all bands More... | |
std::unordered_map< std::string, double > | observingRate (const std::shared_ptr< const Freq > &other, const std::map< std::string, int > &bitsPerChannel) const |
calculates observing rates for each band between two stations with potentially different FREQ blocks More... | |
void | toVexFreqDefinition (std::ofstream &of, const std::string &comment="") const |
writes FREQ block in vex format More... | |
const std::vector< Chan_def > & | getChan_defs () const |
get channel definitions More... | |
std::vector< Chan_def > & | refChan_defs () |
reference channel definitions More... | |
double | totalBandwidth () const |
calculate total bandwidth for all channels More... | |
double | totalRate (const std::map< std::string, int > &bitsPerChannel) const |
calculate total observing rate More... | |
![]() | |
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... | |
![]() | |
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 (Net_sideband n) |
converts Net_sidband to string More... | |
static Net_sideband | netSidebandFromString (const std::string &s) |
convert vex format string to net sideband type More... | |
Private Member Functions | |
std::pair< double, double > | lower_upper_bound (double skyFreq, double bandwidth, Net_sideband net_sideband) const |
calculate lower and upper frequency limit of particular channel More... | |
double | overlappingBandwidth (double low1, double up1, double low2, double up2) const |
calculate overlapping bandwidth More... | |
Private Attributes | |
double | sample_rate_ |
sample frequency in MHz More... | |
std::vector< Chan_def > | chan_defs_ |
list of channels More... | |
std::set< std::string > | bands_ |
list of bands More... | |
Static Private Attributes | |
static unsigned long | nextId = 0 |
next id for this object type More... | |
FREQ section of observing mode.
following vex standard The $FREQ block describes the RF sky Frequency, net sideband, and bandwidth characteristics of the channels recorded, where a 'channel' is defined as a single USB or LSB output from a BBC. The $FREQ block does not attempt to describe the recording mode (including format, sample rate, bits per sample, and sample type), since the same set of channels may be recorded in different recording modes (or on different equipment) at different stations. Each frequency channel is defined by a chan_def statement with at least seven fields in each statement.
|
strong |
|
explicit |
constructor
name | FREQ name |
|
explicit |
constructor
tree | input property tree from xml file |
void Freq::addChannel | ( | std::string | bandId, |
double | sky_freq, | ||
Freq::Net_sideband | net_sideband, | ||
double | chan_bandwidth, | ||
std::string | chan_id, | ||
std::string | bbc_id, | ||
std::string | phase_cal_id | ||
) |
add new channel
bandId | 'Band_ID': RF band name |
sky_freq | RF sky frequency at 0Hz in the BBC output |
net_sideband | Net sideband of this BBC channel |
chan_bandwidth | BBC Channel bandwidth |
chan_id | 'Chan_ID': Logical channel name |
bbc_id | 'BBC_ID': Logical BBC name |
phase_cal_id | 'Phase-cal_ID': Logical phase-cal name |
|
inline |
get list of all bands
|
inline |
get channel definitions
necessary for custom observing mode in GUI
std::vector< double > Freq::getFrequencies | ( | const std::string & | band | ) | const |
get all frequencies for a specific band
band | target band |
|
private |
calculate lower and upper frequency limit of particular channel
skyFreq | sky frequency in MHz |
bandwidth | bandwidth in MHz |
net_sideband | net sideband |
|
inlinestatic |
convert vex format string to net sideband type
s | net sideband name in vex format |
std::unordered_map< std::string, double > Freq::observingRate | ( | const std::shared_ptr< const Freq > & | other, |
const std::map< std::string, int > & | bitsPerChannel | ||
) | const |
calculates observing rates for each band between two stations with potentially different FREQ blocks
other | 2nd FREQ block |
bitsPerChannel | number of sampled bits per channel |
|
private |
calculate overlapping bandwidth
low1 | lower limit of first channel in MHz |
up1 | upper limit of first channel in MHz |
low2 | lower limit of second channel in MHz |
up2 | upper limit of second channel in MHz |
|
inline |
reference channel definitions
necessary for custom observing mode in GUI
|
inline |
set sample rate
sample_rate | Sample frequency |
boost::property_tree::ptree Freq::toPropertytree | ( | ) | const |
converts object to property tree
|
inlinestatic |
converts Net_sidband to string
n | Net_sideband type |
double Freq::totalBandwidth | ( | ) | const |
calculate total bandwidth for all channels
double Freq::totalRate | ( | const std::map< std::string, int > & | bitsPerChannel | ) | const |
calculate total observing rate
bitsPerChannel | number of sampled bits per channel |
void Freq::toVexFreqDefinition | ( | std::ofstream & | of, |
const std::string & | comment = "" |
||
) | const |
writes FREQ block in vex format
of | vex file stream |
comment | optional comment |
|
private |
list of bands
|
private |
list of channels
|
staticprivate |
next id for this object type
|
private |
sample frequency in MHz