IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 1, 2019, 11:52:08 AM (7 years ago)
Author:
eugene
Message:

adding figures for galaxy fitting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/release.2015/ps1.analysis/examples/moments.sh

    r40693 r40705  
    151151  rotate fr 2
    152152end
     153
     154
     155macro test.convolve
     156  if ($0 != 2)
     157    echo "USAGE: show.smear (sigma)"
     158    break
     159  end
     160
     161  mcreate z 512 512
     162  set x = xramp(z) - z[][0]/2
     163  set y = yramp(z) - z[0][]/2
     164
     165  # convolve psf (oriented along yy axis) with object (rotating)
     166  # object 1:
     167  set f0 = exp(-0.5*((x/2)^2 + (y/10)^2))
     168
     169  set psf_r = exp(-0.5*((x/2)^2 + (y/6)^2))
     170  rotate psf_r 30.0
     171  extract psf_r psf {psf_r[][0]/2 - 256} {psf_r[0][]/2 - 256} 512 512 0 0 512 512
     172
     173  # set psf = exp(-0.5*((x/2)^2 + (y/6)^2))
     174  star -q psf {psf[][0]/2} {psf[0][]/2} 128
     175  $Mxx_p = ($SXg/2.355)^2
     176  $Myy_p = ($SYg/2.355)^2
     177  $Mxy_p = $SXYg
     178
     179  delete -q e1_s e2_s e1_o e2_o theta Mxx_s Mxy_s Myy_s Mxx_o Mxy_o Myy_o
     180  for rot 0 360 5
     181    set fr = f0
     182    rotate fr $rot
     183    concat $rot theta
     184
     185    delete -q frs
     186    extract fr frs {fr[][0]/2 - 256} {fr[0][]/2 - 256} 512 512 0 0 512 512
     187
     188    imconvolve frs psf fs
     189
     190    star -q fs {fs[][0]/2} {fs[0][]/2} 128
     191
     192    $Mxx = ($SXg/2.355)^2
     193    $Myy = ($SYg/2.355)^2
     194    $Mxy = $SXYg
     195
     196    concat $Mxx Mxx_s
     197    concat $Mxy Mxy_s
     198    concat $Myy Myy_s
     199
     200    # fr is the rotated version of f0
     201    star -q fr {fr[][0]/2} {fr[0][]/2} 128
     202
     203    $Mxx = ($SXg/2.355)^2
     204    $Myy = ($SYg/2.355)^2
     205    $Mxy = $SXYg
     206
     207    concat $Mxx Mxx_o
     208    concat $Mxy Mxy_o
     209    concat $Myy Myy_o
     210  end
     211end
Note: See TracChangeset for help on using the changeset viewer.