- On Tue, 25 Oct 2011 12:32:36 -0700, SIMON DAWES

<simon.dawes@...> wrote:

> Here is the full script

Hi Simon,

> I think I know what is wrong now, you made me think a bit more about why

> testf and testf2 are the same when I test but different when I sp.print

> - I need to have a rethink on how I test for a meteor vs false

> positive signal...

I like puzzles ! here are a few lines that test for frequency change

versus time. Both time and freq can be changed to suit.

The nine lines below will run in conditional actions.

; Exported "Conditional Actions" for Spectrum Lab

if( initialising ) then C=0:D=0:E=0:L=0:t2=0:Z=0

if( initialising ) then pfreqhi = -1:pfreqlo = -1

if( initialising ) then F=1:A=noise(1740,2020):sig=peak_a(1740,2020):

if( initialising ) then MName="Meteor":Dir="c:\\spectrum\\meteorlog\\"

if( initialising ) then Mtime=0: MSig=0:

MFreq=0:Freq=peak_f(1740,2020):MNoise=0

if( always ) then q2=str("YYYYMMDD",now):L=str("hh",now):h1=str("mmss",now)

if( (peak_a(1740,2020))>((noise(1740,2020)+17)) ) then pfreqhi =

peak_f(1740,2020):timer4.start(3)

if( timer4.value<.5 ) then pfreqlo = peak_f(1740,2020)

if( (pfreqhi - pfreqlo >10) & (sig>(A+17)) &(timer4.value<.3) ) then

C=C+1:D=D+1:

timer1.restart(60):timer2.restart(10):timer3.restart(5):timer0.restart(2):

preqlo=prefreqhi

I totally messed up the naming somewhere so file saves aren't working

correctly.

It gets the peak frequency if the signal is above the noise by 17 and

stores it in variable pfreqhi then starts timer 4. If the signal is still

above the noise and the timer is near expiration it stores the peak

frequency in pfreqlo. I don't know how much time or what frequency range

are suitable. This seems too long a time and too small a frequency change.

Then if the frequency has changed more that 10 in the interval and the

timer is expired and the signal is still 17 more than the noise the

routines are all started. pfreqlo is set equal to pfreqhi to end the >10

condition forcing a new determination of the three conditions needed to

start the routines.

I'm sure the numbers will need changing, but that's the general idea.

73 Mike KD7TS - On Tue, 25 Oct 2011 12:32:36 -0700, SIMON DAWES

<simon.dawes@...> wrote:

> Here is the full script

Hi Simon,

> I think I know what is wrong now, you made me think a bit more about why

> testf and testf2 are the same when I test but different when I sp.print

> - I need to have a rethink on how I test for a meteor vs false

> positive signal...

I went back and just changed the way I identify pings and added that into

your code. It has the same problem with testf and testf2. I don't see see

the utility of those variables, but left them in anyway. It does return a

number if there is a valid signal detected.

The code is at

http://home.comcast.net/~kd7ts/html/speclab/test15.txt

http://home.comcast.net/~kd7ts/html/speclab/6.USR

I added new variables on their own line and one additional timer. I look

at three frequencies and if there is signal in any of them, I start a

timer. If a signal appears in one of the higher or lower frequencies

before the timer expires we continue with the routines you wrote. A

frequency is picked to be the center when A>15, then all the frequencies

are locked in. This allows for capturing short events that otherwise might

not get to a selected fixed frequency, Doppler that goes up or down, and

still reject carriers and some noise. I let it run a few hours on noise

and got no false hits. In testing for about 3 minutes it generated 73

files. Most were wave files of 1 kb that seemed to contain nothing.

I spaced the sp.print over a little to clear the waterfall time stamp. the

other just makes a mess of white on the left margin, as A>20 is true for

long periods. Everything else is as before.

73 Mike KD7TS

; Exported "Conditional Actions" for Spectrum Lab

if( (initialising) ) then

F=1:A=0:C=1:D=1:E=1:L=0:t2=0:Z=0:MName="Meteor":Dir="c:\\spectrum\\meteorlog\\":Mtime=0:

MSig=0:

MFreq=0:Freq=0:MNoise=0:low=1740:high=2600:delta=2:testf=0:testf2=0:chk=1

if( (initialising) ) then

