Index: branches/eam_branches/ohana.20170822/src/opihi/cmd.data/test/periodogram.sh
===================================================================
--- branches/eam_branches/ohana.20170822/src/opihi/cmd.data/test/periodogram.sh	(revision 40266)
+++ branches/eam_branches/ohana.20170822/src/opihi/cmd.data/test/periodogram.sh	(revision 40292)
@@ -209,19 +209,18 @@
 # test using fewer random samples, high frequency, non-zero DC, some noise
 macro test8
- if ($0 != 4)
-   echo "USAGE: test8: Period Ndays df"
+ if ($0 != 2)
+   echo "USAGE: test8: Ndays")
    break
  end
  
  local Ndays 
- $P = $1
- $Ndays = $2
- $dM = $3
-
- $PASS = 1
- break -auto off
-
- local PI
- $PI = 3.14159265359
+ $Ndays = $1
+
+ $PASS = 1
+ break -auto off
+
+ local P PI
+ $PI = 3.14159265359
+ $P  = 0.8*rnd(0) + 0.2
  $trueP = $P
 
@@ -231,7 +230,7 @@
 
  # t is a time in days, but we always have 4 within 1 hour:
- set tday = int(100 * rnd(x)); # choose Ndays random days between 0 and 100
- set dtx = (3/24) * rnd(x);  # choose a starting time within that night
- set t0 = tday + dtx
+ set t0 = int(100 * rnd(x))
+ set dtx = (3/24) * rnd(x)
+ set t0 = t0 + dtx
 
  set dt1 = (15.0 / 1440) * rnd(x) + ( 0 + 7.5) / 1440
@@ -245,9 +244,9 @@
  set tmp = t0 + dt3; concat tmp t
 
- set fraw = 0.75*sin(2*$PI*t/$P)
+ set fraw = sin(2*$PI*t/$P) + 0.5
 
  # 0.05 : peakpos = 14.95
  # 0.10 : peakpos = 15.04 (
- gaussdev df t[] 0.0 $dM
+ gaussdev df t[] 0.0 0.25
  set f = fraw + df
 
@@ -261,7 +260,4 @@
  if (abs ($peakpos - $P) > 0.05)
    $PASS = 0
- end
- if ($PLOT)
-  lim period power; clear; box; line -c red70 -lw 3 $P 0 to $P $peakval; plot period power -x line
  end
 end
