Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ngscopeclient/scopehal
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6b89283ed9fc
Choose a base ref
...
head repository: ngscopeclient/scopehal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 045b4a56b266
Choose a head ref
  • 1 commit
  • 1 file changed
  • 1 contributor

Commits on Nov 28, 2020

  1. Copy the full SHA
    045b4a5 View commit details
Showing with 4 additions and 1 deletion.
  1. +4 −1 scopeprotocols/JitterSpectrumFilter.cpp
5 changes: 4 additions & 1 deletion scopeprotocols/JitterSpectrumFilter.cpp
Original file line number Diff line number Diff line change
@@ -84,7 +84,8 @@ size_t JitterSpectrumFilter::EstimateUIWidth(AnalogWaveform* din)
int64_t maxdur = 0;
for(size_t i=0; i<inlen; i++)
{
int64_t dur = din->m_durations[i];
int64_t dur = din->m_durations[i] / 1000; //convert to ps, we dont need stupidly high resolution here
//and this makes the histogram much smaller
maxdur = max(dur, maxdur);
if(dur > 0)
durations[dur] ++;
@@ -130,6 +131,7 @@ size_t JitterSpectrumFilter::EstimateUIWidth(AnalogWaveform* din)
break;
}
}

LogTrace("Initial UI width estimate: %zu\n", ui_width);

//Take a weighted average to smooth out the peak location somewhat.
@@ -148,6 +150,7 @@ size_t JitterSpectrumFilter::EstimateUIWidth(AnalogWaveform* din)
ui_width /= ui_width_samples;
LogTrace("Averaged UI width estimate: %zu\n", ui_width);

ui_width *= 1000; //convert back to fs
return ui_width;
}