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 ); } }
void Calibration::SignalPath::fix_last_step (Scalar* function) { Steps* steps = dynamic_cast<Steps*> (function); if (steps && step_after_cal) { int nstep = steps->get_nstep(); if (nstep > 0) { time.set_value ( max_epoch ); if (convert.get_value() < steps->get_step(nstep-1)) { #ifdef _DEBUG cerr << "fix_last_step: removing step " << nstep-1 << endl; #endif steps->remove_step(nstep-1); } } } }
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 }