IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28325


Ignore:
Timestamp:
Jun 15, 2010, 9:33:38 AM (16 years ago)
Author:
eugene
Message:

another test for dvomerge; update svn:ignore

Location:
trunk/Ohana/src/addstar/test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Ohana/src/addstar/test

    • Property svn:ignore
      •  

        old new  
        44test.in.txt
        55catdir.test
         6catdir.test1
         7catdir.test2
         8catdir.test3
        69.dvo
        710relphot.airmass.png
  • trunk/Ohana/src/addstar/test/dvomerge.dvo

    r27435 r28325  
    105105end
    106106
    107 # create 2 populated catdirs, each with a couple of cmf files
    108 macro test.dvomerge.create
    109 
    110   tapPLAN 21
     107# create 2 populated catdirs, each with a couple of cmf files -- force some unmatched objects
     108macro test.dvomerge.update.extras
     109
     110  tapPLAN 51
    111111
    112112  exec rm -rf catdir.test1
     
    124124  exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf
    125125
     126  # generate a few extra unmatched sources
     127  mkinput.extras
    126128  exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 03:00:00 -radec $RA $DEC
    127129  exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf
     
    130132  exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf
    131133
    132   exec dvomerge catdir.test1 and catdir.test2 to catdir.test3
     134  exec rsync -auc catdir.test2/ catdir.test3/
     135
     136  exec dvomerge catdir.test1 into catdir.test3
    133137
    134138  catdir catdir.test3
     
    205209end
    206210
     211# create 2 populated catdirs, each with a couple of cmf files
     212macro test.dvomerge.create
     213
     214  tapPLAN 21
     215
     216  exec rm -rf catdir.test1
     217  exec rm -rf catdir.test2
     218  exec rm -rf catdir.test3
     219
     220  $RA = 10.0
     221  $DEC = 20.0
     222
     223  mkinput
     224  exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 01:00:00 -radec $RA $DEC
     225  exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf
     226
     227  exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 02:00:00 -radec $RA $DEC
     228  exec addstar -D CATDIR catdir.test1 -D CAMERA simtest test.cmf
     229
     230  exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 03:00:00 -radec $RA $DEC
     231  exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf
     232
     233  exec mkcmf test.in.txt test.cmf -date 2008/1/1 -time 04:00:00 -radec $RA $DEC
     234  exec addstar -D CATDIR catdir.test2 -D CAMERA simtest test.cmf
     235
     236  exec dvomerge catdir.test1 and catdir.test2 to catdir.test3
     237
     238  catdir catdir.test3
     239  skyregion {$RA-1} {$RA+1} {$DEC-1} {$DEC+1}
     240  mextract ra dec mag
     241  create n 0 ra[]
     242  subset r0 = ra if (n % 4 == 0)
     243  subset r1 = ra if (n % 4 == 1)
     244  subset r2 = ra if (n % 4 == 2)
     245  subset r3 = ra if (n % 4 == 3)
     246
     247  catdir catdir.test1/
     248  mextract RA DEC MAG
     249  create N 0 RA[]
     250  subset R0 = RA if (N % 2 == 0)
     251  subset R1 = RA if (N % 2 == 1)
     252
     253  set dr0 = r0 - R0
     254  vstat -q dr0
     255  tapOK {abs($MEAN)  < 0.001} "ra (in - 0) vs ra (out - 0) (MEAN)"
     256  tapOK {abs($SIGMA) < 0.001} "ra (in - 0) vs ra (out - 0) (SIGMA)"
     257
     258  set dr1 = r1 - R1
     259  vstat -q dr1
     260  tapOK {abs($MEAN)  < 0.001} "ra (in - 0) vs ra (out - 0) (MEAN)"
     261  tapOK {abs($SIGMA) < 0.001} "ra (in - 0) vs ra (out - 0) (SIGMA)"
     262
     263  catdir catdir.test2/
     264  mextract RA DEC MAG
     265  create N 0 RA[]
     266  subset R2 = RA if (N % 2 == 0)
     267  subset R3 = RA if (N % 2 == 1)
     268
     269  set dr2 = r2 - R2
     270  vstat -q dr2
     271  tapOK {abs($MEAN)  < 0.001} "ra (in - 0) vs ra (out - 0) (MEAN)"
     272  tapOK {abs($SIGMA) < 0.001} "ra (in - 0) vs ra (out - 0) (SIGMA)"
     273
     274  set dr3 = r3 - R3
     275  vstat -q dr3
     276  tapOK {abs($MEAN)  < 0.001} "ra (in - 0) vs ra (out - 0) (MEAN)"
     277  tapOK {abs($SIGMA) < 0.001} "ra (in - 0) vs ra (out - 0) (SIGMA)"
     278
     279  # check on updates to imageID
     280  catdir catdir.test3
     281  imextract imageID
     282  sort imageID
     283  tapOK {imageID[]  == 4} "image IDs exist"
     284  tapOK {imageID[0] == 1} "updated image IDs"
     285  tapOK {imageID[1] == 2} "updated image IDs"
     286  tapOK {imageID[2] == 3} "updated image IDs"
     287  tapOK {imageID[3] == 4} "updated image IDs"
     288
     289  catdir catdir.test3
     290  mextract imageID, time
     291  set id = imageID
     292  set t = time
     293  imextract imageID, time
     294
     295  for i 0 time[]
     296    subset T = t if (id == imageID[$i])
     297    set dT = T - time[$i]
     298    vstat -q dT
     299    tapOK {abs($MEAN)  < 0.00001} "time for measure ID $i (MEAN)"
     300    tapOK {abs($SIGMA) < 0.00001} "time for measure ID $i (SIGMA)"
     301  end
     302
     303  # exec rm test.in.txt test.cmf
     304  # exec rm -rf catdir.test1
     305  # exec rm -rf catdir.test2
     306  # exec rm -rf catdir.test3
     307
     308  tapDONE
     309end
     310
    207311# make a simple input file for mkcmf
    208312macro mkinput.alt
     
    225329  for i 10 1024 100
    226330    for j 10 1024 100
     331      fprintf " %4d %4d  %6.2f" $i $j {-15.0 + 2.5*($i + $j)/1000.0}
     332    end
     333  end
     334  output stdout
     335end
     336
     337# make a simple input file for mkcmf
     338macro mkinput.extras
     339  exec rm -f test.in.txt
     340
     341  output test.in.txt
     342  for i 10 1024 100
     343    for j 10 1024 100
     344      fprintf " %4d %4d  %6.2f" $i $j {-15.0 + 2.5*($i + $j)/1000.0}
     345    end
     346  end
     347  for i 20 1024 500
     348    for j 20 1024 500
    227349      fprintf " %4d %4d  %6.2f" $i $j {-15.0 + 2.5*($i + $j)/1000.0}
    228350    end
Note: See TracChangeset for help on using the changeset viewer.