azonenberg changed the topic of #scopehal to: libscopehal, libscopeprotocols, and glscopeclient development and testing | https://github.com/azonenberg/scopehal-apps, https://github.com/azonenberg/scopehal, https://github.com/azonenberg/scopehal-docs | Logs: https://freenode.irclog.whitequark.org/scopehal
Degi has quit [Ping timeout: 256 seconds]
Degi has joined #scopehal
_whitelogger has joined #scopehal
electronic_eel_ has joined #scopehal
electronic_eel has quit [Ping timeout: 256 seconds]
_whitelogger has joined #scopehal
electronic_eel_ is now known as electronic_eel
_whitenotifier-3 has joined #scopehal
<_whitenotifier-3> [scopehal] azonenberg pushed 1 commit to master [+0/-0/±1] https://git.io/JJ5M9
<_whitenotifier-3> [scopehal] azonenberg 07d4bbd - FFTDecoder: fixed uninitialized value on sample 0
<_whitenotifier-3> [scopehal-apps] azonenberg pushed 2 commits to master [+0/-0/±4] https://git.io/JJ5MF
<_whitenotifier-3> [scopehal-apps] azonenberg 783ac21 - Added bounds checking to rendering shader
<_whitenotifier-3> [scopehal-apps] azonenberg 6462bc2 - Various fixes to FFT waveform rendering
<_whitenotifier-3> [scopehal] azonenberg pushed 2 commits to master [+0/-0/±5] https://git.io/JJ59k
<_whitenotifier-3> [scopehal] azonenberg 79af9f3 - FFTDecoder: performance optimizations, now zero-pad vs truncating for improved RBW
<_whitenotifier-3> [scopehal] azonenberg b790bfb - Better normalization of FFTs
bvernoux has joined #scopehal
<_whitenotifier-3> [scopehal] azonenberg pushed 1 commit to master [+0/-0/±2] https://git.io/JJ5Qn
<_whitenotifier-3> [scopehal] azonenberg 5be2100 - FFTDecoder: AVX optimizations to NormalizeOutput() for ~25% overall speedup of filter
<_whitenotifier-3> [scopehal] azonenberg pushed 1 commit to master [+0/-0/±4] https://git.io/JJdTw
<_whitenotifier-3> [scopehal] azonenberg cc6719f - CTLEDecoder: now derived from DeEmbedDecoder and about 4.6x faster than previous implementation
<azonenberg> lain: sooooo if i have an 834 mV p-p squarewave at 10 MHz, and i do an FFT
<azonenberg> What should I expect the amplitude of the 10 MHz peak to be?
<lain> uhhh
<lain> not sure off the top of my head, I'm guessing (assuming 50% duty cycle) around half of 834 mV ?
<azonenberg> well if my math is right that's 589 mV RMS
<azonenberg> or am i way off?
bvernoux has quit [Quit: Leaving]
<lain> oh, according to wiki the RMS value for a square wave is simply the peak value, so if it's 834 mV p-p, the RMS is 834 mV
<azonenberg> oh
<lain> errrr
<lain> wait no sorry
<lain> misread
<lain> 834 mV p-p would be RMS of 834/2 = 417 mV
<azonenberg> not /sqrt2?
<lain> nope
<lain> although, if you're looking at an fft...
<lain> I guess you're looking at the fundamental frequency then
<lain> which ... hm. I'm not sure how that works actually lol
<azonenberg> well ultimately what i'm trying to do is calculate what the expected spectrum amplitude is
<azonenberg> So i can sanity check my scaling
<azonenberg> right now i have normalized dB rel some unknown level
<azonenberg> no idea if i'm actually doing dBm or dBv or what :p
<azonenberg> maybe i should test on a pure tone
<lain> yeah
<azonenberg> did i mention i need a siggen? :p
<lain> lol
<azonenberg> ok so my vna is now putting out what it claims is a 0 dBm 1 GHz tone
<azonenberg> Unsure if this is cal'd to include losses of the VNA cable or not, definitely does not include the minicircuits cable going to the scope
<azonenberg> Which has about 0.5 dB of insertion loss at 1 GHz
<azonenberg> I measure 196 mV RMS, 571 mV p-p at the scope
<azonenberg> 223 mV RMS is 0 dBm
<azonenberg> So it makes sense we'd be a bit less after cable loss
<azonenberg> The highest FFT bin has a value of 0.181
<azonenberg> now 0.203 after i adjust the RBW to be a little narrower
<azonenberg> if we consider that to be voltage, 20 * log10(0.203) is -13.85. Which seems way off from the expected 0 to -1 dBm
<azonenberg> but i'm actually calculating dBW
<azonenberg> or am i?
<azonenberg> no i think i'm calculating dBV
<azonenberg> since the fft output is volts at each frequency bin?
<azonenberg> So if i have 0.203V, V^2 / 50 ohms = 0.824 mW, 10*log10(0.000824) + 30 = -0.84 dBm
<azonenberg> which makes sense since we have 0.47 dB of loss in the SMA cable so the actual amplitude hitting the scope is -0.47 dB minus any uncalibrated loss in the VNA test lead, and also the FFT energy is spread across a couple of bins
<azonenberg> since i don't have a bin exactly at 1 GHz
<_whitenotifier-3> [scopehal] azonenberg pushed 1 commit to master [+0/-0/±1] https://git.io/JJdYv
<_whitenotifier-3> [scopehal] azonenberg 56b6fcf - Fixed FFT normalization
<_whitenotifier-3> [scopehal-apps] azonenberg pushed 1 commit to master [+0/-0/±3] https://git.io/JJdYJ
<_whitenotifier-3> [scopehal-apps] azonenberg e98bb60 - FFT values are now displayed in dBm. Still no support for adjusting axis scaling though, and Y axis units are still reported as dimensionless dB.