- Timestamp:
- May 25, 2015, 12:43:23 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20150419/Ohana/src/addstar/test/relphot.flatcorr.dvo
r38315 r38318 21 21 if (not($?PLOT)) set PLOT = 0 22 22 23 $USE_CELL_OFFSETS = 0; # turn on non-zero cell offsets23 $USE_CELL_OFFSETS = 1; # turn on non-zero cell offsets 24 24 $SET_UC_RESID = 1; # write a non-zero resid value to the ubercal table (should not have an impact) 25 $DO_2MASS = 026 $DO_SYNTH = 027 $DO_TYCHO = 025 $DO_2MASS = 1 26 $DO_SYNTH = 1 27 $DO_TYCHO = 1 28 28 $NC_CLOUDS = 0.08 29 29 $UC_CLOUDS = 0.02 … … 196 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 197 197 for i 0 mjd_uc[] 198 ckexposure $catdir mjd_uc[$i] zpt_uc[$i] exptime_uc[$i] airmass_uc[$i] $filt_uc:$i relphot 198 ckexposure $catdir mjd_uc[$i] zpt_uc[$i] exptime_uc[$i] airmass_uc[$i] $filt_uc:$i relphot_uc 199 199 end 200 200 for i 0 mjd_nc[] 201 ckexposure $catdir mjd_nc[$i] zpt_nc[$i] exptime_nc[$i] airmass_nc[$i] $filt_nc:$i relphot 201 ckexposure $catdir mjd_nc[$i] zpt_nc[$i] exptime_nc[$i] airmass_nc[$i] $filt_nc:$i relphot_nc 202 202 end 203 203 ck2mass relphot 204 cksynth relphot 205 cktycho relphot 204 206 205 207 tapDONE … … 207 209 208 210 macro try.relphot 211 if ($0 != 3) 212 echo "go (fileroot) (catdir)" 213 break 214 end 215 216 local i fileroot rootdir catdir 217 218 $fileroot = $1 219 $catdir = $2 220 209 221 # 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.fits211 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 222 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 -nloop 24 223 212 224 for i 0 mjd_uc[] 213 ckexposure $1 mjd_uc[$i] zpt_uc[$i] exptime_uc[$i] airmass_uc[$i] $filt_uc:$i relphot 225 # ckexposure $catdir mjd_uc[$i] zpt_uc[$i] exptime_uc[$i] airmass_uc[$i] $filt_uc:$i relphot_uc 226 ckexposure $catdir mjd_uc[$i] zpt_uc[$i] exptime_uc[$i] airmass_uc[$i] $filt_uc:$i relphot_uc 214 227 end 215 228 for i 0 mjd_nc[] 216 ckexposure $1 mjd_nc[$i] zpt_nc[$i] exptime_nc[$i] airmass_nc[$i] $filt_nc:$i relphot 229 # ckexposure $catdir mjd_nc[$i] zpt_nc[$i] exptime_nc[$i] airmass_nc[$i] $filt_nc:$i relphot_nc 230 ckexposure $catdir mjd_nc[$i] zpt_nc[$i] exptime_nc[$i] airmass_nc[$i] $filt_nc:$i relphot_nc 217 231 end 218 232 end … … 256 270 $AIRMASS = $5 257 271 $FILTER = $6 258 $ MODE= $7272 $FUNC_MODE = $7 259 273 260 274 # XXX need a function to extract the nominal zpt for a given filter / photcode from the db … … 325 339 $ZPT_REAL_NORM = $ZPT_REAL - 2.5*log($EXPTIME) - $KLAM_NOMINAL*($AIRMASS - 1.0) 326 340 327 if ("$ MODE" == "raw")341 if ("$FUNC_MODE" == "raw") 328 342 for ix 0 $NCELL_X 329 343 for iy 0 $NCELL_Y … … 342 356 end 343 357 344 if ("$ MODE" == "setphot_uc")358 if ("$FUNC_MODE" == "setphot_uc") 345 359 vstat -q dm_good 346 360 sprintf line "setphot_uc 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[] … … 357 371 end 358 372 359 if ("$ MODE" == "setphot_nc")373 if ("$FUNC_MODE" == "setphot_nc") 360 374 vstat -q dm_good 361 375 sprintf line "setphot_nc 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[] … … 372 386 end 373 387 374 if ( "$MODE" == "relphot")388 if (("$FUNC_MODE" == "relphot_uc") || ("$FUNC_MODE" == "relphot_nc")) 375 389 vstat -q dm_good 376 390 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[] 377 tapOK {abs($MEAN) < 0.001} "$line" 378 tapOK {abs($SIGMA) < 0.001} "$line" 391 392 if ("$FUNC_MODE" == "relphot_uc") 393 tapOK {abs($MEAN) < 0.001} "$line" 394 tapOK {abs($SIGMA) < 0.001} "$line" 395 end 396 if ("$FUNC_MODE" == "relphot_nc") 397 # XXX NOTE relaxed condition : bad photometry points are partly clipped but still cause a bias 398 tapOK {abs($MEAN) < 0.020} "$line" 399 tapOK {abs($SIGMA) < 0.020} "$line" 400 end 379 401 380 402 mextract ra dec dbflags … … 390 412 return 391 413 end 414 415 echo "ERROR: unknown mode for ckexposure : $FUNC_MODE" 392 416 393 417 end … … 704 728 tapEXEC addstar -ref $ROOT.tycho.dat -D CATDIR $CATDIR -D CAMERA gpc1 -quick-airmass -photcode TYCHO_B 705 729 706 #$KAPA = kapa -noX730 $KAPA = kapa -noX 707 731 dev -n tmpdev 708 732 # resize 100 100 … … 714 738 cdensify tmpmap tmp tmp 715 739 set map = zero(tmpmap) + 0.2 716 #close740 close 717 741 $KAPA = kapa 718 742 … … 746 770 747 771 if ("$1" == "relphot") 748 subset rs = r_tycho if (m_tycho < 12) 749 subset ds = d_tycho if (m_tycho < 12) 750 avmatch rs ds 0.1 g:flags 751 subset tmp = rs if (g:flags & 0x04); # tycho used for photometry 752 tapOK {tmp[] == rs[]} "tycho objects used for photometry properly marked" 772 subset rst = r_tycho if (m_tycho < 12) 773 subset dst = d_tycho if (m_tycho < 12) 774 # XXX : should not restrict to 'g' 775 avmatch rst dst 0.1 g:flags 776 subset tmp = rst if (g:flags & 0x40); # tycho used for photometry 777 tapOK {tmp[] == rst[]} "tycho objects used for photometry properly marked" 778 779 # non-tycho stars with synth phot should be repaired 780 subset rsn = r_synth if (m_synth > 12) && (m_synth < 13.5) 781 subset dsn = d_synth if (m_synth > 12) && (m_synth < 13.5) 782 # XXX : should not restrict to 'g' 783 avmatch rsn dsn 0.1 g:flags 784 subset tmp = rsn if (g:flags & 0x80); # synth photometry repaired 785 tapOK {tmp[] == rsn[]} "tycho objects used for photometry properly marked" 753 786 end 754 787 end
Note:
See TracChangeset
for help on using the changeset viewer.
