Changeset 37246 for trunk/ippToPsps/test
- Timestamp:
- Aug 12, 2014, 4:10:18 PM (12 years ago)
- Location:
- trunk/ippToPsps/test
- Files:
-
- 5 edited
- 12 copied
-
fulltest.sh (modified) (12 diffs)
-
mkgpc1.sh (modified) (3 diffs)
-
mkgpc1data.dvo (modified) (9 diffs)
-
mksasdata.dvo (modified) (4 diffs)
-
sascheck.v0.sql (copied) (copied from branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v0.sql )
-
sascheck.v1.sql (copied) (copied from branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v1.sql )
-
sascheck.v10.sql (copied) (copied from branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v10.sql )
-
sascheck.v11.sql (copied) (copied from branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v11.sql )
-
sascheck.v2.sql (copied) (copied from branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v2.sql )
-
sascheck.v3.sql (copied) (copied from branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v3.sql )
-
sascheck.v4.sql (copied) (copied from branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v4.sql )
-
sascheck.v5.sql (copied) (copied from branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v5.sql )
-
sascheck.v6.sql (copied) (copied from branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v6.sql )
-
sascheck.v7.sql (copied) (copied from branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v7.sql )
-
sascheck.v8.sql (copied) (copied from branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v8.sql )
-
sascheck.v9.sql (copied) (copied from branches/eam_branches/ipp-20140717/ippToPsps/test/sascheck.v9.sql )
-
sastest.sh (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/test/fulltest.sh
r35456 r37246 1 1 #!/bin/csh -f 2 2 3 chmod +x *.dvo *.sh3 chmod +x mkgpc1data.dvo mkgpc1.sh 4 4 5 5 # a bit crude : get the datadir path by interpollation of the PATH element for psconfig … … 14 14 # before running this test, you must have a mysql user: 15 15 # mkgpc1.sh user localhost eam eam 16 16 17 set mkgpc1 = 1 17 18 set initdb = 1 … … 157 158 mysql -h localhost -u dvo -pdvo -e "create database ipptopsps_test" 158 159 mysql -h localhost -u dvo -pdvo ipptopsps_test < $IPPTOPSPS_DATA/ippToPspsDbSchema.sql 159 160 160 endif 161 161 … … 168 168 mysql -h localhost -u dvo -pdvo -e "drop database ipptopsps_test_scratch" 169 169 mysql -h localhost -u dvo -pdvo -e "create database ipptopsps_test_scratch" 170 ippjython setupScratchDb.py -test 171 endif 172 173 # `name` 174 # `datastore_product` 175 # `datastore_type` 176 # `datastore_publish` 177 # `dvo_label` 178 # `dvo_location` 179 # `min_ra` 180 # `max_ra` 181 # `min_dec` 182 # `max_dec` 183 # `box_size` 184 # `base_path` 185 # `data_release` 186 # `delete_local` 187 # `delete_datastore` 188 # `delete_dxlayer` 189 # `epoch` 190 # `survey` 191 # `psps_survey` 192 # `queue_P2` 193 # `queue_ST` 194 # `queue_OB` 195 # `active` 196 # `parallel` 170 ippjython setupScratchDb.py -test < /dev/null 171 if ($status) exit 172 endif 197 173 198 174 # this is poor : we need to queue something in order to generate an init batch … … 203 179 echo " ---- make skychunk for IN batches ----" 204 180 205 ippjython queue.py -test edit <<EOF 206 initbatch 207 test_ds 208 IPP_PSPS 209 0 210 none 211 none 212 0 213 0 214 0 215 0 216 2 217 none 218 0 219 0 220 1 221 1 222 2012-12-10 00:00:00.0 223 3PI 224 3PI 225 0 226 0 227 0 228 1 229 0 230 y 231 y 232 EOF 181 echo "initbatch " > initbatch.dat # skychunk name 182 echo "test_ds " >> initbatch.dat # datastore_product 183 echo "IPP_PSPS " >> initbatch.dat # datastore_type 184 echo "0 " >> initbatch.dat # datastore_publish 185 echo "none " >> initbatch.dat # dvo_label 186 echo "none " >> initbatch.dat # dvo_location 187 echo "0 " >> initbatch.dat # min_ra 188 echo "0 " >> initbatch.dat # max_ra 189 echo "0 " >> initbatch.dat # min_dec 190 echo "0 " >> initbatch.dat # max_dec 191 echo "2 " >> initbatch.dat # box_size 192 echo "none " >> initbatch.dat # base_path 193 echo "0 " >> initbatch.dat # data_release 194 echo "0 " >> initbatch.dat # delete_local 195 echo "1 " >> initbatch.dat # delete_datastore 196 echo "1 " >> initbatch.dat # delete_dxlayer 197 echo "2012-12-10 00:00:00.0 " >> initbatch.dat # epoch 198 echo "3PI " >> initbatch.dat # survey 199 echo "3PI " >> initbatch.dat # psps_survey 200 echo "0 " >> initbatch.dat # queue_P2 201 echo "0 " >> initbatch.dat # queue_ST 202 echo "0 " >> initbatch.dat # queue_OB 203 echo "0 " >> initbatch.dat # queue_DF 204 echo "0 " >> initbatch.dat # queue_DO 205 echo "0 " >> initbatch.dat # queue_FW 206 echo "0 " >> initbatch.dat # queue_FO 207 echo "1 " >> initbatch.dat # active 208 echo "0 " >> initbatch.dat # parallel 209 echo "use_new " >> initbatch.dat # P2_smf_version 210 echo "any " >> initbatch.dat # ST_cmf_version 211 echo "2000-01-01 00:00:00.0 " >> initbatch.dat # trange_start 212 echo "2020-01-01 00:00:00.0 " >> initbatch.dat # trange_end 213 cat initbatch.dat | ippjython queue.py -test edit 214 if ($status) exit 233 215 234 216 echo "" … … 236 218 237 219 rm -rf $OUTDIR/IN 238 ippjython loader.py -test initbatch init 220 ippjython loader.py -test initbatch init -simtest < /dev/null 221 if ($status) exit 239 222 endif 240 223 … … 244 227 echo " ---- queue P2 batches ----" 245 228 246 ippjython queue.py -test edit <<EOF 247 $queuename 248 test_ds 249 IPP_PSPS 250 0 251 catdir.cam 252 $OUTDIR/catdir.cam 253 9 254 11 255 19 256 21 257 2 258 $OUTDIR 259 0 260 0 261 1 262 1 263 2012-12-10 00:00:00.0 264 3PI 265 3PI 266 1 267 0 268 0 269 1 270 0 271 y 272 y 273 EOF 229 echo "$queuename " > cambatch.dat # skychunk name 230 echo "test_ds " >> cambatch.dat # datastore_product 231 echo "IPP_PSPS " >> cambatch.dat # datastore_type 232 echo "0 " >> cambatch.dat # datastore_publish 233 echo "catdir.cam " >> cambatch.dat # dvo_label 234 echo "$OUTDIR/catdir.cam " >> cambatch.dat # dvo_location 235 echo "9 " >> cambatch.dat # min_ra 236 echo "11 " >> cambatch.dat # max_ra 237 echo "19 " >> cambatch.dat # min_dec 238 echo "21 " >> cambatch.dat # max_dec 239 echo "2 " >> cambatch.dat # box_size 240 echo "$OUTDIR " >> cambatch.dat # base_path 241 echo "0 " >> cambatch.dat # data_release 242 echo "0 " >> cambatch.dat # delete_local 243 echo "1 " >> cambatch.dat # delete_datastore 244 echo "1 " >> cambatch.dat # delete_dxlayer 245 echo "2012-12-10 00:00:00.0 " >> cambatch.dat # epoch 246 echo "3PI " >> cambatch.dat # survey 247 echo "3PI " >> cambatch.dat # psps_survey 248 echo "1 " >> cambatch.dat # queue_P2 249 echo "0 " >> cambatch.dat # queue_ST 250 echo "0 " >> cambatch.dat # queue_OB 251 echo "0 " >> cambatch.dat # queue_DF 252 echo "0 " >> cambatch.dat # queue_DO 253 echo "0 " >> cambatch.dat # queue_FW 254 echo "0 " >> cambatch.dat # queue_FO 255 echo "1 " >> cambatch.dat # active 256 echo "0 " >> cambatch.dat # parallel 257 echo "use_new " >> cambatch.dat # P2_smf_version 258 echo "any " >> cambatch.dat # ST_cmf_version 259 echo "2000-01-01 00:00:00.0 " >> cambatch.dat # trange_start 260 echo "2020-01-01 00:00:00.0 " >> cambatch.dat # trange_end 261 cat cambatch.dat | ippjython queue.py -test edit -simtest 262 if ($status) exit 274 263 endif 275 264 … … 279 268 280 269 rm -rf $OUTDIR/P2 281 ippjython loader.py -test $queuename once 270 ippjython loader.py -test $queuename once -simtest < /dev/null 271 if ($status) exit 282 272 endif 283 273 … … 290 280 set stackqueuename = $queuename\_stk 291 281 endif 292 ippjython queue.py -test edit <<EOF 293 $stackqueuename 294 test_ds 295 IPP_PSPS 296 0 297 catdir.stk 298 $OUTDIR/catdir.stk 299 9 300 11 301 19 302 21 303 2 304 $OUTDIR 305 0 306 0 307 1 308 1 309 2012-12-10 00:00:00.0 310 3PI 311 3PI 312 0 313 1 314 0 315 1 316 0 317 y 318 y 319 EOF 282 echo "$stackqueuename " > stackbatch.dat # skychunk name 283 echo "test_ds " >> stackbatch.dat # datastore_product 284 echo "IPP_PSPS " >> stackbatch.dat # datastore_type 285 echo "0 " >> stackbatch.dat # datastore_publish 286 echo "catdir.stk " >> stackbatch.dat # dvo_label 287 echo "$OUTDIR/catdir.stk " >> stackbatch.dat # dvo_location 288 echo "9 " >> stackbatch.dat # min_ra 289 echo "11 " >> stackbatch.dat # max_ra 290 echo "19 " >> stackbatch.dat # min_dec 291 echo "21 " >> stackbatch.dat # max_dec 292 echo "2 " >> stackbatch.dat # box_size 293 echo "$OUTDIR " >> stackbatch.dat # base_path 294 echo "0 " >> stackbatch.dat # data_release 295 echo "0 " >> stackbatch.dat # delete_local 296 echo "1 " >> stackbatch.dat # delete_datastore 297 echo "1 " >> stackbatch.dat # delete_dxlayer 298 echo "2012-12-10 00:00:00.0 " >> stackbatch.dat # epoch 299 echo "3PI " >> stackbatch.dat # survey 300 echo "3PI " >> stackbatch.dat # psps_survey 301 echo "0 " >> stackbatch.dat # queue_P2 302 echo "1 " >> stackbatch.dat # queue_ST 303 echo "0 " >> stackbatch.dat # queue_OB 304 echo "0 " >> stackbatch.dat # queue_DF 305 echo "0 " >> stackbatch.dat # queue_DO 306 echo "0 " >> stackbatch.dat # queue_FW 307 echo "0 " >> stackbatch.dat # queue_FO 308 echo "1 " >> stackbatch.dat # active 309 echo "0 " >> stackbatch.dat # parallel 310 echo "use_new " >> stackbatch.dat # P2_smf_version 311 echo "any " >> stackbatch.dat # ST_cmf_version 312 echo "2000-01-01 00:00:00.0 " >> stackbatch.dat # trange_start 313 echo "2020-01-01 00:00:00.0 " >> stackbatch.dat # trange_end 314 cat stackbatch.dat | ippjython queue.py -test edit -simtest 315 if ($status) exit 320 316 endif 321 317 … … 328 324 endif 329 325 rm -rf $OUTDIR/ST 330 ippjython loader.py -test $stackqueuename once 326 ippjython loader.py -test $stackqueuename once -simtest < /dev/null 327 if ($status) exit 331 328 endif 332 329 … … 339 336 set objectqueuename = $queuename\_obj 340 337 endif 341 ippjython queue.py -test edit <<EOF 342 $objectqueuename 343 test_ds 344 IPP_PSPS 345 0 346 catdir.stk 347 $OUTDIR/catdir.stk 348 9 349 11 350 19 351 21 352 2 353 $OUTDIR 354 0 355 0 356 1 357 1 358 2012-12-10 00:00:00.0 359 3PI 360 3PI 361 0 362 0 363 1 364 1 365 0 366 y 367 y 368 EOF 338 echo "$objectqueuename " > objectbatch.dat # skychunk name 339 echo "test_ds " >> objectbatch.dat # datastore_product 340 echo "IPP_PSPS " >> objectbatch.dat # datastore_type 341 echo "0 " >> objectbatch.dat # datastore_publish 342 echo "catdir.cam " >> objectbatch.dat # dvo_label 343 echo "$OUTDIR/catdir.cam " >> objectbatch.dat # dvo_location 344 echo "9 " >> objectbatch.dat # min_ra 345 echo "11 " >> objectbatch.dat # max_ra 346 echo "19 " >> objectbatch.dat # min_dec 347 echo "21 " >> objectbatch.dat # max_dec 348 echo "2 " >> objectbatch.dat # box_size 349 echo "$OUTDIR " >> objectbatch.dat # base_path 350 echo "0 " >> objectbatch.dat # data_release 351 echo "0 " >> objectbatch.dat # delete_local 352 echo "1 " >> objectbatch.dat # delete_datastore 353 echo "1 " >> objectbatch.dat # delete_dxlayer 354 echo "2012-12-10 00:00:00.0 " >> objectbatch.dat # epoch 355 echo "3PI " >> objectbatch.dat # survey 356 echo "3PI " >> objectbatch.dat # psps_survey 357 echo "0 " >> objectbatch.dat # queue_P2 358 echo "0 " >> objectbatch.dat # queue_ST 359 echo "1 " >> objectbatch.dat # queue_OB 360 echo "0 " >> objectbatch.dat # queue_DF 361 echo "0 " >> objectbatch.dat # queue_DO 362 echo "0 " >> objectbatch.dat # queue_FW 363 echo "0 " >> objectbatch.dat # queue_FO 364 echo "1 " >> objectbatch.dat # active 365 echo "0 " >> objectbatch.dat # parallel 366 echo "use_new " >> objectbatch.dat # P2_smf_version 367 echo "any " >> objectbatch.dat # ST_cmf_version 368 echo "2000-01-01 00:00:00.0 " >> objectbatch.dat # trange_start 369 echo "2020-01-01 00:00:00.0 " >> objectbatch.dat # trange_end 370 cat objectbatch.dat | ippjython queue.py -test edit once -simtest 371 if ($status) exit 369 372 endif 370 373 … … 377 380 endif 378 381 rm -rf $OUTDIR/OB 379 ippjython loader.py -test $objectqueuename once 380 endif 381 382 383 ippjython loader.py -test $objectqueuename once -simtest < /dev/null 384 if ($status) exit 385 endif 386 -
trunk/ippToPsps/test/mkgpc1.sh
r35224 r37246 47 47 bg_stdev REAL, 48 48 ra FLOAT, 49 decl FLOAT 49 decl FLOAT, 50 dateobs DATETIME 50 51 ); 51 52 CREATE TABLE chipRun ( … … 88 89 ); 89 90 CREATE TABLE stackSumSkyfile ( 90 stack_id INT 91 stack_id INT, 92 mjd_obs DOUBLE 91 93 ); 92 94 CREATE TABLE skycalRun ( 95 sky_id INT, 93 96 skycal_id INT, 94 97 stack_id INT … … 155 158 echo ntable: $ntable 156 159 if ($ntable != 21) then 157 echo "expected 21 lines ( 19tables), but got $ntable, not deleting"160 echo "expected 21 lines (20 tables), but got $ntable, not deleting" 158 161 exit 2 159 162 endif -
trunk/ippToPsps/test/mkgpc1data.dvo
r35753 r37246 15 15 # exp_id stack_id raw_file exp_file offset 16 16 list imagedata 17 1 1 $OUTDIR/test.01 0.000 18 2 1 $OUTDIR/test.02 -0.025 19 3 1 $OUTDIR/test.03 0.025 20 4 1 $OUTDIR/test.04 0.010 21 5 2 $OUTDIR/test.05 0.000 22 6 2 $OUTDIR/test.06 -0.025 23 7 2 $OUTDIR/test.07 0.025 24 8 2 $OUTDIR/test.08 0.010 25 9 3 $OUTDIR/test.09 0.000 26 10 3 $OUTDIR/test.10 -0.025 27 11 3 $OUTDIR/test.11 0.025 28 12 3 $OUTDIR/test.12 0.010 17 1 1 $OUTDIR/test.01 0.000 2010/01/01 01:00:00 18 2 1 $OUTDIR/test.02 -0.025 2010/01/01 02:00:00 19 3 1 $OUTDIR/test.03 0.025 2010/01/01 03:00:00 20 4 1 $OUTDIR/test.04 0.010 2010/01/01 04:00:00 21 5 2 $OUTDIR/test.05 0.000 2010/01/01 05:00:00 22 6 2 $OUTDIR/test.06 -0.025 2010/01/01 06:00:00 23 7 2 $OUTDIR/test.07 0.025 2010/01/01 07:00:00 24 8 2 $OUTDIR/test.08 0.010 2010/01/01 08:00:00 25 9 3 $OUTDIR/test.09 0.000 2010/01/01 09:00:00 26 10 3 $OUTDIR/test.10 -0.025 2010/01/01 10:00:00 27 11 3 $OUTDIR/test.11 0.025 2010/01/01 11:00:00 28 12 3 $OUTDIR/test.12 0.010 2010/01/01 12:00:00 29 29 end 30 30 … … 39 39 # mkcatdir.cam PS1_V3 PS1_V4 40 40 # mkcatdir.stk PS1_V3 PS1_V4 41 mkcatdir.cam PS1_V4 PS1_V4 42 mkcatdir.stk PS1_V4 PS1_V4 41 # mkcatdir.cam PS1_V4 PS1_V4 42 # mkcatdir.stk PS1_V4 PS1_V4 43 mkcatdir.cam PS1_V5 PS1_V5 44 mkcatdir.stk PS1_V5 PS1_V5 43 45 insert.stack.set 44 46 end … … 94 96 $offset = $word:3 95 97 96 ctimes -abs 2008/01/01,$i\:00:00 -var mjd 98 sprintf myDATE "%s" $word:4 99 sprintf myTIME "%s" $word:5 100 echo ctimes -abs $myDATE,$myTIME -var mjd 101 ctimes -abs $myDATE,$myTIME -var mjd 97 102 98 103 # XXX for a simple test of ippToPsps, i need to generate smf files with some correspondence to gpc1 exposure smfs … … 142 147 143 148 mkinput $offset $rawfile 144 exec mkcmf - no-noise -append $rawfile $cmffile -date 2008/1/1 -time $i\:00:00-radec $RA $DEC -type $1 -imageID $ID -sourceID 0149 exec mkcmf -photcode SIMTEST.r.Chip -no-noise -append $rawfile $cmffile -date $myDATE -time $myTIME -radec $RA $DEC -type $1 -imageID $ID -sourceID 0 145 150 146 151 # keywords which are read from image extension … … 203 208 end 204 209 205 if ( $i == 5)210 if (0 && ($i == 5)) 206 211 echo "NOTE: adding image $i 2x to DVO, but without detections : this simulates a failure in LAP dvo" 207 212 208 echo addstar -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -image -dup-images209 exec addstar -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -image -dup-images213 echo addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -image -dup-images 214 exec addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -image -dup-images 210 215 end 211 216 212 if ( $i == 7)217 if (0 && ($i == 7)) 213 218 echo "NOTE: adding detections from image $i 2x to DVO, but with wrong photcode and duplicate image ID : this simulates a failure in LAP dvo" 214 echo addstar -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -dup-images -image-id-override 7 -photcode 2MASS_J215 exec addstar -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -dup-images -image-id-override 7 -photcode 2MASS_J219 echo addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -dup-images -image-id-override 7 -photcode 2MASS_J 220 exec addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -dup-images -image-id-override 7 -photcode 2MASS_J 216 221 end 217 222 218 echo addstar -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass 219 exec addstar -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass 220 end 223 echo addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass 224 exec addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass 225 end 226 227 echo relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -update 228 exec relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -update 221 229 222 230 if ($PARALLEL) … … 264 272 $offset = $word:2 265 273 274 ## this is not generating photcodes recognized as stack by relphot 275 266 276 mkinput $offset $rawfile 267 exec mkcmf $rawfile $cmffile -extname SkyChip -date 2008/1/1 -time $i\:00:00 -radec $RA $DEC -type $1 -imageID $ID -sourceID 1277 exec mkcmf -photcode SIMTEST.r.SkyChip $rawfile $cmffile -extname SkyChip -date 2008/1/1 -time $i\:00:00 -radec $RA $DEC -type $1 -imageID $ID -sourceID 1 268 278 269 279 # add some required header keywords: 270 280 exec echo "HIERARCH FPA.ZP = 25. / Magnitude zero point" > tmp.hdr 281 exec echo "TESS_ID = 'RINGS.V3'" >> tmp.hdr 282 exec echo "SKYCELL = 'skycell.1133.081'" >> tmp.hdr 271 283 exec fits_insert $cmffile tmp.hdr 272 284 273 exec addstar -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass 274 end 285 echo addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass 286 exec addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass 287 end 288 289 echo relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -update 290 exec relphot -D CATDIR $catdir -region 8 12 18 22 -images g,r,i,z,y -update 275 291 276 292 if ($PARALLEL) … … 308 324 309 325 # a single exposure 310 dbinsert rawExp (exp_id, exp_name, exp_time, bg, bg_stdev, ra, decl) values ($myID, "test.$myID", 10.0, 100.0, 2.0, {$RA*3.1415/180.0}, {$DEC*3.1415/180.0}) 326 echo $myDATE 327 echo $myTIME 328 329 dbinsert rawExp (exp_id, exp_name, exp_time, bg, bg_stdev, ra, decl, dateobs) values ($myID, "test.$myID", 10.0, 100.0, 2.0, {$RA*3.1415/180.0}, {$DEC*3.1415/180.0}, '$myDATE $myTIME') 311 330 dbinsert chipRun (exp_id, chip_id) values ($myID, $myID) 312 dbinsert camRun (chip_id, cam_id, dist_group, software_ver) values ($myID, $myID, "testgroup", " testsoft")331 dbinsert camRun (chip_id, cam_id, dist_group, software_ver) values ($myID, $myID, "testgroup", "38000M") 313 332 dbinsert camProcessedExp (cam_id, path_base, fault) values ($myID, "$filename", 0) 314 333 dbinsert fakeRun (fake_id, cam_id) values ($myID, $myID) … … 332 351 $stkfile = $2 333 352 334 dbinsert stackRun (stack_id, skycell_id, filter, software_ver) values ($stkID, "skycell.0000.000", "g.00000", "testsoft") 353 dbinsert stackRun (stack_id, skycell_id, filter, software_ver) values ($stkID, "skycell.0000.000", "g.00000", "37500") 354 355 $TIMEFORMAT = mjd 356 $TIMEREF = 2001/01/01,00:00:00 357 358 $mjdsum = 0.0 359 $Nstk = 0 335 360 336 361 for i 0 $imagedata:n … … 341 366 $expID = $tmp:0 342 367 $expfile = $tmp:2 368 sprintf myDATE "%s" $tmp:4 369 sprintf myTIME "%s" $tmp:5 343 370 insert.exp $expID $expfile 344 371 dbinsert stackInputSkyfile (stack_id, warp_id) values ($stkID, $expID) 345 end 346 dbinsert stackSumSkyfile (stack_id) values ($stkID) 347 dbinsert skycalRun (skycal_id, stack_id) values ($stkID, $stkID) 372 373 echo ctimes -abs $myDATE,$myTIME -var mjd 374 ctimes -abs $myDATE,$myTIME -var mjd 375 $mjdsum += $mjd 376 $Nstk ++ 377 end 378 $mjd = $mjdsum / $Nstk 379 380 dbinsert stackSumSkyfile (stack_id, mjd_obs) values ($stkID, $mjd) 381 dbinsert skycalRun (sky_id, skycal_id, stack_id) values ($stkID, $stkID, $stkID) 348 382 dbinsert skycalResult (skycal_id, path_base) values ($stkID, "$stkfile") 349 383 -
trunk/ippToPsps/test/mksasdata.dvo
r35097 r37246 4 4 5 5 if (not($?VERBOSE)) set VERBOSE = 0 6 if (not($?PARALLEL)) set PARALLEL = 0 6 7 7 $OUTDIR = sas12 8 $OUTDIR = sasdata 9 10 if (not($?KEEPDVO)) set KEEPDVO = 0 11 12 list expfiles 13 sasdata/o5745g0495o.356867.cm.982612 14 sasdata/o5745g0507o.356882.cm.982626 15 sasdata/o5745g0517o.356892.cm.982636 16 sasdata/o5745g0527o.356909.cm.982650 17 end 8 18 9 19 macro mkfull 10 20 init.db 11 mkcatdir 21 mkcatdir.cam 22 mkcatdir.stk 23 mkcal 24 mkgpc1.cam 25 mkgpc1.stk 12 26 end 13 27 … … 18 32 $dbpass = dvo 19 33 20 # exposure center 21 $RA = 333.8 22 $DEC = 1.6 23 24 # stack center 25 # XXX the selected stack centers come from the input exposures, so I should use a gpc1 db with stacks associated with real exposures 26 $RA = 331.6 27 $DEC = -6.0 34 # are these used to find the exposures in any way? 35 # center of the test skycell 36 $RA = 333.5 37 $DEC = -5.0 28 38 29 39 break -auto off … … 36 46 # system-wide info 37 47 dbinsert ippToPspsFake (my_id) values (2) 38 dbinsert skycell (radeg, decdeg, skycell_id) values ($RA, $DEC, "skycell. 0000.000")48 dbinsert skycell (radeg, decdeg, skycell_id) values ($RA, $DEC, "skycell.1225.070") 39 49 end 40 50 41 51 # create a populated catdir with a set of cmf files, save the filenames in list for use by insert.exp 42 macro mkcatdir 52 macro mkcatdir.cam 43 53 if ($0 != 1) 44 54 echo "mkcatdir" … … 49 59 50 60 local catdir 51 $catdirbase = catdir.sas12 61 $catdirbase = catdir.sas.cam 62 $catdir = $OUTDIR/$catdirbase 63 64 exec rm -rf $catdir 65 66 for i 0 $expfiles:n 67 $expfile = $expfiles:$i 68 69 exec addstar -D CAMERA gpc1 -D CATDIR $catdir -D CATFORMAT PS1_V5 $expfile.smf -update 70 end 71 exec addstar -D CATDIR $catdir -region 330 340 -10 0 -resort 72 end 73 74 # create a populated catdir with a set of cmf files, save the filenames in list for use by insert.exp 75 macro mkcatdir.stk 76 if ($0 != 1) 77 echo "mkcatdir" 78 break 79 end 80 81 mkdir $OUTDIR 82 83 local catdir 84 $catdirbase = catdir.sas.stk 52 85 $catdir = $OUTDIR/$catdirbase 53 86 exec rm -rf $catdir 54 87 55 $expfile = sas12.test.psps/o5745g0620o.356996.cm.473458 56 exec addstar -D CAMERA gpc1 -D CATDIR $catdir $expfile.smf 88 # a single stack 89 $stkfile = sasdata/RINGS.V3.skycell.1225.070.stk.3366216.skycal.1589960 90 exec addstar -D CAMERA gpc1 -D CATFORMAT PS1_V5 -D CATDIR $catdir $stkfile.cmf 91 end 57 92 58 # are these used to find the exposures in any way? 59 $RA = 333.8 60 $DEC = 1.6 93 macro mkcal 61 94 62 # a single exposure 63 $expID = 1 64 dbinsert rawExp (exp_id, exp_name, exp_time, bg, bg_stdev, ra, decl) values ($expID, "o5745g0620o", 10.0, 100.0, 2.0, {$RA*3.1415/180.0}, {$DEC*3.1415/180.0}) 65 dbinsert chipRun (exp_id, chip_id) values ($expID, $expID) 66 dbinsert camRun (chip_id, cam_id, dist_group, software_ver) values ($expID, $expID, "testgroup", "testsoft") 67 dbinsert camProcessedExp (cam_id, path_base) values ($expID, "$expfile") 68 dbinsert fakeRun (fake_id, cam_id) values ($expID, $expID) 69 dbinsert warpRun (warp_id, fake_id) values ($expID, $expID) 70 dbinsert warpSkyCellMap (warp_id, skycell_id, class_id) values ($expID, "skycell.0000.000", "XY00") 71 dbinsert addRun (stage, state, stage_id, minidvodb_name) values ("cam", "full", $expID, "$catdirbase") 95 local catdir 96 $catdir = $OUTDIR/catdir.sas.cam 97 98 # merge the cam and stk databases together: 99 exec dvomerge $OUTDIR/catdir.sas.stk into $catdir 100 101 # run relphot 102 echo relphot -D CATDIR $catdir -region 330 340 -10 0 -images g,r,i,z,y -update -boundary-tree tess.3pi.fits 103 exec relphot -D CATDIR $catdir -region 330 340 -10 0 -images g,r,i,z,y -update -boundary-tree tess.3pi.fits 104 105 echo relastro -v -D CATDIR $catdir -images -update-chips -region 330 340 -10 0 -update 106 exec relastro -v -D CATDIR $catdir -images -update-chips -region 330 340 -10 0 -update 107 end 108 109 # create a populated catdir with a set of cmf files, save the filenames in list for use by insert.exp 110 macro mkgpc1.cam 111 if ($0 != 1) 112 echo "mkgpc1.cam" 113 break 114 end 115 116 local catdirbase 117 $catdirbase = catdir.sas.cam 118 119 for i 0 $expfiles:n 120 $expfile = $expfiles:$i 121 122 # are these used to find the exposures in any way? 123 $RA = 333.9 124 $DEC = -3.8 125 126 # a single exposure 127 $expID = $i + 1 128 substr $expfile 8 11 expname 129 130 dbinsert rawExp (exp_id, exp_name, exp_time, bg, bg_stdev, ra, decl, dateobs) values ($expID, "$expname", 10.0, 100.0, 2.0, {$RA*3.1415/180.0}, {$DEC*3.1415/180.0}, "2010/01/01 00:00:00") 131 dbinsert chipRun (exp_id, chip_id) values ($expID, $expID) 132 dbinsert camRun (chip_id, cam_id, dist_group, software_ver) values ($expID, $expID, "testgroup", "38000M") 133 dbinsert camProcessedExp (cam_id, path_base, fault) values ($expID, "$expfile", 0) 134 dbinsert fakeRun (fake_id, cam_id) values ($expID, $expID) 135 dbinsert warpRun (warp_id, fake_id) values ($expID, $expID) 136 dbinsert warpSkyCellMap (warp_id, skycell_id, class_id) values ($expID, "skycell.1225.070", "XY00") 137 dbinsert addRun (add_id, stage, state, stage_id, minidvodb_name) values ($expID, "cam", "full", $expID, "$catdirbase") 138 dbinsert addProcessedExp (add_id, fault) values ($expID, 0) 139 140 # catdirs for the exposures 141 dbinsert minidvodbRun (minidvodb_name, minidvodb_id, state) values ("$catdirbase", 1, "merged") 142 dbinsert minidvodbProcessed (minidvodb_id, fault) values (1, 0) 143 144 dbinsert mergedvodbRun (minidvodb_id, merge_id, state, mergedvodb) values (1, 1, "full", "$catdirbase") 145 dbinsert mergedvodbProcessed (merge_id, fault) values (1, 0) 146 end 147 end 148 149 # create a populated catdir with a set of cmf files, save the filenames in list for use by insert.exp 150 macro mkgpc1.stk 151 if ($0 != 1) 152 echo "mkgpc1.stk" 153 break 154 end 155 156 local catdirbase 157 $catdirbase = catdir.sas.cam 158 159 $TIMEFORMAT = mjd 160 $TIMEREF = 2001/01/01,00:00:00 161 ctimes -abs 2010/01/01,00:00:00 -var mjd 72 162 73 163 # a single stack 74 $stkfile = sas12.test.psps/RINGS.V3.skycell.1225.070.stk.1032983.skycal.40531 75 exec addstar -D CAMERA gpc1 -D CATDIR $catdir $stkfile.cmf 164 $stkfile = sasdata/RINGS.V3.skycell.1225.070.stk.3366216.skycal.1589960 76 165 77 $stkID = 1 78 dbinsert stackRun (stack_id, skycell_id, filter, software_ver) values ($stkID, "skycell.0000.000", "g.00000", "testsoft") 166 break -auto off 167 $tmpline = `echo $stkfile.cmf | fields IMAGEID` 168 list words -split $tmpline 169 $stkID = $words:1 170 break -auto on 171 172 $expID = 1 173 dbinsert stackRun (stack_id, skycell_id, filter, software_ver) values ($stkID, "skycell.1225.070", "i.00000", "37500M") 79 174 dbinsert stackInputSkyfile (stack_id, warp_id) values ($stkID, $expID) 80 dbinsert stackSumSkyfile (stack_id ) values ($stkID)81 dbinsert skycalRun (sky cal_id, stack_id) values ($stkID, $stkID)175 dbinsert stackSumSkyfile (stack_id, mjd_obs) values ($stkID, $mjd) 176 dbinsert skycalRun (sky_id, skycal_id, stack_id) values ($stkID, $stkID, $stkID) 82 177 dbinsert skycalResult (skycal_id, path_base) values ($stkID, "$stkfile") 83 178 dbinsert addRun (stage, state, stage_id, minidvodb_name) values ("skycal", "full", $stkID, "$catdirbase") 84 85 # catdirs for the exposures86 dbinsert minidvodbRun (minidvodb_name, minidvodb_id, state) values ("$catdirbase", 1, "merged")87 dbinsert minidvodbProcessed (minidvodb_id, fault) values (1, 0)88 89 dbinsert mergedvodbRun (minidvodb_id, merge_id, state, mergedvodb) values (1, 1, "full", "$catdirbase")90 dbinsert mergedvodbProcessed (merge_id, fault) values (1, 0)91 179 92 180 # catdirs for the stack -
trunk/ippToPsps/test/sastest.sh
r35179 r37246 1 1 #!/bin/csh -f 2 2 3 set stackqueuename = 0 4 if ($#argv > 0) then 5 set stackqueuename = $1 6 echo "stackqueue: $stackqueuename" 7 endif 3 chmod +x mksasdata.dvo mkgpc1.sh 8 4 9 5 # a bit crude : get the datadir path by interpolation of the PATH element for psconfig … … 19 15 # mkgpc1.sh user localhost eam eam 20 16 21 set mkgpc1 = 1 22 set initdb = 1 23 set mkdummy = 1 24 set initscratch = 1 25 set initbatch = 1 26 set camqueue = 1 27 set cambatch = 1 28 set stackqueue = 0 29 set stackbatch = 0 30 31 set OUTDIR = "sas12" 17 set mkgpc1 = 1 18 set initdb = 1 19 set mkdummy = 1 20 set initscratch = 1 21 set initbatch = 1 22 set camqueue = 1 23 set cambatch = 1 24 set stackqueue = 1 25 set stackbatch = 1 26 set objectqueue = 1 27 set objectbatch = 1 28 29 set targ = ($argv) 30 set args = "" 31 32 while ($#targ) 33 switch ("$targ[1]") 34 case -h 35 case -help 36 echo "USAGE: fulltest.sh [-XX] [+XX]" 37 echo " -XX : turn off features" 38 echo " +XX : turn on features" 39 echo " features: all, mkgpc1, initdb, initscratch, initbatch, camera, stack, object" 40 exit 2 41 case -all 42 set mkgpc1 = 0 43 set initdb = 0 44 set initscratch = 0 45 set initbatch = 0 46 set camqueue = 0 47 set cambatch = 0 48 set stackqueue = 0 49 set stackbatch = 0 50 set objectqueue = 0 51 set objectbatch = 0 52 breaksw; 53 case -mkgpc1 54 set mkgpc1 = 0 55 breaksw; 56 case -initdb 57 set initdb = 0 58 breaksw; 59 case -initscratch 60 set initscratch = 0 61 breaksw; 62 case -initbatch 63 set initbatch = 0 64 breaksw; 65 case -camera 66 set camqueue = 0 67 set cambatch = 0 68 breaksw; 69 case -stack 70 set stackqueue = 0 71 set stackbatch = 0 72 breaksw; 73 case -object 74 set objectqueue = 0 75 set objectbatch = 0 76 breaksw; 77 default: 78 set args=($args $targ[1]); 79 breaksw; 80 endsw 81 shift targ 82 end 83 84 set targ = ($args) 85 set args = "" 86 87 while ($#targ) 88 switch ("$targ[1]") 89 case +all 90 set mkgpc1 = 1 91 set initdb = 1 92 set initscratch = 1 93 set initbatch = 1 94 set camqueue = 1 95 set cambatch = 1 96 set stackqueue = 1 97 set stackbatch = 1 98 set objectqueue = 1 99 set objectbatch = 1 100 breaksw; 101 case +mkgpc1 102 set mkgpc1 = 1 103 breaksw; 104 case +initdb 105 set initdb = 1 106 breaksw; 107 case +initscratch 108 set initscratch = 1 109 breaksw; 110 case +initbatch 111 set initbatch = 1 112 breaksw; 113 case "+camera" 114 set camqueue = 1 115 set cambatch = 1 116 breaksw; 117 case +stack 118 set stackqueue = 1 119 set stackbatch = 1 120 breaksw; 121 case +object 122 set objectqueue = 1 123 set objectbatch = 1 124 breaksw; 125 default: 126 set args=($args $targ[1]); 127 breaksw; 128 endsw 129 shift targ 130 end 131 132 if ($args[1] != "") then 133 echo "USAGE: sastest.sh [-XX] [+XX]" 134 echo " -XX : turn off features" 135 echo " +XX : turn on features" 136 echo " features: all, mkgpc1, initdb, initscratch, initbatch, camera, stack, object" 137 exit 2 138 endif 139 140 set stackqueuename = 0 141 set objectqueuename = 0 142 143 set OUTDIR = "sasdata" 32 144 set queuename = "test" 33 145 34 146 if ($mkgpc1) then 147 echo "" 148 echo " ---- mksasdata.dvo : creating the dvo & gpc1 database entries ----" 35 149 mksasdata.dvo 36 150 endif … … 38 152 # create the ipptopsps database 39 153 if ($initdb) then 154 echo "" 155 echo " ---- init ipptopsps_test ----" 40 156 41 157 # does the database already exist? … … 43 159 mysql -h localhost -u dvo -pdvo -e "create database ipptopsps_test" 44 160 mysql -h localhost -u dvo -pdvo ipptopsps_test < $IPPTOPSPS_DATA/ippToPspsDbSchema.sql 45 46 161 endif 47 162 … … 52 167 mysql -h localhost -u dvo -pdvo -e "drop database ipptopsps_scratch" 53 168 mysql -h localhost -u dvo -pdvo -e "create database ipptopsps_scratch" 54 ippjython setupScratchDb.py -test 169 ippjython setupScratchDb.py -test < /dev/null 170 if ($status) exit 171 endif 172 173 # this is poor : we need to queue something in order to generate an init batch 174 # this is because a skychunk carries the info about the datastore used to publish 175 # the batch 176 if ($initbatch) then 177 echo "" 178 echo " ---- make skychunk for IN batches ----" 179 180 echo "initbatch " > initbatch.dat # skychunk name 181 echo "test_ds " >> initbatch.dat # datastore_product 182 echo "IPP_PSPS " >> initbatch.dat # datastore_type 183 echo "0 " >> initbatch.dat # datastore_publish 184 echo "none " >> initbatch.dat # dvo_label 185 echo "none " >> initbatch.dat # dvo_location 186 echo "0 " >> initbatch.dat # min_ra 187 echo "0 " >> initbatch.dat # max_ra 188 echo "0 " >> initbatch.dat # min_dec 189 echo "0 " >> initbatch.dat # max_dec 190 echo "2 " >> initbatch.dat # box_size 191 echo "none " >> initbatch.dat # base_path 192 echo "0 " >> initbatch.dat # data_release 193 echo "0 " >> initbatch.dat # delete_local 194 echo "1 " >> initbatch.dat # delete_datastore 195 echo "1 " >> initbatch.dat # delete_dxlayer 196 echo "2012-12-10 00:00:00.0 " >> initbatch.dat # epoch 197 echo "3PI " >> initbatch.dat # survey 198 echo "3PI " >> initbatch.dat # psps_survey 199 echo "0 " >> initbatch.dat # queue_P2 200 echo "0 " >> initbatch.dat # queue_ST 201 echo "0 " >> initbatch.dat # queue_OB 202 echo "0 " >> initbatch.dat # queue_DF 203 echo "0 " >> initbatch.dat # queue_DO 204 echo "0 " >> initbatch.dat # queue_FW 205 echo "0 " >> initbatch.dat # queue_FO 206 echo "1 " >> initbatch.dat # active 207 echo "0 " >> initbatch.dat # parallel 208 echo "use_new " >> initbatch.dat # P2_smf_version 209 echo "any " >> initbatch.dat # ST_cmf_version 210 echo "2000-01-01 00:00:00.0 " >> initbatch.dat # trange_start 211 echo "2020-01-01 00:00:00.0 " >> initbatch.dat # trange_end 212 cat initbatch.dat | ippjython queue.py -test edit 213 if ($status) exit 214 215 echo "" 216 echo " ---- create init batch ----" 217 218 rm -rf $OUTDIR/IN 219 ippjython loader.py -test initbatch init < /dev/null 220 if ($status) exit 55 221 endif 56 222 57 223 # this code is sensitive to a previously existing database? 58 224 if ($camqueue) then 59 ippjython queue.py -test edit <<EOF 60 $queuename 61 test_ds 62 IPP_PSPS 63 0 64 catdir.sas12 65 $OUTDIR/catdir.sas12 66 330 67 340 68 -8 69 2 70 1 71 $OUTDIR 72 0 73 0 74 1 75 1 76 2012-12-10 00:00:00.0 77 3PI 78 3PI 79 1 80 1 81 1 82 1 83 0 84 1 85 y 86 y 87 EOF 88 endif 89 90 if ($initbatch) then 91 ippjython loader.py -test $queuename init 225 echo "" 226 echo " ---- queue P2 batches ----" 227 228 echo "$queuename " > cambatch.dat # skychunk name 229 echo "test_ds " >> cambatch.dat # datastore_product 230 echo "IPP_PSPS " >> cambatch.dat # datastore_type 231 echo "0 " >> cambatch.dat # datastore_publish 232 echo "catdir.sas.cam " >> cambatch.dat # dvo_label 233 echo "$OUTDIR/catdir.sas.cam" >> cambatch.dat # dvo_location 234 echo "330 " >> cambatch.dat # min_ra 235 echo "340 " >> cambatch.dat # max_ra 236 echo "-10 " >> cambatch.dat # min_dec 237 echo "0 " >> cambatch.dat # max_dec 238 echo "1 " >> cambatch.dat # box_size 239 echo "$OUTDIR " >> cambatch.dat # base_path 240 echo "0 " >> cambatch.dat # data_release 241 echo "0 " >> cambatch.dat # delete_local 242 echo "1 " >> cambatch.dat # delete_datastore 243 echo "1 " >> cambatch.dat # delete_dxlayer 244 echo "2012-12-10 00:00:00.0 " >> cambatch.dat # epoch 245 echo "3PI " >> cambatch.dat # survey 246 echo "3PI " >> cambatch.dat # psps_survey 247 echo "1 " >> cambatch.dat # queue_P2 248 echo "0 " >> cambatch.dat # queue_ST 249 echo "0 " >> cambatch.dat # queue_OB 250 echo "0 " >> cambatch.dat # queue_DF 251 echo "0 " >> cambatch.dat # queue_DO 252 echo "0 " >> cambatch.dat # queue_FW 253 echo "0 " >> cambatch.dat # queue_FO 254 echo "1 " >> cambatch.dat # active 255 echo "0 " >> cambatch.dat # parallel 256 echo "use_new " >> cambatch.dat # P2_smf_version 257 echo "any " >> cambatch.dat # ST_cmf_version 258 echo "2000-01-01 00:00:00.0 " >> cambatch.dat # trange_start 259 echo "2020-01-01 00:00:00.0 " >> cambatch.dat # trange_end 260 cat cambatch.dat | ippjython queue.py -test edit 261 if ($status) exit 92 262 endif 93 263 94 264 if ($cambatch) then 95 ippjython loader.py -test $queuename once 265 echo "" 266 echo " ---- load P2 batches ----" 267 268 rm -rf $OUTDIR/P2 269 ippjython loader.py -test $queuename once < /dev/null 270 if ($status) exit 96 271 endif 97 272 98 273 # this code is sensitive to a previously existing database? 99 274 if ($stackqueue) then 275 echo "" 276 echo " ---- queue ST batches ----" 277 100 278 if ($stackqueuename == 0) then 101 279 set stackqueuename = $queuename\_stk 102 280 endif 103 ippjython queue.py -test edit <<EOF 104 $stackqueuename 105 test_ds 106 IPP_PSPS 107 0 108 catdir.sas12 109 $OUTDIR/catdir.sas12 110 330 111 340 112 -8 113 2 114 1 115 $OUTDIR 116 0 117 0 118 1 119 1 120 2012-12-10 00:00:00.0 121 3PI 122 3PI 123 0 124 1 125 0 126 1 127 0 128 1 129 y 130 y 131 EOF 281 echo "$stackqueuename " > stackbatch.dat # skychunk name 282 echo "test_ds " >> stackbatch.dat # datastore_product 283 echo "IPP_PSPS " >> stackbatch.dat # datastore_type 284 echo "0 " >> stackbatch.dat # datastore_publish 285 echo "catdir.sas.cam " >> stackbatch.dat # dvo_label 286 echo "$OUTDIR/catdir.sas.cam" >> stackbatch.dat # dvo_location 287 echo "332 " >> stackbatch.dat # min_ra 288 echo "335 " >> stackbatch.dat # max_ra 289 echo "-6 " >> stackbatch.dat # min_dec 290 echo "-4 " >> stackbatch.dat # max_dec 291 echo "1 " >> stackbatch.dat # box_size 292 echo "$OUTDIR " >> stackbatch.dat # base_path 293 echo "0 " >> stackbatch.dat # data_release 294 echo "0 " >> stackbatch.dat # delete_local 295 echo "1 " >> stackbatch.dat # delete_datastore 296 echo "1 " >> stackbatch.dat # delete_dxlayer 297 echo "2012-12-10 00:00:00.0 " >> stackbatch.dat # epoch 298 echo "3PI " >> stackbatch.dat # survey 299 echo "3PI " >> stackbatch.dat # psps_survey 300 echo "0 " >> stackbatch.dat # queue_P2 301 echo "1 " >> stackbatch.dat # queue_ST 302 echo "0 " >> stackbatch.dat # queue_OB 303 echo "0 " >> stackbatch.dat # queue_DF 304 echo "0 " >> stackbatch.dat # queue_DO 305 echo "0 " >> stackbatch.dat # queue_FW 306 echo "0 " >> stackbatch.dat # queue_FO 307 echo "1 " >> stackbatch.dat # active 308 echo "0 " >> stackbatch.dat # parallel 309 echo "use_new " >> stackbatch.dat # P2_smf_version 310 echo "any " >> stackbatch.dat # ST_cmf_version 311 echo "2000-01-01 00:00:00.0 " >> stackbatch.dat # trange_start 312 echo "2020-01-01 00:00:00.0 " >> stackbatch.dat # trange_end 313 cat stackbatch.dat | ippjython queue.py -test edit 314 if ($status) exit 132 315 endif 133 316 134 317 if ($stackbatch) then 318 echo "" 319 echo " ---- load ST batches ----" 320 135 321 if ($stackqueuename == 0) then 136 322 set stackqueuename = $queuename\_stk 137 323 endif 138 ippjython loader.py -test $stackqueuename once 139 endif 140 324 rm -rf $OUTDIR/ST 325 ippjython loader.py -test $stackqueuename once < /dev/null 326 if ($status) exit 327 endif 328 329 # this code is sensitive to a previously existing database? 330 if ($objectqueue) then 331 echo "" 332 echo " ---- queue OB batches ----" 333 334 if ($objectqueuename == 0) then 335 set objectqueuename = $queuename\_obj 336 endif 337 echo "$objectqueuename " > objectbatch.dat # skychunk name 338 echo "test_ds " >> objectbatch.dat # datastore_product 339 echo "IPP_PSPS " >> objectbatch.dat # datastore_type 340 echo "0 " >> objectbatch.dat # datastore_publish 341 echo "catdir.sas.cam " >> objectbatch.dat # dvo_label 342 echo "$OUTDIR/catdir.sas.cam " >> objectbatch.dat # dvo_location 343 echo "330 " >> objectbatch.dat # min_ra 344 echo "340 " >> objectbatch.dat # max_ra 345 echo "-10 " >> objectbatch.dat # min_dec 346 echo "0 " >> objectbatch.dat # max_dec 347 echo "2 " >> objectbatch.dat # box_size 348 echo "$OUTDIR " >> objectbatch.dat # base_path 349 echo "0 " >> objectbatch.dat # data_release 350 echo "0 " >> objectbatch.dat # delete_local 351 echo "1 " >> objectbatch.dat # delete_datastore 352 echo "1 " >> objectbatch.dat # delete_dxlayer 353 echo "2012-12-10 00:00:00.0 " >> objectbatch.dat # epoch 354 echo "3PI " >> objectbatch.dat # survey 355 echo "3PI " >> objectbatch.dat # psps_survey 356 echo "0 " >> objectbatch.dat # queue_P2 357 echo "0 " >> objectbatch.dat # queue_ST 358 echo "1 " >> objectbatch.dat # queue_OB 359 echo "0 " >> objectbatch.dat # queue_DF 360 echo "0 " >> objectbatch.dat # queue_DO 361 echo "0 " >> objectbatch.dat # queue_FW 362 echo "0 " >> objectbatch.dat # queue_FO 363 echo "1 " >> objectbatch.dat # active 364 echo "0 " >> objectbatch.dat # parallel 365 echo "use_new " >> objectbatch.dat # P2_smf_version 366 echo "any " >> objectbatch.dat # ST_cmf_version 367 echo "2000-01-01 00:00:00.0 " >> objectbatch.dat # trange_start 368 echo "2020-01-01 00:00:00.0 " >> objectbatch.dat # trange_end 369 cat objectbatch.dat | ippjython queue.py -test edit once 370 if ($status) exit 371 endif 372 373 if ($objectbatch) then 374 echo "" 375 echo " ---- load OB batches ----" 376 377 if ($objectqueuename == 0) then 378 set objectqueuename = $queuename\_obj 379 endif 380 rm -rf $OUTDIR/OB 381 382 ippjython loader.py -test $objectqueuename once < /dev/null 383 if ($status) exit 384 endif 385
Note:
See TracChangeset
for help on using the changeset viewer.
