IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 13, 2015, 12:11:58 PM (11 years ago)
Author:
eugene
Message:

use sas40 inv.cmf / cmf files for diff test; use str(foo) to match column names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/test/mksasdata.dvo

    r39105 r39134  
    2222list expfiles -glob sasdata.v39/*.smf
    2323list wrpfiles -glob sasdata.v39/*.wrp.*ff*.cmf
    24 list diffiles -glob sasdata.v39/*.WS.dif.*.cmf
     24# list diffiles -glob sasdata.v39/*.WS.dif.*.cmf
     25list diffiles -glob sasdata.v40/*.WS.dif.*.inv.cmf
    2526list stkfiles -glob sasdata.v39/*skycal*.cmf
    2627
     
    192193
    193194# create a populated catdir with a set of cmf files, save the filenames in list for use by insert.exp
    194 macro mkcatdir.dif
    195   if ($0 != 1)
    196     echo "mkcatdir.dif"
     195macro mkcatdir.dif.old
     196  if ($0 != 1)
     197    echo "mkcatdir.dif.old"
    197198    break
    198199  end
    199200
    200201  for i 0 $diffiles:n
    201     $diffile = $diffiles:$i
     202    $difffile = $diffiles:$i
    202203    echo addstar -D SKY_DEPTH 4 -D CATDIR $catdir_diff -D CATFORMAT PS1_V5 -D CAMERA gpc1 -update $diffile -D ZERO_POINT_OPTION CHIP_HEADER -accept-astrom -D ZERO_POINT_KEYWORD FPA.ZP
    203204    exec addstar -D SKY_DEPTH 4 -D CATDIR $catdir_diff -D CATFORMAT PS1_V5 -D CAMERA gpc1 -update $diffile -D ZERO_POINT_OPTION CHIP_HEADER -accept-astrom -D ZERO_POINT_KEYWORD FPA.ZP
     205    # echo addstar -D CAMERA gpc1 -D CATDIR $catdir -D CATFORMAT PS1_V5 $stkfile -update -quick-airmass -D ZERO_POINT_OPTION CHIP_HEADER
     206  end
     207end
     208
     209# create a populated catdir with a set of cmf files, save the filenames in list for use by insert.exp
     210macro mkcatdir.dif
     211  if ($0 != 1)
     212    echo "mkcatdir.dif"
     213    break
     214  end
     215
     216  for i 0 $diffiles:n
     217    $negfile = $diffiles:$i
     218    strsub $negfile inv.cmf cmf -var posfile
     219    exec rm -f diff.list.txt
     220    output diff.list.txt
     221    echo $posfile
     222    echo $negfile
     223    output stdout
     224    echo addstar -D SKY_DEPTH 4 -D CATDIR $catdir_diff -D CATFORMAT PS1_V5 -D CAMERA gpc1 -update -list diff.list.txt -D ZERO_POINT_OPTION CHIP_HEADER -accept-astrom -D ZERO_POINT_KEYWORD FPA.ZP -diff-inv
     225    exec addstar -D SKY_DEPTH 4 -D CATDIR $catdir_diff -D CATFORMAT PS1_V5 -D CAMERA gpc1 -update -list diff.list.txt -D ZERO_POINT_OPTION CHIP_HEADER -accept-astrom -D ZERO_POINT_KEYWORD FPA.ZP -diff-inv
    204226    # echo addstar -D CAMERA gpc1 -D CATDIR $catdir -D CATFORMAT PS1_V5 $stkfile -update -quick-airmass -D ZERO_POINT_OPTION CHIP_HEADER
    205227  end
     
    380402
    381403  for i 0 $diffiles:n
    382     $filename = $diffiles:$i
    383     strlen $filename Nchar
    384     substr $filename 0 {$Nchar - 4} path_base; # the database needs the path without the extension (.smf/.cmf)
    385 
    386     $diffSkyfileID = `echo $filename | fields IMAGEID | prcol 2`
     404    $negfile = $diffiles:$i
     405    strsub $negfile inv.cmf cmf -var posfile
     406    strlen $posfile Nchar
     407    substr $posfile 0 {$Nchar - 4} path_base; # the database needs the path without the extension (.smf/.cmf)
     408
     409    $diffSkyfileID = `echo $posfile | fields IMAGEID | prcol 2`
    387410    $skycell = "skycell.1315.090"
    388     $filter  = `echo $filename | fields FPA.FILTERID | prcol 2`
    389     $mjd     = `echo $filename | fields MJD-OBS | prcol 2`
     411    $filter  = `echo $posfile | fields FPA.FILTERID | prcol 2`
     412    $mjd     = `echo $posfile | fields MJD-OBS | prcol 2`
    390413   
    391414    $wrpID = $i
Note: See TracChangeset for help on using the changeset viewer.