本文整理汇总了C++中reference::To::centre_max_bin方法的典型用法代码示例。如果您正苦于以下问题:C++ To::centre_max_bin方法的具体用法?C++ To::centre_max_bin怎么用?C++ To::centre_max_bin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类reference::To
的用法示例。
在下文中一共展示了To::centre_max_bin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
rotate_amount = atof(optarg);
break;
case 'a':
align = true;
break;
case 'j':
details_filename = optarg;
break;
default:
cerr << "invalid param '" << c << "'" << endl;
}
if (!pgdev.empty())
{
cpgopen(pgdev.c_str());
cpgask(0);
cpgsvp(0.1, 0.9, 0.1, 0.9);
}
Reference::To<Archive> archive = Archive::load (argv[optind]);
// preprocess
archive->fscrunch();
archive->tscrunch();
archive->pscrunch();
// phase up as requested
if (centre_model)
archive->centre();
else if (rotate_peak)
archive->centre_max_bin(0.0);
if (rotate_amount != 0.0)
archive->rotate_phase(-rotate_amount);
archive->remove_baseline();
// load from file if specified
if (!model_filename_in.empty())
{
cerr << "paas: loading model from " << model_filename_in << endl;
model.load(model_filename_in.c_str());
// align to profile first if asked
if (align)
model.align(archive->get_Integration(0)->get_Profile(0,0));
}
// add any new components specified
unsigned ic, nc=new_components.size();
double centre, concentration, height;
int name_start;
for (ic=0; ic < nc; ic++)
{
if (sscanf(new_components[ic].c_str(),
"%lf %lf %lf %n", ¢re, &concentration, &height,
&name_start)!=3)
{
cerr << "Could not parse component " << ic << endl;
return -1;
}
model.add_component(centre, concentration, height,