本文整理汇总了C++中reference::To::get_centre_frequency方法的典型用法代码示例。如果您正苦于以下问题:C++ To::get_centre_frequency方法的具体用法?C++ To::get_centre_frequency怎么用?C++ To::get_centre_frequency使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类reference::To
的用法示例。
在下文中一共展示了To::get_centre_frequency方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
Pulsar::Backend* b = arch->get<Pulsar::Backend>();
if( !b )
fprintf(stderr,"Could not change instrument name- archive does not have Backend extension\n");
else
b->set_name(instrument);
}
if( site != string() )
arch->set_telescope( site );
if( name != string() )
arch->set_source( name );
if (new_eph) try
{
arch->set_ephemeris(new_eph);
if (update_dm_from_eph) {
update_dm(arch);
}
}
catch (Error& error)
{
cerr << "Error while installing new ephemeris: "
<< error.get_message() << endl;
continue;
}
if (flipsb) {
for (unsigned i = 0; i < arch->get_nsubint(); i++) {
vector<double> labels;
labels.resize(arch->get_nchan());
for (unsigned j = 0; j < arch->get_nchan(); j++) {
labels[j] = arch->get_Integration(i)->get_centre_frequency(j);
}
for (unsigned j = 0; j < arch->get_nchan(); j++) {
double new_frequency = labels[labels.size()-1-j];
arch->get_Integration(i)->set_centre_frequency(j,new_frequency);
}
}
arch->set_bandwidth(-1.0 * arch->get_bandwidth());
}
if (flip_freq) {
for (unsigned isub = 0; isub < arch->get_nsubint(); isub++) {
Reference::To<Pulsar::Integration>
subint = arch->get_Integration(isub);
for (unsigned ichan = 0; ichan < arch->get_nchan(); ichan++) {
double new_freq = flip_freq_mhz
- (subint->get_centre_frequency(ichan) - flip_freq_mhz);
subint->set_centre_frequency(ichan, new_freq);
}
}
arch->set_bandwidth(-1.0 * arch->get_bandwidth());
}
if( reverse_freqs ) {
// Of course it would be nice to do this with pointers.... but oh well I guess copying will have to do HSK 27/8/04
unsigned nchan = arch->get_nchan();
for( unsigned isub=0; isub<arch->get_nsubint(); isub++){
for( unsigned ipol =0; ipol<arch->get_npol(); ipol++){
for( unsigned ichan=0; ichan<nchan/2; ichan++){
Reference::To<Pulsar::Profile> lo = arch->get_Profile(isub,ipol,ichan);
Reference::To<Pulsar::Profile> tmp = lo->clone();