yy=0:counter1=0:count=0:count1=0:count2=0:count3=0:sig1=0:sig2=0:sig3=0:csig1=0:csig2=0:csig3=0:pf1=0:pf2=0:pf3=0

if( (always) ) then

q2=str("YYYYMMDD",now):L=str("hh",now):h1=str("mmss",now):testf=peak_f(low,high)

if( always ) then A=noise(400,700)

if( peak_a(500,1500)>(A+15) ) then count=count+1:yy=1

if( (count<2)&(yy=1) ) then yy=yy+1:fs = peak_f(500,1500)

if( always ) then sig1=peak_a(fs+50,fs+200)

if( always ) then sig2=peak_a(fs-150,fs)

if( always ) then sig3=peak_a(fs-350,fs-200)

if( sig1>(A+15) ) then count1=count1+1:timer5.restart(8)

if( sig2>(A+15) ) then count2=count2+1:timer5.restart(8)

if( sig3>(A+15) ) then count3=count3+1:timer5.restart(8)

if( count1<2 ) then csig1=sig1:pf1=peak_f(fs+50,fs+200)

if( count2<2 ) then csig2=sig2:pf2=peak_f(fs-150,fs)

if( count3<2 ) then csig3=sig3:pf3=peak_f(fs-350,fs-200)

if( ((count1>1)&(count2>1))|((count2>1)&(count3>1)) ) then

counter1=counter1+1

if( timer5.expired ) then count=0:counter1=0:count1=0:count2=0:count3=0

if( counter1>30 ) then count=0:counter1=0:count1=0:count2=0:count3=0

if( counter1=4 ) then xx=1

if( (xx=1)&(counter1=4) ) then

C=C+1:D=D+1:timer1.restart(15):timer2.restart(5):timer3.restart(2):timer0.restart(2):testf2=peak_f(low,high):chk=int(testf2-testf)

if( (csig2>(A+20)) ) then sp.print(int(testf2-testf))

if( (C>Z) ) then Z=C

if( (C=1) ) then Mtime=q2+" "+L+h1:MName="Meteor"+q2+L+h1:MSig=csig2:

MFreq=Freq:MNoise=A

if( (C=1) ) then rec.filename=Dir+MName+".wav"

if( 0(C=1) ) then rec.trigger=1

if( (never) ) then REM ----------- Notify User of Meteor ------------

if( (timer0.expired(1)) ) then

E=E+1:fopen2(Dir+"MeteorLog-"+str("YYYYMM",now)+".dat",a):fp2(Mtime+","+str(MSig)+","+str(MNoise)+","+str(MFreq)+","+str(C)):fclose2

