My Keying (2)

Bug_down

This is a histogram of key down period (i.e., either dots or dashes). It seems that the dot to dash ratio is around 25:100, or 1:4.

Bug_up

This is a histogram of key up period, or of spaces.

Save Time: 2014-02-02 15:12:44
Units:(mV)
                     CH1
Frequency:      4.564 Hz
Period:       219.091 mS
PK-PK:           3.520 V

1                 400.00
2                   0.00
3                   0.00
4                   0.00
5                  80.00
6                   0.00
7                   0.00
8                 -80.00
9                   0.00
10                  0.00
11                -80.00
12                  0.00
13                  0.00
14                  0.00
15                  0.00
16                160.00
17                  0.00
18                  0.00
19                 80.00
20               1760.00
21               2880.00
22               3280.00
23               3280.00
24               3280.00

The text file obtained from the oscilloscope is something like this.

BEGIN { th=2000; n=10; b4=1 }

/^[0-9]/ {

 if($2>th) out=1
 else
 out=0

 if(b4==1 && out==0)
  i=n

 if(i>0) {
  out=0
  i--
 }

 b4=out

 print out
}

This awk programs gives a “0” and “1” sequence by slicing the voltage.

BEGIN { b4=1; ndown=0; nup=0 }

{
 if(b4==1 && $1==0) {
  ndown=0
  if(nup>0) print "up", nup
 }

 if(b4==0 && $1==1) {
  nup=0
  if(ndown>0) print "dw", ndown
 }

 if($1==0)
  ndown++
 else
  nup++

 b4=$1
}

And this program counts the run of either “0”s or “1”s, and gives:

dw 20
up 34
dw 105
up 98
dw 96
up 44
dw 22
up 26
dw 24
up 28
dw 21
up 31
dw 11
up 156