Commit 042b26c1 authored by Fang Yuedong's avatar Fang Yuedong
Browse files

move shear before convolve psf

parents 7e5ae118 63ca249f
Loading
Loading
Loading
Loading
−6 KiB

File deleted.

+6 −7
Original line number Diff line number Diff line
@@ -144,6 +144,11 @@ class Galaxy(MockObject):
        ###bulge_shape = galsim.Shear(g1=self.e1_bulge, g2=self.e2_bulge)
        ###bulge = bulge.shear(bulge_shape)

        if fd_shear:
            g1 += fd_shear.g1
            g2 += fd_shear.g2
        gal_shear = galsim.Shear(g1=g1, g2=g2)

        for i in range(len(bandpass_list)):
            bandpass = bandpass_list[i]

@@ -175,6 +180,7 @@ class Galaxy(MockObject):
            # bulge = bulge.shear(bulge_shape)
            
            gal_temp = self.bfrac * bulge + (1.0 - self.bfrac) * disk
            gal_temp = gal_temp.shear(gal_shear)

            gal_temp = gal_temp.withFlux(nphotons)
            if not big_galaxy: # Not apply PSF for very big galaxy
@@ -218,13 +224,6 @@ class Galaxy(MockObject):
        # top_stats = snapshot.statistics('lineno')
        # for stat in top_stats[:10]:
        #     print(stat)
        if fd_shear:
            g1 += fd_shear.g1
            g2 += fd_shear.g2
        gal_shear = galsim.Shear(g1=g1, g2=g2)
        gal = gal.shear(gal_shear)
        # if fd_shear is not None:
        #     gal = gal.shear(fd_shear)

        stamp = gal.drawImage(wcs=real_wcs_local, method='phot', offset=offset, save_photons=True)
        photons = stamp.photons
−232 KiB

File deleted.

−368 KiB

File deleted.

Loading