IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 38310


Ignore:
Timestamp:
May 23, 2015, 6:32:43 AM (11 years ago)
Author:
eugene
Message:

testing for relphot

Location:
branches/eam_branches/ipp-20150419/Ohana/src/addstar/test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20150419/Ohana/src/addstar/test

    • Property svn:ignore
      •  

        old new  
        1717relphot.Mcal.dMcal.png
        1818catdir.wise.test
         19dvo.photcodes
         20ptolemy.rc
         21tap.log
  • branches/eam_branches/ipp-20150419/Ohana/src/addstar/test/relphot.flatcorr.dvo

    r38309 r38310  
    2121if (not($?PLOT)) set PLOT = 0
    2222
    23 $USE_CELL_OFFSETS = 1; # turn on non-zero cell offsets
     23$USE_CELL_OFFSETS = 0; # turn on non-zero cell offsets
    2424$SET_UC_RESID = 1; # write a non-zero resid value to the ubercal table (should not have an impact)
    25 
     25$DO_2MASS = 0
     26$DO_SYNTH = 0
     27$DO_TYCHO = 0
    2628
    2729# set various global variables
     
    6870    echo "2011  2MASS_J              ref   0.000  0.000 0.000     -     - 0.0000     0     6   0.080 0.000 2.000  0.000   0x0000 0x0000  0x0000 0x0000"
    6971    echo "3001  SYNTH.g              ref   0.000  0.000 0.000     -     - 0.0000     0     1     nan 0.000 2.000  0.600   0x0000 0x0000  0x0000 0x0000"
     72    echo "2020  TYCHO_B              ref   0.000  0.000 0.000     -     - 0.0000     0     -   0.000 0.000 0.000  0.000   0x0000 0x0000  0x0000 0x0000"
    7073  output stdout     
    7174
     
    162165  mk2mass $fileroot $catdir
    163166  ck2mass addstar
    164 
     167 
    165168  mksynth $fileroot $catdir
    166169  cksynth addstar
     
    169172  mktycho $fileroot $catdir
    170173  cktycho addstar
    171   break
    172174
    173175  tapPLAN {((mjd_uc[]*4 + mjd_nc[]*4) + (mjd_uc[] + mjd_nc[]) + (mjd_uc[] + mjd_nc[])) / 3}
     
    192194
    193195  # run relphot on the db and check that the images now match the expected values
    194   tapEXEC relphot -images g,r -v -region 9.5 10.5 19.5 20.5 -D CATDIR $catdir -D STAR_TOOFEW 1 -D SIGMA_LIM 0.07 -statmode WT_MEAN -cloud-limit 0.5 -D IMAGE_OFFSET 0.5 -update
     196  tapEXEC relphot -images g,r -v -region 9.5 10.5 19.5 20.5 -D CATDIR $catdir -D STAR_TOOFEW 1 -D SIGMA_LIM 0.07 -statmode WT_MEAN -cloud-limit 0.5 -D IMAGE_OFFSET 0.5 -update -synthphot_zpts $fileroot.synthzpts.fits
    195197  for i 0 mjd_uc[]
    196198    ckexposure $catdir mjd_uc[$i] zpt_uc[$i] exptime_uc[$i] airmass_uc[$i] $filt_uc:$i relphot
     
    202204
    203205  tapDONE
     206end
     207
     208macro try.relphot
     209  # run relphot on the db and check that the images now match the expected values
     210  # tapEXEC relphot -images g,r -v -region 9.5 10.5 19.5 20.5 -D CATDIR $1 -D STAR_TOOFEW 1 -D SIGMA_LIM 0.07 -statmode WT_MEAN -cloud-limit 0.5 -D IMAGE_OFFSET 0.5 -update -synthphot_zpts $fileroot.synthzpts.fits
     211  tapEXEC relphot -images g,r -v -region 9.5 10.5 19.5 20.5 -D CATDIR $1 -D STAR_TOOFEW 1 -D SIGMA_LIM 0.07 -statmode WT_MEAN -cloud-limit 0.5 -D IMAGE_OFFSET 0.5 -update
     212  for i 0 mjd_uc[]
     213    ckexposure $1 mjd_uc[$i] zpt_uc[$i] exptime_uc[$i] airmass_uc[$i] $filt_uc:$i relphot
     214  end
     215  for i 0 mjd_nc[]
     216    ckexposure $1 mjd_nc[$i] zpt_nc[$i] exptime_nc[$i] airmass_nc[$i] $filt_nc:$i relphot
     217  end
    204218end
    205219
     
    281295    dev -n 1
    282296    lim mag dm; clear; box; plot mag dm; plot -c red -pt 7 mag dm where (photflags & 0x00000002)
     297    dev -n 2
     298    lim xccd dm; clear; box; plot xccd dm; plot -c red -pt 7 xccd dm where (photflags & 0x00000002)
     299    dev -n 3
     300    lim ra dm; clear; box; plot ra dm; plot -c red -pt 7 ra dm where (photflags & 0x00000002)
    283301    echo "red points are known bad photometry"
    284302  end
     
    357375    vstat -q dm_good
    358376    sprintf line "relphot     ZP %8.2f $FILTER %6.3f %6.3f %6.3f: %7.4f %7.4f : %3d" $MJD_IMAGE $ZPT_REAL $ZPT_REAL_NORM $ZPT_NOMINAL $MEAN $SIGMA dm_good[]
    359     tapOK {abs($MEAN) < 0.005} "$line"
     377    tapOK {abs($MEAN) < 0.001} "$line"
     378    tapOK {abs($SIGMA) < 0.001} "$line"
    360379
    361380    mextract ra dec dbflags
     
    558577  end
    559578
     579  if (not($DO_2MASS)) return
     580
    560581  local ROOT CATDIR
    561582
     
    580601    break
    581602  end
     603
     604  if (not($DO_2MASS)) return
    582605
    583606  if ("$1" == "addstar")
     
    612635  end
    613636
     637  if (not($DO_SYNTH)) return
     638
    614639  local ROOT CATDIR
    615640
     
    634659  end
    635660
     661  if (not($DO_SYNTH)) return
     662
    636663  if ("$1" == "addstar")
    637664    skyregion {$RA_CENTER - 0.2/dcos($DEC_CENTER)} {$RA_CENTER + 0.2/dcos($DEC_CENTER)} {$DEC_CENTER - 0.2} {$DEC_CENTER + 0.2}
     
    659686  end
    660687
     688  if (not($DO_TYCHO)) return
     689
    661690  local ROOT CATDIR
    662691
     
    672701  write $ROOT.tycho.dat -f "%10.6f %10.6f %6.3f %6.3f 0x%x" r_tycho d_tycho m_tycho dm_tycho fl_tycho
    673702
    674   tapEXEC addstar -ref $ROOT.tycho.dat -D CATDIR $CATDIR -D CAMERA gpc1 -quick-airmass -photcode TYCHO.g
    675 
    676   $KAPA = kapa -noX
     703  tapEXEC addstar -ref $ROOT.tycho.dat -D CATDIR $CATDIR -D CAMERA gpc1 -quick-airmass -photcode TYCHO_B
     704
     705  # $KAPA = kapa -noX
    677706  dev -n tmpdev
    678   section default -imtool none
     707  # resize 100 100
    679708  resize 50 50
    680709  region $RA_CENTER $DEC_CENTER 0.2
     710  section default -imtool none
     711  # causes trouble for this to come before region...
    681712  create tmp 0 1
    682713  cdensify tmpmap tmp tmp
    683714  set map = zero(tmpmap) + 0.2
    684   close
     715  # close
    685716  $KAPA = kapa
    686717
     
    701732  end
    702733
     734  if (not($DO_TYCHO)) return
     735
    703736  if ("$1" == "addstar")
    704737    skyregion {$RA_CENTER - 0.2/dcos($DEC_CENTER)} {$RA_CENTER + 0.2/dcos($DEC_CENTER)} {$DEC_CENTER - 0.2} {$DEC_CENTER + 0.2}
    705     mextract ra dec mag xccd yccd dbflags photflags where (photcode == 3001)
     738    mextract ra dec mag xccd yccd dbflags photflags where (photcode == 2020)
    706739    tapOK {ra[] == r_tycho[]} "read in as many tycho stars as we generated"
    707740   
     
    712745
    713746  if ("$1" == "relphot")
    714     subset rs = r_tycho if (m_tycho < 13.5)
    715     subset ds = d_tycho if (m_tycho < 13.5)
     747    subset rs = r_tycho if (m_tycho < 12)
     748    subset ds = d_tycho if (m_tycho < 12)
    716749    avmatch rs ds 0.1 g:flags
    717750    subset tmp = rs if (g:flags & 0x04); # tycho used for photometry
Note: See TracChangeset for help on using the changeset viewer.