本文整理汇总了C++中ParamList::parse方法的典型用法代码示例。如果您正苦于以下问题:C++ ParamList::parse方法的具体用法?C++ ParamList::parse怎么用?C++ ParamList::parse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParamList
的用法示例。
在下文中一共展示了ParamList::parse方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main(int argc, char* argv[]) {
if (argc != 2) {
cerr << "Usage: " << argv[0] << " <filename.cfg>" << endl;
return 0;
}
ParamList pl;
cerr << "Reading configuration...";
pl.parse(argv[1]);
cerr << " done." << endl;
// Get the mean dark count along the third axis.
BOData<double> darkmean;
cerr << "Processing Dark frame...";
string filename;
pl.getValue("DARK_FILE", filename);
CCFITSfile fitsfile;
BOData<double> dat;
fitsfile.read(filename, dat);
print(dat);
getMean(dat, 3, darkmean);
filename = "darkmean3.gim";
write2gim(filename, darkmean, sigfig);
cerr << " done." << endl;
// Calculate sigma.
BOData<double> sigma;
double preset_sigma;
unsigned int err = pl.getValue("PRESET_SIGMA", preset_sigma);
if (err == 0)
{
cerr << "Processing Preset Sigma ...";
sigma.data = darkmean.data;
sigma.axes = darkmean.axes;
string filename = "sigmasigma3.gim";
write2gim(filename, sigma, sigfig);
cerr << " done." << endl;
}
else
{
cerr << "Processing Sigma frame...";
string filename;
pl.getValue("SIGMA_FILE", filename);
CCFITSfile fitsfile;
BOData<double> sigmaData;
fitsfile.read(filename, sigmaData);
print(sigmaData);
getSD(sigmaData, 3, sigma);
filename = "sigmasigma3.txt";
write2gim(filename, sigma, sigfig);
cerr << " done." << endl;
}
// Create FFTW wisdom for use in subsequent processing steps.
double freq;
double del_t;
double nOfData;
const char *wisdom_filename = "wisdom.txt";
pl.getValue("SAMPLING_INTERVAL", del_t);
pl.getValue("XCORR_FREQUENCY", freq);
pl.getValue("NUM_DATA_POINTS", nOfData);
cerr << "Creating FFTW Plan..." << endl;
plan_fftw(nOfData, wisdom_filename);
cerr << "FFTW Plan creation done." << endl;
return 0;
}