当前位置: 首页>>代码示例>>C++>>正文


C++ To::get_folding_period方法代码示例

本文整理汇总了C++中reference::To::get_folding_period方法的典型用法代码示例。如果您正苦于以下问题:C++ To::get_folding_period方法的具体用法?C++ To::get_folding_period怎么用?C++ To::get_folding_period使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在reference::To的用法示例。


在下文中一共展示了To::get_folding_period方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: Error


//.........这里部分代码省略.........
		 &time, &initflag, &status);
  
  if (status != 0)
    throw FITSError (status, "FITSArchive::load_Integration", 
		     "fits_read_col OFFS_SUB");


  MJD epoch = hdr_ext->get_start_time() + time;

  if (verbose > 2)
    cerr << "Pulsar::FITSArchive::load_Integration"
      " header epoch=" << hdr_ext->get_start_time().printdays(13) << "\n "
      " offset=" << time << "s epoch=" << epoch.printdays(13) << endl;
  
  // Set a preliminary epoch to avoid problems loading the polyco
  integ->set_epoch (epoch);

  // Set the folding period to 0 until one of three possible methods succeeds
  integ->set_folding_period (0.0);

  /* **********************************************************************

     METHOD 1: folding period defined by a pulse phase model

     ********************************************************************** */

  if (hdr_model)
  {
    // Set the folding period, using the polyco from the file header
    // This was taken out of the condition clause below because period
    // wasn't set when TSUB was 0
    integ->set_folding_period (1.0 / hdr_model->frequency(epoch));

    if (integ->get_folding_period() <= 0.0)
      throw Error( InvalidState, "Pulsar::FITSArchive::load_Integration",
		   "header polyco/predictor corrupted; "
		   "period(epoch=%s)=%lf", epoch.printdays(5).c_str(),
		   integ->get_folding_period() );

    if (integ->get_folding_period() < 1.0e-3)
      warning << "Pulsar::FITSArchive::load_Integration folding_period=" 
	      << integ->get_folding_period() << " is less than 1ms" << endl;

    else if (verbose > 2)
      cerr << "Pulsar::FITSArchive::load_Integration folding_period = "
      	   << integ->get_folding_period () << endl;

    if (duration && correct_epoch_phase)
    {

      if (verbose > 2)
	cerr << "Pulsar::FITSArchive::load_Integration correcting epoch phase"
	     << endl;

      Phase reference_phs = 0.0;

      if (phase_match_start_time)
      {
	// Correct epoch such that its phase equals that of the start time
	if (verbose > 2)
	  cerr << "Pulsar::FITSArchive::load_Integration matching phase(start)"
	       << endl;

	reference_phs = hdr_model->phase(hdr_ext->get_start_time());
      }
开发者ID:lbaehren,项目名称:lofarsoft,代码行数:66,代码来源:load_Integration.C


注:本文中的reference::To::get_folding_period方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。