IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30424


Ignore:
Timestamp:
Jan 28, 2011, 3:30:51 PM (15 years ago)
Author:
eugene
Message:

add / update psphot test suites

Location:
branches/eam_branches/ipp-20101205/psphot/test
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101205/psphot/test/tap_psphot_diff.pro

    r30271 r30424  
    9494
    9595  # XXX check for local reference db and run mkref if not found
     96  file catdir.ref found
     97  if (not($found))
     98    echo "make reference catalog"
     99    mkref
     100  end
    96101
    97102  local i base diff
     
    130135#   $command = $command  -F PSPHOT.OUTPUT PSPHOT.OUT.CMF.MEF
    131136#   $command = $command  -F PSPHOT.BACKMDL PSPHOT.BACKMDL.MEF -D PSPHOT:OUTPUT.FORMAT PS1_DV2
    132   $command = $command  -Db DUAL T -Db INVERSE T -convolve 1 -Di SPATIAL.ORDER $4
     137  $command = $command  -Db DUAL F -Db ADD.NOT.SUBTRACT T
     138  $command = $command  -Db INVERSE T -convolve 1 -Di SPATIAL.ORDER $4
    133139  $command = $command  -save-inconv -save-refconv
    134140  $command = $command  -threads 4
     
    164170  echo pswarp -threads 4 -astrom $basename.cmf -file $basename.ch.fits -mask $basename.ch.mk.fits -variance $basename.ch.wt.fits $basename.wrp refimage.fits
    165171  exec pswarp -threads 4 -astrom $basename.cmf -file $basename.ch.fits -mask $basename.ch.mk.fits -variance $basename.ch.wt.fits $basename.wrp refimage.fits -D PSPHOT:OUTPUT.FORMAT PS1_V2
     172end
     173
     174# compare chip to warp
     175macro ckwarp
     176  if ($0 != 5)
     177    echo "USAGE: ckwarp (raw) (out) (output) (Next)"
     178    break
     179  end
     180
     181  load.cmf $1 Chip.psf raw
     182  load.cmf $2 SkyChip.psf out
     183  set X_raw = int(X_PSF_raw) + 0.5
     184  set Y_raw = int(Y_PSF_raw) + 0.5
     185 
     186  # M_raw is the predicted mag based on the raw input mags (need to add the zero point)
     187 
     188  set M_raw = PSF_INST_MAG_raw - 2.5*log($4)
     189  set dM_raw = PSF_INST_MAG_SIG_raw / sqrt($4)
     190  set K_out = -2.5*log(KRON_FLUX_out)
     191  match2d X_PSF_out Y_PSF_out X_PSF_raw Y_PSF_raw 1.0 -index1 index1 -index2 index2
     192
     193  local i nx ny NX NY N
     194
     195  device -n compare
     196  resize 1000 1000
     197
     198  # plot trends as a function of mag
     199  $NX = 2
     200  $NY = 5
     201  $nx = 0
     202  $ny = 0
     203  $N = 0
     204  clear -s
     205
     206  for i 0 $pairs:n
     207    section a$nx\$ny {$nx/$NX} {$ny/$NY} {1/$NX} {1/$NY}
     208    show.pair $i
     209    $ny ++
     210    if ($ny == $NY)
     211      $ny = 0
     212      $nx ++
     213    end
     214    if ($nx == $NX)
     215      png -name $3.$N.png
     216      clear -s
     217      $nx = 0
     218      $ny = 0
     219      $N ++
     220    end
     221  end
     222end
     223
     224# compare two cmf files with extname Chip.psf
     225# things to compare:
     226# * completeness (which sources in (1) are not detected in (2)
     227# * positions (X_PSF, Y_PSF)
     228# * instrumental psf mags
     229# * position errors (no input errors; use a model?)
     230# * measured FWHM?
     231# * kron mags (fluxes)
     232# * etc, etc
     233macro ckchip
     234  if ($0 != 5)
     235    echo "USAGE: ckchip (raw) (out) (output) (zpt_off)"
     236    break
     237  end
     238
     239  load.cmf $1 Chip.psf raw
     240  load.cmf $2 Chip.psf out
     241
     242  # images generated with convolution will not have the right output positions
     243  set X_raw = int(X_PSF_raw) + 0.5
     244  set Y_raw = int(Y_PSF_raw) + 0.5
     245  set M_raw = PSF_INST_MAG_raw + $4
     246  set K_out = -2.5*log(KRON_FLUX_out)
     247  match2d X_PSF_out Y_PSF_out X_PSF_raw Y_PSF_raw 1.5 -index1 index1 -index2 index2
     248
     249  local i NX NY nx ny N
     250
     251  device -n compare
     252  resize 1000 1000
     253
     254  # plot trends as a function of mag
     255  $NX = 2
     256  $NY = 5
     257  $nx = 0
     258  $ny = 0
     259  $N = 0
     260  clear -s
     261  for i 0 $pairs:n
     262    section a$nx\$ny {$nx/$NX} {$ny/$NY} {1/$NX} {1/$NY}
     263    show.pair $i
     264    $ny ++
     265    if ($ny == $NY)
     266      $ny = 0
     267      $nx ++
     268    end
     269    if ($nx == $NX)
     270      png -name $3.$N.png
     271      clear -s
     272      $nx = 0
     273      $ny = 0
     274      $N ++
     275    end
     276  end
     277
     278  # plot (input - output) vs mag
    166279end
    167280
     
    250363  #PSF_INST_MAG_out      PSF_INST_MAG_raw      PSF_INST_MAG_raw 2 -1.01 1.01 V
    251364  PSF_INST_MAG_out      M_raw                 PSF_INST_MAG_raw 2 -1.01 1.01 V
    252   PSF_INST_MAG_SIG_out  PSF_INST_MAG_SIG_raw  PSF_INST_MAG_raw 2 -1.01 1.01 V
     365  PSF_INST_MAG_SIG_out  dM_raw                PSF_INST_MAG_raw 2 -1.01 1.01 V
    253366  #PSF_INST_FLUX_out     PSF_INST_FLUX_raw     PSF_INST_MAG_raw 2   def  def V
    254367  #PSF_INST_FLUX_SIG_out PSF_INST_FLUX_SIG_raw PSF_INST_MAG_raw 2   def  def V
  • branches/eam_branches/ipp-20101205/psphot/test/tap_psphot_diffsuite.pro

    r30312 r30424  
    154154  # $command = $command  -Db DUAL T -Db INVERSE T -convolve 1 -Df PENALTY 3000000 -Di SPATIAL.ORDER 1
    155155  # $command = $command  -Db DUAL T -Db INVERSE T -convolve 1 -Df PENALTY 3000000000 -Di SPATIAL.ORDER 1
     156  $command = $command -Di KERNEL.SIZE 5 -Di STAMP.FOOTPRINT 5
    156157
    157158  $command = $command  -save-inconv -save-refconv
Note: See TracChangeset for help on using the changeset viewer.