IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 13, 2017, 10:53:48 AM (9 years ago)
Author:
eugene
Message:

merge EAM development branch changes for DR2 into trunk (add PS1_V6 dvo format; change Mcal to McalPSF, McalAPER; change opihi int vectors to 64bit)

Location:
trunk/Ohana
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana

  • trunk/Ohana/src/opihi/cmd.data/test/periodogram.sh

    r40165 r40291  
    209209# test using fewer random samples, high frequency, non-zero DC, some noise
    210210macro test8
    211  if ($0 != 2)
    212    echo "USAGE: test8: Ndays")
     211 if ($0 != 4)
     212   echo "USAGE: test8: Period Ndays df"
    213213   break
    214214 end
    215215 
    216216 local Ndays
    217  $Ndays = $1
    218 
    219  $PASS = 1
    220  break -auto off
    221 
    222  local P PI
    223  $PI = 3.14159265359
    224  $P  = 0.8*rnd(0) + 0.2
     217 $P = $1
     218 $Ndays = $2
     219 $dM = $3
     220
     221 $PASS = 1
     222 break -auto off
     223
     224 local PI
     225 $PI = 3.14159265359
    225226 $trueP = $P
    226227
     
    230231
    231232 # t is a time in days, but we always have 4 within 1 hour:
    232  set t0 = int(100 * rnd(x))
    233  set dtx = (3/24) * rnd(x)
    234  set t0 = t0 + dtx
     233 set tday = int(100 * rnd(x)); # choose Ndays random days between 0 and 100
     234 set dtx = (3/24) * rnd(x);  # choose a starting time within that night
     235 set t0 = tday + dtx
    235236
    236237 set dt1 = (15.0 / 1440) * rnd(x) + ( 0 + 7.5) / 1440
     
    244245 set tmp = t0 + dt3; concat tmp t
    245246
    246  set fraw = sin(2*$PI*t/$P) + 0.5
     247 set fraw = 0.75*sin(2*$PI*t/$P)
    247248
    248249 # 0.05 : peakpos = 14.95
    249250 # 0.10 : peakpos = 15.04 (
    250  gaussdev df t[] 0.0 0.25
     251 gaussdev df t[] 0.0 $dM
    251252 set f = fraw + df
    252253
     
    260261 if (abs ($peakpos - $P) > 0.05)
    261262   $PASS = 0
     263 end
     264 if ($PLOT)
     265  lim period power; clear; box; line -c red70 -lw 3 $P 0 to $P $peakval; plot period power -x line
    262266 end
    263267end
Note: See TracChangeset for help on using the changeset viewer.