IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 26, 2013, 8:29:11 PM (13 years ago)
Author:
eugene
Message:

add run.convolve.loop

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130904/psphot/test/tap_psphot_galaxygrid.pro

    r36315 r36316  
    8686end
    8787
     88if (not($?CONVOLVE_NSIGMA)) set CONVOLVE_NSIGMA = 5.0
    8889
    8990# generate fake images and run psphot on them
     
    117118  $FakeConfig = $FakeConfig -Df GALAXY.INDEX.MIN 1.0
    118119  $FakeConfig = $FakeConfig -Df GALAXY.INDEX.MAX 1.0
     120  $FakeConfig = $FakeConfig -Df CONVOLVE.NSIGMA $CONVOLVE_NSIGMA
    119121  $BaseConfig = $FakeConfig
    120122
     
    582584end
    583585
     586if (not($?NSIGMA_CONV)) set NSIGMA_CONV = 5.0
     587
    584588# create a realistic distribution of fake stars, GAUSS PSF
    585589macro fitexp
     
    607611  $psphotConfig = $psphotConfig -Db PSPHOT:POISSON.ERRORS.PHOT.LMM F
    608612  $psphotConfig = $psphotConfig -Db PSPHOT:EXTENDED_SOURCE_FITS_POISSON F
    609    $psphotConfig = $psphotConfig -Di PSPHOT:EXT_FIT_ITER 40
     613  $psphotConfig = $psphotConfig -Di PSPHOT:EXT_FIT_ITER 20
     614  $psphotConfig = $psphotConfig -Df PSPHOT:PSF_FIT_RADIUS_SCALE 3.75
     615  $psphotConfig = $psphotConfig -Df PSPHOT:EXT_FIT_NSIGMA_CONV $NSIGMA_CONV
    610616
    611617  # ppImage / psphot on the output
     
    13401346  echo $mag_off $rad_off
    13411347end
     1348
     1349macro make.circles
     1350
     1351  delete Xo Yo Ro
     1352
     1353  for ix 0 16
     1354    for iy $ix 16
     1355      $r2 = $ix^2 + $iy^2
     1356      if ($r2 > 15^2) continue
     1357      concat $ix Xo
     1358      concat $iy Yo
     1359      concat $r2 Ro
     1360    end
     1361  end
     1362
     1363  sort Ro Xo Yo
     1364  $Rold = -1
     1365  $N = -1
     1366  for i 0 Ro[]
     1367    if (Ro[$i] != $Rold)
     1368      $N ++
     1369      $Rold = Ro[$i]
     1370    end
     1371    if ((Xo[$i] == 0) && (Yo[$i] == 0))
     1372      fprintf "// center is 0,0"
     1373      continue
     1374    end
     1375    if (Xo[$i] == 0)
     1376      fprintf "ADD_AXIS (%3d, %2d)     // r^2 = %3d" $N Yo[$i] Ro[$i]
     1377      continue
     1378    end
     1379    if (Xo[$i] == Yo[$i])
     1380      fprintf "ADD_DIAG (%3d, %2d)     // r^2 = %3d" $N Xo[$i] Ro[$i]
     1381      continue
     1382    end
     1383
     1384    fprintf "ADD_RAND (%3d, %2d, %2d) // r^2 = %3d" $N Xo[$i] Yo[$i] Ro[$i]
     1385 end
     1386end
     1387
     1388macro run.convolve.loop
     1389  local radius
     1390
     1391  $radius = 3.0
     1392
     1393  foreach Cin 3 5 7 9 11
     1394    $CONVOLVE_NSIGMA = $Cin
     1395    sprintf nameIn tests.20131120/test.nsig.%02d $Cin
     1396    mkexp.devexp.single $nameIn EXP $radius 1.0
     1397    foreach Cot 3 5 7 9 11
     1398      $NSIGMA_CONV = $Cot
     1399      sprintf nameOt tests.20131120/test.nsig.%02d.%02d $Cin $Cot
     1400      fitexp $nameIn $nameOt EXP_CONV
     1401    end
     1402  end
     1403
     1404  foreach Cin 3 5 7 9 11
     1405    sprintf nameIn tests.20131120/test.nsig.%02d $Cin
     1406    foreach Cot 3 5 7 9 11
     1407      sprintf nameOt tests.20131120/test.nsig.%02d.%02d $Cin $Cot
     1408      check.fit $nameIn.dat $nameOt.cmf
     1409    end
     1410  end
     1411  grid.plots.devexp a
     1412end
     1413
Note: See TracChangeset for help on using the changeset viewer.