IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35650


Ignore:
Timestamp:
Jun 11, 2013, 9:27:18 AM (13 years ago)
Author:
eugene
Message:

new tap script to test galaxy fitting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130509/psphot/test/tap_psphot_galaxies.pro

    r35641 r35650  
    1313
    1414# basic options for the these images (filter, location, obstype)
    15 $BaseOptions = -type OBJECT -filter r -skymags 20.86 -ra 270.70 -dec -23.70 -pa 0.0
    16 $BaseOptions = $BaseOptions -Df PSASTRO:DVO.GETSTAR.MAX.RHO 50000.0
     15$BaseOptions = -type OBJECT
     16$BaseOptions = $BaseOptions -filter r
     17$BaseOptions = $BaseOptions -skymags 20.86
     18$BaseOptions = $BaseOptions -ra 270.70
     19$BaseOptions = $BaseOptions -dec -23.70
     20$BaseOptions = $BaseOptions -pa 0.0
     21# $BaseOptions = $BaseOptions -Df PSASTRO:DVO.GETSTAR.MAX.RHO 50000.0
    1722
    1823# options for the reference image
    19 $RefOptions = $BaseOptions -exptime 100.0 -seeing 1.0 -D PSF.MODEL PS_MODEL_GAUSS -Df STARS.DENSITY 10.0 -Df STARS.SIGMA.LIM 0.5
    20 
    21 # options for the repeated images
    22 $FakeOptions = $BaseOptions -exptime 30.0
     24$RefOptions = $BaseOptions
     25$RefOptions = $RefOptions -exptime 100.0
     26$RefOptions = $RefOptions -seeing 1.0
     27$RefOptions = $RefOptions -D PSF.MODEL PS_MODEL_GAUSS
     28$RefOptions = $RefOptions -Df STARS.DENSITY 10.0
     29$RefOptions = $RefOptions -Df STARS.SIGMA.LIM 0.5
     30
     31# options for the simulated images (using the refimage for the stars)
     32$FakeOptions = $BaseOptions
     33$FakeOptions = $FakeOptions -exptime 30.0
     34$FakeOptions = $FakeOptions -D PSF.MODEL PS_MODEL_GAUSS
    2335 
     36# sample alternate options:
     37# $FakeOptions = $FakeOptions -D PSF.MODEL PS_MODEL_PS1_V1
     38# $FakeOptions = $FakeOptions -Df PSF.ARATIO 1.2
     39# $FakeOptions = $FakeOptions -Df PSF.THETA +30.0
     40
     41# create an image with fake sources (these are then inserted into the catdir)
     42$RefConfig = -camera SIMTEST
     43$RefConfig = $RefConfig -recipe PPSIM STACKTEST.MAKE
     44
    2445# basic config for ppSim with randomly distributed stars and gridded galaxies
    25 $RealConfig = -camera SIMTEST -recipe PPSIM STACKTEST.RUN -D PSASTRO:PSASTRO.CATDIR catdir.ref
    26 $RealConfig = $RealConfig -Db STARS.FAKE F -Db MATCH.DENSITY F -Db PSF.CONVOLVE T
    27 $RealConfig = $RealConfig -Db GALAXY.FAKE T -Df GALAXY.MAG 17.0
    28 $RealConfig = $RealConfig -Db GALAXY.GRID T -D GALAXY.MODEL PS_MODEL_SERSIC
    29 $RealConfig = $RealConfig -Df GALAXY.ARATIO.MIN 0.5
    30 $RealConfig = $RealConfig -Df GALAXY.ARATIO.MAX 0.5
    31 $RealConfig = $RealConfig -Df GALAXY.THETA.MAX 180
    32 $RealConfig = $RealConfig -Df GALAXY.INDEX.MIN 1
    33 $RealConfig = $RealConfig -Df GALAXY.INDEX.MAX 1
    34 $RealConfig = $RealConfig -Di GALAXY.GRID.DX 120
    35 $RealConfig = $RealConfig -Di GALAXY.GRID.DY 120
    36 
    37 # sample alternate options:
    38 # $ppSimOptions = $FakeOptions -D PSF.MODEL PS_MODEL_PS1_V1
    39 # $ppSimOptions = $FakeOptions -Df PSF.ARATIO 1.2
    40 # $ppSimOptions = $FakeOptions -Df PSF.THETA +30.0
    41 $ppSimOptions = $FakeOptions -D PSF.MODEL PS_MODEL_GAUSS
     46$FakeConfig = -camera SIMTEST
     47$FakeConfig = $FakeConfig -recipe PPSIM STACKTEST.RUN
     48$FakeConfig = $FakeConfig -D PSASTRO:PSASTRO.CATDIR catdir.ref
     49$FakeConfig = $FakeConfig -Db STARS.FAKE F                         ; # only use stars from catdir.ref
     50$FakeConfig = $FakeConfig -Db MATCH.DENSITY F
     51$FakeConfig = $FakeConfig -Db PSF.CONVOLVE T
     52$FakeConfig = $FakeConfig -Db GALAXY.FAKE T                        ; # generate a "realistic" distribution of galaxies
     53$FakeConfig = $FakeConfig -Df GALAXY.MAG 17.0
     54$FakeConfig = $FakeConfig -Db GALAXY.GRID T                        ; # generate a grid of galaxies (constant mag)
     55#$FakeConfig = $FakeConfig -D GALAXY.MODEL PS_MODEL_GAUSS
     56$FakeConfig = $FakeConfig -D GALAXY.MODEL PS_MODEL_EXP
     57#$FakeConfig = $FakeConfig -D GALAXY.MODEL PS_MODEL_SERSIC
     58#$FakeConfig = $FakeConfig -D GALAXY.MODEL PS_MODEL_DEV
     59$FakeConfig = $FakeConfig -Df GALAXY.RMAJOR.MIN 10.0
     60$FakeConfig = $FakeConfig -Df GALAXY.RMAJOR.MAX 10.0
     61$FakeConfig = $FakeConfig -Df GALAXY.ARATIO.MIN 0.5
     62$FakeConfig = $FakeConfig -Df GALAXY.ARATIO.MAX 0.5
     63$FakeConfig = $FakeConfig -Df GALAXY.THETA.MIN 0
     64$FakeConfig = $FakeConfig -Df GALAXY.THETA.MAX 180
     65$FakeConfig = $FakeConfig -Df GALAXY.INDEX.MIN 1
     66$FakeConfig = $FakeConfig -Df GALAXY.INDEX.MAX 1
     67$FakeConfig = $FakeConfig -Di GALAXY.GRID.DX 120
     68$FakeConfig = $FakeConfig -Di GALAXY.GRID.DY 120
    4269
    4370list fwhm
     
    5380  exec rm -f refimage.fits
    5481 
    55   # create an image with fake sources and insert the resulting cmf file into a dvodb
    56   $RefConfig = -camera SIMTEST -recipe PPSIM STACKTEST.MAKE -D PSASTRO:PSASTRO.CATDIR catdir.ref
    57 
     82  echo ppSim $RefOptions $RefConfig refimage
    5883  exec ppSim $RefOptions $RefConfig refimage
    5984 
     
    6489  end
    6590
    66   exec addstar -D CAMERA simtest -D CATDIR catdir.ref -accept-astrom -photcode SYNTH.r -D PHOTCODE_FILE synth.photcodes refimage.cmf
     91  exec addstar -D CAMERA simtest -D CATDIR catdir.ref -accept-astrom -photcode SYNTH.r -D PHOTCODE_FILE synth.photcodes refimage.cmf -quick-airmass
    6792  exec relphot -averages -D CATDIR catdir.ref -update -region 260 280 -33 -13
    6893end
     
    80105
    81106  # create the raw image
    82   echo ppSim $ppSimOptions $RealConfig $basename -seeing $fwhm
    83   exec ppSim $ppSimOptions $RealConfig $basename -seeing $fwhm
     107  echo ppSim $FakeOptions $FakeConfig $basename -seeing $fwhm
     108  exec ppSim $FakeOptions $FakeConfig $basename -seeing $fwhm
    84109  exec /bin/mv -f $basename.cmf $basename.in.cmf
    85110
    86111  # create the chip output
    87   echo ppImage $ppImageConfig -file $basename.fits $basename
    88   exec ppImage $ppImageConfig -file $basename.fits $basename
    89 
    90   # XXX pswarp is using all 7k+ sources to measure the PSF : can we reduce this?
    91   ## 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
    92   ## 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
    93   ##
    94   ## echo psphot -file $basename.wrp.fits -mask $basename.wrp.mask.fits -variance $basename.wrp.wt.fits  $basename.wrp.pht
    95   ## exec psphot -file $basename.wrp.fits -mask $basename.wrp.mask.fits -variance $basename.wrp.wt.fits  $basename.wrp.pht
     112  #echo ppImage $ppImageConfig -file $basename.fits $basename
     113  #exec ppImage $ppImageConfig -file $basename.fits $basename
    96114end
    97115
Note: See TracChangeset for help on using the changeset viewer.