- Timestamp:
- Jun 14, 2013, 6:21:39 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20130509/psphot/test/tap_psphot_galaxies.pro
r35659 r35661 75 75 end 76 76 77 macro go 78 mkexp test.exp 1.0 EXP 79 fitexp test.exp test.exp.fit EXP_CONV 80 81 mkexp test.ser 1.0 SERSIC 82 fitexp test.ser test.ser.fit SER_CONV 83 84 mkexp test.dev 1.0 DEV 85 fitexp test.dev test.dev.fit DEV_CONV 86 87 mkexp test.gau 1.0 GAUSS 88 fitexp test.gau test.gau.fit GAU_CONV 89 90 mkexp test.pg 1.0 PGAUSS 91 fitexp test.pg test.pg.fit PGA_CONV 92 93 mkexp test.qga 1.0 QGAUSS 94 fitexp test.qga test.qga.fit QGA_CONV 95 96 mkexp test.p1 1.0 PS1_V1 97 fitexp test.p1 test.p1.fit PS1_CONV 98 end 99 100 macro go.ckgalaxy 101 foreach type exp ser dev gau pg qga p1 102 ckgalaxy test.$type.dat test.$type.fit.cmf 103 wait $type 104 end 105 end 106 77 107 # create a reference database of fake stars to be used by ppSim below 78 108 macro mkref … … 115 145 end 116 146 117 # compare two cmf files with extname Chip.psf 118 # things to compare: 119 # * completeness (which sources in (1) are not detected in (2) 120 # * positions (X_PSF, Y_PSF) 121 # * instrumental psf mags 122 # * position errors (no input errors; use a model?) 123 # * measured FWHM? 124 # * kron mags (fluxes) 125 # * etc, etc 147 # create a realistic distribution of fake stars, GAUSS PSF 148 macro fitexp 149 if ($0 != 4) 150 echo "USAGE: fitexp basename outname (fitModel)" 151 break 152 end 153 154 local basename fitModel outname 155 $basename = $1 156 $outname = $2 157 $fitModel = $3 158 159 $psphotConfig = 160 $psphotConfig = $psphotConfig -recipe PSPHOT GALAXY_TEST 161 $psphotConfig = $psphotConfig -threads 4 162 $psphotConfig = $psphotConfig -Db PSPHOT:LMM_FIT_CHISQ_CONVERGENCE F 163 $psphotConfig = $psphotConfig -Df PSPHOT:EXT_FIT_MIN_TOL 0.1 164 $psphotConfig = $psphotConfig -Di PSPHOT:LMM_FIT_GAIN_FACTOR_MODE 2 165 $psphotConfig = $psphotConfig -Db PSPHOT:SAVE.RESID T 166 $psphotConfig = $psphotConfig -D PSPHOT:EXTENDED_SOURCE_MODELS_SELECTION $fitModel 167 168 # ppImage / psphot on the output 169 echo ppImage $ppImageConfig $psphotConfig -file $basename.fits $outname 170 exec ppImage $ppImageConfig $psphotConfig -file $basename.fits $outname 171 end 172 126 173 macro ckchip 127 174 if ($0 != 5) … … 173 220 174 221 macro ckgalaxy 175 176 data test.exp.dat 222 if ($0 != 3) 223 echo "USAGE: ckgalaxy (dat) (cmf)" 224 break 225 end 226 227 data $1 177 228 read Xin_all 1 Yin_all 2 Type 4 Min_all 5 RmajIn_all 7 RminIn_all 8 ThetaIn_all 9 178 229 … … 185 236 subset RminIn = RminIn_all if (Type == 1) 186 237 187 data test.exp2.cmf238 data $2 188 239 read -fits Chip.xfit X_EXT Y_EXT EXT_INST_MAG EXT_WIDTH_MAJ EXT_WIDTH_MIN EXT_THETA 189 240 set EXT_THETA_ALT = EXT_THETA * (EXT_THETA >= 0.0) + (EXT_THETA + 3.14159265) * (EXT_THETA < 0.0) … … 200 251 set dX = Xin_m - Xot_m 201 252 set dY = Yin_m - Yot_m 202 lim -n 0 dX dY; clear; box; plot dX dY253 # lim -n 0 dX dY; clear; box; plot dX dY 203 254 204 255 reindex Mot_m = EXT_INST_MAG using index1 … … 218 269 set dM = Min_m - Mot_m 219 270 set dT = (Tin_m - Tot_m) * 180 / 3.14159265 271 set Tin_deg = Tin_m * 180 / 3.14159265 272 273 lim -n 0 Tin_deg -5 5; clear; box; plot Tin_deg dT; label -y "delta theta (deg)" 220 274 lim -n 1 n dM; clear; box; plot n dM; label -y "delta mag" 221 lim -n 2 n dT; clear; box; plot n dT; label -y "delta theta (deg)"222 lim -n 3 dTdM; clear; box; plot dT dM; label -x "delta theta (deg)" -y "delta mag"275 lim -n 2 n -5 5; clear; box; plot n dT; label -y "delta theta (deg)" 276 lim -n 3 -5 5 dM; clear; box; plot dT dM; label -x "delta theta (deg)" -y "delta mag" 223 277 224 278 set dR = Rin_m - Rot_m
Note:
See TracChangeset
for help on using the changeset viewer.
