IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30229


Ignore:
Timestamp:
Jan 9, 2011, 12:47:04 PM (15 years ago)
Author:
eugene
Message:

check completeness of a stack (different EXTNAME and zero point)

File:
1 edited

Legend:

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

    r30223 r30229  
    216216 set ldmag = log(PSF_INST_MAG_SIG_raw)
    217217 section overlay 0 0 1 1; lim dMag -5 1.2; box -ypad 5 +ypad 5 -ticks 1011 -labels 1001; plot PSF_INST_MAG_raw ldmag
     218 label +y log(S/N)
     219
     220 line -c red -20 {log(1/25.0)} to 20 {log(1/25.0)}
     221 line -c blue -20 {log(1/5.0)} to 20 {log(1/5.0)}
     222
     223 png -name $3
     224end
     225
     226macro completestack
     227 if ($0 != 6)
     228   echo "USAGE: completeness (raw) (out) (output) (radius) (zeropt)"
     229   break
     230 end
     231
     232 load.cmf $1 Chip.psf raw
     233 load.cmf $2 SkyChip.psf out
     234 set X_raw = int(X_PSF_raw) + 0.5
     235 set Y_raw = int(Y_PSF_raw) + 0.5
     236 set Mraw = PSF_INST_MAG_raw + $5
     237 match2d X_PSF_raw Y_PSF_raw X_PSF_out Y_PSF_out $4 -index1 index1 -index2 index2 -closest
     238
     239 histogram Mraw nMag -16.0 -3.0 0.25 -range dMag
     240 set fMag = zero(dMag)
     241 for i 0 {dMag[]-1}
     242  set inrange = (Mraw > dMag[$i]) && (Mraw <= dMag[$i+1])
     243  subset all = index1 if (inrange)
     244  subset got = index1 if (inrange) && (index1 >= 0)
     245  if (all[] == 0)
     246    fMag[$i] = 0
     247  else
     248   fMag[$i] = got[] / all[]
     249  end
     250 end
     251
     252 device -n complete
     253 resize 1000 600
     254
     255 clear -s
     256
     257 section default 0 0 1 1
     258 lim dMag fMag; clear; box -ypad 5 +ypad 5 -ticks 1110; plot -x 1 dMag fMag
     259 label -x mag_inst -y det_frac
     260
     261 set found = (index1 >= 0)
     262 plot Mraw found -c red
     263
     264 set ldmag = log(PSF_INST_MAG_SIG_raw)
     265 section overlay 0 0 1 1; lim dMag -5 1.2; box -ypad 5 +ypad 5 -ticks 1011 -labels 1001; plot Mraw ldmag
    218266 label +y log(S/N)
    219267
Note: See TracChangeset for help on using the changeset viewer.