Fixed problem with incorrect ADC acquisition time for very short intervals.

This commit is contained in:
Stefan Reutter 2014-08-01 14:19:38 +00:00
parent 8b9aa05595
commit b707321243

View File

@ -369,7 +369,7 @@ void SpectrumMI40xxSeries::collect_config_recursive(state_sequent& exp, Spectrum
fprintf(stderr, "state is shorter than acquisition time %e time required, %e state time\n", gating_time, a_state->length);
#endif
// update the state length if it's shorter than the gate. this is usually due to rounding to 10 ns for the pulseblaster
if (ceil(1e8*(a_state->length))/1e8 < time_required) { // + 3.0f/settings.samplefreq
if (ceil(1e8*(a_state->length + 3.0f/settings.samplefreq))/1e8 < time_required) { //
std::stringstream parameter_inf;
parameter_inf << "state is (" << inputs.front()->samples << " samples, " << settings.samplefreq << " sampling rate, " << time_required << " time required, " << a_state->length << " state time)" << std::endl;
throw ADC_exception(parameter_inf.str());