if( (timer3.expired(1)) ) then sp.print("

",Mtime,"S=",MSig,"dBm N=",MNoise,"dBm F=",MFreq,"Hz t=",C,"s

S:N=",MSig-MNoise,"Test:",testf2,testf,int(testf2-testf)):C=0

if( (timer2.expired(1)) ) then rec.trigger=0 :REM ------------ stop the

sound recorder ------------

if( 0(timer1.expired(1)) ) then capture(Dir+MName+".jpg",100):REM

plot.capture(Dir+MName+"Plot.jpg",100)

if( (val(h1,"####")=5955) ) then t2=t2+1

if( (t2=1) ) then fopen3(Dir+"RMOB_Dur-"+str("YYYYMM",now)+".dat",a):

fp3(q2+L,",",L,",",E,",",D,",",Z,",",A):fclose3:fopen4(Dir+"RMOB-"+str("YYYYMM",now)+".dat",a):fp4(q2+L,",",L,",",E):fclose4:

if( (t2=1) ) then sp.print("Last hour="+str(E)+" Meteor(s) | Total

duration "+str(D)):C=0:E=0:Z=0:D=0

if( ( val(h1,"####")=0000 ) ) then t2=0 Thanks Mike

I tried this script with no success, I used a wave file of real meteors from the draconids.I have started on the same approach as you with testing the signal either side of peak but am only logging results at the moment to see if with real data it does indeed provide a real distinction between meteors and 'other signals', another approach i am experimenting with the sigma function which i am guessing is a standard deviation measurement, the idea here is that a meteor is spread out so the sigma is low but another signal is not so has a higher sigma, this works quite well but needs refining and I have found signals that i would have classed as a meteor with characteristics of the other signals, I guess this is a feature of nature and one of the reasons why I am finding it difficult to come to a suite of measures that can tell the difference.

Re testf and testf2 the idea with these is to test the peak frequency at the point of detection of a signal and to then test the peak frequency at the end of the signal the rationale here being a meteor will have a small deviation but the other signals will not.

I may end up with a suite of tests and use some majority rules type logic to make a decision on if it is a meteor. One other thing i might do is to log these suspect signals as suspect and record the waterfall for analysis later...

Just ideas a the moment.

Thanks for your help.

SimonSent from Yahoo! Mail on Android

**From:**kd7ts <kd7ts@...>;

**To:**<SpectrumLabUsers@yahoogroups.com>;

**Subject:**Re: [SpectrumLabUsers] Help needed with conditional actions.

**Sent:**Mon, Oct 31, 2011 7:08:58 PM

On Tue, 25 Oct 2011 12:32:36 -0700, SIMON DAWES

<simon.dawes@...> wrote:> Here is the full script

Hi Simon,

> I think I know what is wrong now, you made me think a bit more about why

> testf and testf2 are the same when I test but different when I sp.print

> - I need to have a rethink on how I test for a meteor vs false

> positive signal...

I went back and just changed the way I identify pings and added that into

your code. It has the same problem with testf and testf2. I don't see see

the utility of those variables, but left them in anyway. It does return a

number if there is a valid signal detected.

The code is at

http://home.comcast.net/~kd7ts/html/speclab/test15.txt

http://home.comcast.net/~kd7ts/html/speclab/6.USR

I added new variables on their own line and one additional timer. I look

at three frequencies and if there is signal in any of them, I start a

timer. If a signal appears in one of the higher or lower frequencies

before the timer expires we continue with the routines you wrote. A

frequency is picked to be the center when A>15, then all the frequencies

are locked in. This allows for capturing short events that otherwise might

not get to a selected fixed frequency, Doppler that goes up or down, and

still reject carriers and some noise. I let it run a few hours on noise

and got no false hits. In testing for about 3 minutes it generated 73

files. Most were wave files of 1 kb that seemed to contain nothing.

I spaced the sp.print over a little to clear the waterfall time stamp. the

other just makes a mess of white on the left margin, as A>20 is true for

long periods. Everything else is as before.

73 Mike KD7TS

; Exported "Conditional Actions" for Spectrum Lab

if( (initialising) ) then

F=1:A=0:C=1:D=1:E=1:L=0:t2=0:Z=0:MName="Meteor":Dir="c:\\spectrum\\meteorlog\\":Mtime=0:

MSig=0:

MFreq=0:Freq=0:MNoise=0:low=1740:high=2600:delta=2:testf=0:testf2=0:chk=1

if( (initialising) ) then

yy=0:counter1=0:count=0:count1=0:count2=0:count3=0:sig1=0:sig2=0:sig3=0:csig1=0:csig2=0:csig3=0:pf1=0:pf2=0:pf3=0

if( (always) ) then

q2=str("YYYYMMDD",now):L=str("hh",now):h1=str("mmss",now):testf=peak_f(low,high)

if( always ) then A=noise(400,700)

if( peak_a(500,1500)>(A+15) ) then count=count+1:yy=1

if( (count<2)&(yy=1) ) then yy=yy+1:fs = peak_f(500,1500)

if( always ) then sig1=peak_a(fs+50,fs+200)

if( always ) then sig2=peak_a(fs-150,fs)

if( always ) then sig3=peak_a(fs-350,fs-200)

if( sig1>(A+15) ) then count1=count1+1:timer5.restart(8)

if( sig2>(A+15) ) then count2=count2+1:timer5.restart(8)

if( sig3>(A+15) ) then count3=count3+1:timer5.restart(8)

if( count1<2 ) then csig1=sig1:pf1=peak_f(fs+50,fs+200)

if( count2<2 ) then csig2=sig2:pf2=peak_f(fs-150,fs)

if( count3<2 ) then csig3=sig3:pf3=peak_f(fs-350,fs-200)

if( ((count1>1)&(count2>1))|((count2>1)&(count3>1)) ) then

counter1=counter1+1

if( timer5.expired ) then count=0:counter1=0:count1=0:count2=0:count3=0

if( counter1>30 ) then count=0:counter1=0:count1=0:count2=0:count3=0

if( counter1=4 ) then xx=1

if( (xx=1)&(counter1=4) ) then

C=C+1:D=D+1:timer1.restart(15):timer2.restart(5):timer3.restart(2):timer0.restart(2):testf2=peak_f(low,high):chk=int(testf2-testf)

if( (csig2>(A+20)) ) then sp.print(int(testf2-testf))

if( (C>Z) ) then Z=C

if( (C=1) ) then Mtime=q2+" "+L+h1:MName="Meteor"+q2+L+h1:MSig=csig2:

MFreq=Freq:MNoise=A

if( (C=1) ) then rec.filename=Dir+MName+".wav"

if( 0(C=1) ) then rec.trigger=1

if( (never) ) then REM ----------- Notify User of Meteor ------------

if( (timer0.expired(1)) ) then

E=E+1:fopen2(Dir+"MeteorLog-"+str("YYYYMM",now)+".dat",a):fp2(Mtime+","+str(MSig)+","+str(MNoise)+","+str(MFreq)+","+str(C)):fclose2

if( (timer3.expired(1)) ) then sp.print("

",Mtime,"S=",MSig,"dBm N=",MNoise,"dBm F=",MFreq,"Hz t=",C,"s

S:N=",MSig-MNoise,"Test:",testf2,testf,int(testf2-testf)):C=0

if( (timer2.expired(1)) ) then rec.trigger=0 :REM ------------ stop the

sound recorder ------------

if( 0(timer1.expired(1)) ) then capture(Dir+MName+".jpg",100):REM

plot.capture(Dir+MName+"Plot.jpg",100)

if( (val(h1,"####")=5955) ) then t2=t2+1

if( (t2=1) ) then fopen3(Dir+"RMOB_Dur-"+str("YYYYMM",now)+".dat",a):

fp3(q2+L,",",L,",",E,",",D,",",Z,",",A):fclose3:fopen4(Dir+"RMOB-"+str("YYYYMM",now)+".dat",a):fp4(q2+L,",",L,",",E):fclose4:

if( (t2=1) ) then sp.print("Last hour="+str(E)+" Meteor(s) | Total

duration "+str(D)):C=0:E=0:Z=0:D=0

if( ( val(h1,"####")=0000 ) ) then t2=0

------------------------------------

Yahoo! Groups Links

<*> To visit your group on the web, go to:

http://groups.yahoo.com/group/SpectrumLabUsers/

<*> Your email settings:

Individual Email | Traditional

<*> To change settings online go to:

http://groups.yahoo.com/group/SpectrumLabUsers/join

(Yahoo! ID required)

<*> To change settings via email:

SpectrumLabUsers-digest@yahoogroups.com

SpectrumLabUsers-fullfeatured@yahoogroups.com

<*> To unsubscribe from this group, send an email to:

SpectrumLabUsers-unsubscribe@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:

http://docs.yahoo.com/info/terms/- I am experimenting with image processing (using ImageMagick) to distinguish meteor pings from other stuff.

I save waterfall pictures every 5 minutes and batch process them later using Perl script that calls ImageMagick commands. There is a lot of things to try:

http://www.imagemagick.org/Usage/morphology/

It is easy to remove thin horizontal lines (direct signal propagation and plane reflections). Vertical lines (impulse noise) are more tricky.

The last step is to squeeze the picture to one pixel high and count the dots.

My RMOB reporting still uses the SpectrumLab script by Maarten , http://www.supernovae.be/meteorcounting, because my 24/7 production laptop is too old for ImageMagick in real time.

If you are interested, I can provide more details.

Mike

--- In SpectrumLabUsers@yahoogroups.com, SIMON DAWES <simon.dawes@...> wrote:

>

> Thanks Mike

> I tried this script with no success, I used a wave file of real meteors from the draconids.

>

> I have started on the same approach as you with testing the signal either side of peak but am only logging results at the moment to see if with real data it does indeed provide a real distinction between meteors and 'other signals', another approach i am experimenting with the sigma function which i am guessing is a standard deviation measurement, the idea here is that a meteor is spread out so the sigma is low but another signal is not so has a higher sigma, this works quite well but needs refining and I have found signals that i would have classed as a meteor with characteristics of the other signals, I guess this is a feature of nature and one of the reasons why I am finding it difficult to come to a suite of measures that can tell the difference.