IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28368


Ignore:
Timestamp:
Jun 16, 2010, 3:09:40 PM (16 years ago)
Author:
eugene
Message:

more dvomerge tests (somewhat ill-defined)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/test/dvomerge.dvo

    r28325 r28368  
    3030  exec rsync -auc catdir.test2/ catdir.test3/
    3131
     32  date -var t1 -seconds -reftime 1276000000
    3233  exec dvomerge catdir.test1 into catdir.test3
     34  date -var t2 -seconds -reftime 1276000000
     35  echo "merge time: {$t2 - $t1}"
    3336
    3437  catdir catdir.test3
     
    8487
    8588  catdir catdir.test3
     89  mextract imageID, time
     90  set id = imageID
     91  set t = time
     92  imextract imageID, time
     93
     94  for i 0 time[]
     95    subset T = t if (id == imageID[$i])
     96    set dT = T - time[$i]
     97    vstat -q dT
     98    tapOK {abs($MEAN)  < 0.00001} "time for measure ID $i (MEAN)"
     99    tapOK {abs($SIGMA) < 0.00001} "time for measure ID $i (SIGMA)"
     100  end
     101
     102  # exec rm test.in.txt test.cmf
     103  # exec rm -rf catdir.test1
     104  # exec rm -rf catdir.test2
     105  # exec rm -rf catdir.test3
     106
     107  tapDONE
     108end
     109
     110# create 1 populated catdir, merge into currently non-existent catdir
     111macro test.dvomerge.update.new
     112
     113  tapPLAN 51
     114
     115  exec rm -rf catdir.test1
     116  exec rm -rf catdir.test2
     117
     118  $RA = 10.0
     119  $DEC = 20.0
     120
     121  mkinput
     122  exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 01:00:00 -radec $RA $DEC
     123  exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf
     124
     125  exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 02:00:00 -radec $RA $DEC
     126  exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf
     127
     128  date -var t1 -seconds -reftime 1276000000
     129  exec dvomerge catdir.test1 into catdir.test2
     130  date -var t2 -seconds -reftime 1276000000
     131  echo "merge time: {$t2 - $t1}"
     132
     133  catdir catdir.test2
     134  skyregion {$RA-1} {$RA+1} {$DEC-1} {$DEC+1}
     135  mextract ra dec mag
     136  create n 0 ra[]
     137  subset r0 = ra if (n % 2 == 0)
     138  subset r1 = ra if (n % 2 == 1)
     139
     140  catdir catdir.test1/
     141  mextract RA DEC MAG
     142  create N 0 RA[]
     143  subset R0 = RA if (N % 2 == 0)
     144  subset R1 = RA if (N % 2 == 1)
     145
     146  set dr0 = r0 - R0
     147  vstat -q dr0
     148  tapOK {abs($MEAN)  < 0.001} "ra (in - 0) vs ra (out - 0) (MEAN)"
     149  tapOK {abs($SIGMA) < 0.001} "ra (in - 0) vs ra (out - 0) (SIGMA)"
     150
     151  set dr1 = r1 - R1
     152  vstat -q dr1
     153  tapOK {abs($MEAN)  < 0.001} "ra (in - 0) vs ra (out - 0) (MEAN)"
     154  tapOK {abs($SIGMA) < 0.001} "ra (in - 0) vs ra (out - 0) (SIGMA)"
     155
     156  # check on updates to imageID
     157  catdir catdir.test3
     158  imextract imageID
     159  sort imageID
     160  tapOK {imageID[]  == 4} "image IDs exist"
     161  tapOK {imageID[0] == 1} "updated image IDs"
     162  tapOK {imageID[1] == 2} "updated image IDs"
     163
     164  catdir catdir.test2
    86165  mextract imageID, time
    87166  set id = imageID
Note: See TracChangeset for help on using the changeset viewer.