IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33139


Ignore:
Timestamp:
Jan 24, 2012, 9:44:39 AM (14 years ago)
Author:
eugene
Message:

more updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/Ohana/src/addstar/test/relphot.flatcorr.dvo

    r33138 r33139  
    8585
    8686macro ckexposure
     87  if ($0 != 3)
     88    echo "ckexposure (catdir) (zpt)"
     89    break
     90  end
     91
     92  local ZPT_REAL ZPT_NOMINAL
     93 
     94  $ZPT_REAL = $2
     95  $ZPT_NOMINAL = 24.58
     96  # XXX need a function to extract the nominal zpt for a given filter / photcode
    8797
    8898  # assume we still have stars_ra, stars_dec, stars_mag in hand
    89   catdir catdir.test
     99  catdir $1
    90100  region $RA_CENTER $DEC_CENTER 0.2
    91101  images
    92102  pmeasure -all -m 15 20
    93   mextract -region ra dec mag
     103  mextract -region ra dec mag xccd yccd
    94104 
    95105  match2d -closest ra dec stars_ra stars_dec 0.001 -index1 index1 -index2 index2
    96106
    97   reindex stars_ra_m = stars_ra using index1
     107  reindex stars_ra_m  = stars_ra using index1
    98108  reindex stars_dec_m = stars_dec using index1
    99109  reindex stars_mag_m = stars_mag using index1
     
    102112  set dm = mag - stars_mag_m
    103113  lim mag dm; clear; box; plot mag dm
     114
     115  set cell_xbin = int(xccd / ($CHIP_DX / $NCELL_X))
     116  set cell_ybin = int(yccd / ($CHIP_DY / $NCELL_Y))
     117  subset dm00 = dm if (cell_xbin == 0) && (cell_ybin == 0)
     118  subset dm01 = dm if (cell_xbin == 0) && (cell_ybin == 1)
     119  subset dm10 = dm if (cell_xbin == 1) && (cell_ybin == 0)
     120  subset dm11 = dm if (cell_xbin == 1) && (cell_ybin == 1)
     121
     122  # mag_DVO  = m_inst + zpt_nominal
     123  # mag_real = m_inst + zpt_real + cell_offset
     124  # dm = mag_DVO - mag_real = zpt_nominal - zpt_real - cell_offset
     125  # <dm> - zpt_nominal + zpt_real + cell_offset ~ 0.0
     126  # zpt_real (in this case) = 25.0 (actually, it is the value in the vector 'zpt' for this entry
     127  # zpt_nominal = 24.58
     128  for ix 0 $NCELL_X
     129    for iy 0 $NCELL_Y
     130      # vstat -q dm$ix\$iy
     131      # echo cell_off[$ix][$iy] {$MEDIAN - $ZPT_NOMINAL + $ZPT_REAL + cell_off[$ix][$iy]} $MEDIAN $MEAN $SIGMA
     132
     133      set dm_adjust = dm$ix\$iy - $ZPT_NOMINAL + $ZPT_REAL + cell_off[$ix][$iy]
     134      vstat dm_adjust
     135    end
     136  end
    104137end
    105138
     
    154187    echo mkcmf test.in.txt $ROOT.$ix.$iy.cmf -mjd $MJD -radec $ra $dec -type PS1_V2 -coords -photcode GPC1.$FILTER.XY$ix\$iy -no-noise -size $CHIP_DX $CHIP_DY -crpix {0.5*$CHIP_DX} {0.5*$CHIP_DY}
    155188   
    156     exec addstar $ROOT.$ix.$iy.cmf -D CATDIR $7 -D CAMERA gpc1
     189    # the fake images have inconsistent ra,dec and airmass,sidtime values
     190    exec addstar $ROOT.$ix.$iy.cmf -D CATDIR $7 -D CAMERA gpc1 -quick-airmass
    157191  end
    158192 end
     
    224258  keyword phu NFILTER -wd $NFILTER
    225259  keyword phu NCHIP_X -wd $NCHIP_X
    226   keyword phu NCHIP_y -wd $NCHIP_Y
     260  keyword phu NCHIP_Y -wd $NCHIP_Y
    227261  keyword phu NCELL_X -wd $NCELL_X
    228262  keyword phu NCELL_Y -wd $NCELL_Y
Note: See TracChangeset for help on using the changeset viewer.