DSPRelated.com
Forums
Online · Live + on demand
February 9-11, 2027
Price goes up Jan 1: register now to lock in today's rate
Register Now →

OT? Test-driven programming

Started by Rune Allnor ●September 15, 2008
Rune Allnor wrote:
> On 16 Sep, 06:12, Richard Owlett <rowl...@atlascomm.net> wrote: > >>Rune Allnor wrote: >> >>>[snip] >> >>>>And since you are reading this ;} >>>>In a previous thread you said that you had used spectrograms of call of >>>>artic loon to demonstrate harmonics. I suspect I've demonstrated AM >>>>sidebands with my version of 3D spectrograms. Have you seen the same >>>>with traditional format. [If you wish private discussion on this my >>>>email is valid] >> >>>What kind of file was this? .wav? .mp3? What was the history >>>of the file? If it was a .wav that had been generated from an .mp3 >>>it would most likely suffer from all the 'weird' effects usually >>>associated with .mp3... >> >>>Rune >> >>Actually, I saw effect in both what I was led to believe were "prime >>sources". >> >>I think what I observed is real as I also observed similar in an >>*intrinsically* time invariant test case. If you have Scilab installed >>on your local system, see my last post to comp.soft-sys.math.scilab . > > > I suppose you mean this one: > > http://groups.google.no/group/comp.soft-sys.math.scilab/msg/c9ace7fd75245d60
Yes.
> > I've only scanned the code very quickly, so I won't pretend > I understand in full detail what you do. However, I can't find > very easily refernces to window functions (hanning, hamming,...) > which, if correct, might indicate that you don't use such functions.
You folks have taught me better than that. Innermost loop includes v = data(stpoint:endpoint) .* window('kr',width,8.6) ; Scilab Help refers to it as a "Kaiser window" with an alpha of 8.6 making it "similar to a Blackman window". Just for kicks I tried commenting out the window. Spectacular mess. Did not affect what I'm interpreting as interaction of sidebands due to simultaneous AM and FM of my test waveform. I'll have to experiment with other windows to see if there is any reason to chose one over another for real world signals. My test case may be too clean. I'll also have to take a look at whether side lobes might have significant influence on where I define the noise floor as being for plotting purposes.
> > If that's correct, there is a chance that you will see high sidelobes > caused by the rectangular window (-13 dB or so for narrow-band > signals). > > If it is indeed the case that you don't apply window functions, > scale each temporal frame by some window function prior to > the FFT. > > Rune
On 16 Sep, 14:59, Scott Seidman <namdiestt...@mindspring.com> wrote:
> Rune Allnor <all...@tele.ntnu.no> wrote in news:a5476ac9-660c-4523-93c2- > 4a867ab80...@y21g2000hsf.googlegroups.com: > > > So I always knew there were details missing in my old code, since I > > knew I had left the code before all the details had been addressed. > > > These unit test frameworks are the perfect persuation for addressing > > the details as I become ware of them. Once I know that the various > > units pass all the tests, I have far more confidence in the units, > > and > > thus in the system as such. > > So, when are you jumping to Ada? &#4294967295;;)
Ada? I only know it by name, have never seen any Ada code, let alone used the language. Nah, I think I have learned my last programming language by now. There were a few years I learned one programming language every 18 months or so (Logo -87, Pascal -89, ix86 assembler -90, Matlab -92, C -93 and finally C++ -95; add some periferical acquaintance with Fortran along the way for good measure). Once I had got into C++ I decided I know what I need in order to do what I want. I always saw programming as a means to an end, not a goal in itself. Besides, the present trend of viewing C++ as aggregates of primitives is almost like LEGO used to be, aeons ago. Rune
Richard Owlett wrote:
> Rune Allnor wrote: > >> On 16 Sep, 06:12, Richard Owlett <rowl...@atlascomm.net> wrote: >> >>> Rune Allnor wrote: >>> >>>> [snip] >>> >>> >>>>> And since you are reading this ;} >>>>> In a previous thread you said that you had used spectrograms of >>>>> call of >>>>> artic loon to demonstrate harmonics. I suspect I've demonstrated AM >>>>> sidebands with my version of 3D spectrograms. Have you seen the same >>>>> with traditional format. [If you wish private discussion on this my >>>>> email is valid] >>> >>> >>>> What kind of file was this? .wav? .mp3? What was the history >>>> of the file? If it was a .wav that had been generated from an .mp3 >>>> it would most likely suffer from all the 'weird' effects usually >>>> associated with .mp3... >>> >>> >>>> Rune >>> >>> >>> Actually, I saw effect in both what I was led to believe were "prime >>> sources". >>> >>> I think what I observed is real as I also observed similar in an >>> *intrinsically* time invariant test case. If you have Scilab installed >>> on your local system, see my last post to comp.soft-sys.math.scilab . >> >> >> >> I suppose you mean this one: >> >> http://groups.google.no/group/comp.soft-sys.math.scilab/msg/c9ace7fd75245d60 >> > > > Yes. > >> >> I've only scanned the code very quickly, so I won't pretend >> I understand in full detail what you do. However, I can't find >> very easily refernces to window functions (hanning, hamming,...) >> which, if correct, might indicate that you don't use such functions. > > > You folks have taught me better than that. > > Innermost loop includes > v = data(stpoint:endpoint) .* window('kr',width,8.6) ; > > Scilab Help refers to it as a "Kaiser window" with an alpha of 8.6 > making it "similar to a Blackman window". > > Just for kicks I tried commenting out the window. Spectacular mess. > Did not affect what I'm interpreting as interaction of sidebands due to > simultaneous AM and FM of my test waveform. > > I'll have to experiment with other windows to see if there is any reason > to chose one over another for real world signals. My test case may be > too clean. I'll also have to take a look at whether side lobes might > have significant influence on where I define the noise floor as being > for plotting purposes. >
I experimented and found an alpha of 10 worked well and there was good correlation between my test signal and a real world signal.
> >> >> If that's correct, there is a chance that you will see high sidelobes >> caused by the rectangular window (-13 dB or so for narrow-band >> signals). >> >> If it is indeed the case that you don't apply window functions, >> scale each temporal frame by some window function prior to >> the FFT. >> >> Rune