Loading ...
Sorry, an error occurred while loading the content.

440Re: [SpectrumLabUsers] Help needed with conditional actions.

Expand Messages
    Nov 1, 2011
    • 0 Attachment

      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.

      Sent 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
      > 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...

      Hi Simon,

      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



      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 
      if( (initialising) ) then 
      if( (always) ) then 
      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 
      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 
      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: 
      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 
      if( (timer3.expired(1)) ) then sp.print("                 
      ",Mtime,"S=",MSig,"dBm N=",MNoise,"dBm F=",MFreq,"Hz t=",C,"s 
      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 
      if( (val(h1,"####")=5955) ) then t2=t2+1
      if( (t2=1) ) then fopen3(Dir+"RMOB_Dur-"+str("YYYYMM",now)+".dat",a): 
      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:

      <*> Your email settings:
          Individual Email | Traditional

      <*> To change settings online go to:
          (Yahoo! ID required)

      <*> To change settings via email:

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

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

    • Show all 9 messages in this topic