Пример #1
0
void Calibration::SignalPath::set_min_step (Scalar* function, double step)
{
  Steps* steps = dynamic_cast<Steps*> (function);
  if (!steps)
    return;

  if (!steps->get_nstep())
  {
#ifdef _DEBUG
    cerr << "Calibration::SignalPath::set_min_step add step[0]="
         << step << endl;
#endif
    steps->add_step( step );
  }
 
  else if (step < steps->get_step(0))
  {
#ifdef _DEBUG
    cerr << "Calibration::SignalPath::set_min_step set step[0]="
         << step << endl;
#endif
    if (step_after_cal)
      steps->add_step( step);
    else
      steps->set_step( 0, step );
  }
}
Пример #2
0
void Calibration::SignalPath::offset_steps (Scalar* function, double offset)
{
  Steps* steps = dynamic_cast<Steps*> (function);
  if (!steps)
    return;

#ifdef _DEBUG
  cerr << "Calibration::SignalPath::offset_steps offset=" << offset << " ";
#endif
  for (unsigned i=0; i < steps->get_nstep(); i++)
  {
    steps->set_step( i, steps->get_step(i) + offset );
#ifdef _DEBUG
    cerr << i << "=" << steps->get_step(i) << " ";
#endif
  }
#ifdef _DEBUG
  cerr << endl;
#endif
}