IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39021


Ignore:
Timestamp:
Nov 2, 2015, 7:53:00 AM (11 years ago)
Author:
eugene
Message:

add mkcmf -forcedgalaxy; add forcedelete mode to mkgpc1

Location:
trunk/ippToPsps/test
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/test/fulltest.sh

    r39015 r39021  
    2020# mkgpc1.sh user localhost eam eam
    2121
    22 set mkgpc1       = 1
    23 set initdb       = 1
    24 set initscratch  = 1
    25 set initbatch    = 1
    26 set camqueue     = 1
    27 set cambatch     = 1
    28 set stackqueue   = 1
    29 set stackbatch   = 1
    30 set forcequeue   = 1
    31 set forcebatch   = 1
    32 set objectqueue  = 1
    33 set objectbatch  = 1
     22set mkgpc1         = 1
     23set initdb         = 1
     24set initscratch    = 1
     25set initbatch      = 1
     26set camqueue       = 1
     27set cambatch       = 1
     28set stackqueue     = 1
     29set stackbatch     = 1
     30set forcequeue     = 1
     31set forcebatch     = 1
     32set objectqueue    = 1
     33set objectbatch    = 1
    3434set forcedobjqueue = 1
    3535set forcedobjbatch = 1
    36 set diffqueue    = 1
    37 set diffbatch    = 1
    38 set diffobjqueue = 1
    39 set diffobjbatch = 1
    40 
     36set diffqueue      = 1
     37set diffbatch      = 1
     38set diffobjqueue   = 1
     39set diffobjbatch   = 1
    4140
    4241set options = "-test"
  • trunk/ippToPsps/test/mkgpc1.sh

    r39015 r39021  
    6868endif
    6969
     70if ("$1" == "forcedelete") then
     71  if ($#argv < 4) goto usage;
     72  set dbhost = $2
     73  set dbname = $3
     74  set dbuser = $4
     75  if ($#argv == 5) then
     76    set dbpass = "-p$5"
     77  else
     78    set dbpass = "-p"
     79  endif
     80
     81  (mysql -B -h $dbhost -u $dbuser $dbpass -e "show databases" | grep ^$dbname\$) >& /dev/null
     82  if ($status) then
     83    echo "database $dbname does not yet exist"
     84    exit 0
     85  endif
     86
     87  mysql -h $dbhost -u $dbuser $dbpass $dbname -e "describe ippToPspsFake" >& /dev/null
     88  if ($status) then
     89    echo "database does not contain ippToPspsFake, not deleting"
     90    exit 1;
     91  endif
     92
     93  set ntable = `mysql -B -h $dbhost -u $dbuser $dbpass $dbname -e "show tables" | wc -l`
     94  echo ntable: $ntable
     95  if ($ntable != 28) then
     96    echo "warning: expected 28 lines (27 tables), but got $ntable; still deleting"
     97  else
     98    echo "database is valid, deleting"
     99  endif
     100
     101  mysql -h $dbhost -u $dbuser $dbpass -e "drop database $dbname"
     102  exit 0;
     103endif
     104
    70105usage:
    71106  echo "USAGE: mkgpc1.sh (options)"
  • trunk/ippToPsps/test/mkgpc1data.dvo

    r39016 r39021  
    249249
    250250    ## this is not generating photcodes recognized as stack by relphot
     251    if ($SMALLTEST && ($stkID != 1) && ($stkID != 4)) continue
    251252
    252253    mkinput $offset $rawfile
     
    331332    echo addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -xrad
    332333    exec addstar -D SKY_DEPTH 4 -D CATDIR $catdir -D CAMERA simtest $cmffile -D CATFORMAT $2 -quick-airmass -xrad
     334  end
     335 
     336  # add the forcedgalaxy files for the above warps:
     337  for i 0 $stackdata:n
     338    list word -split $stackdata:$i
     339    $stkID = $word:0
     340    $rawfile = $word:2\.txt
     341    $cmffile = $word:2\.cmf
     342    $offset = $word:3
     343    $filter = $word:4
     344
     345    ## this is not generating photcodes recognized as stack by relphot
     346    if ($SMALLTEST && ($stkID != 1) && ($stkID != 4)) continue
     347
     348    echo mkcmf -forcedgalaxy -photcode SIMTEST.$filter.ForcedWarp $rawfile $cmffile -extroot SkyChip -date 2008/1/1 -time $i\:00:00 -mjd 54466.0 -radec $RA $DEC -type $1 -imageID $stkID -sourceID 1 -tess_id $TESS_ID -skycell $SKYCELL
     349    exec mkcmf -forcedgalaxy -photcode SIMTEST.$filter.ForcedWarp $rawfile $cmffile -extroot SkyChip -date 2008/1/1 -time $i\:00:00 -mjd 54466.0 -radec $RA $DEC -type $1 -imageID $stkID -sourceID 1 -tess_id $TESS_ID -skycell $SKYCELL
     350
     351    echo loadgalphot -D CATDIR $catdir $cmffile
     352    exec loadgalphot -D CATDIR $catdir $cmffile
    333353  end
    334354
Note: See TracChangeset for help on using the changeset viewer.