Commit e9638802 authored by Fang Yuedong's avatar Fang Yuedong
Browse files

add random knots to gaalxy model

parent 40121255
......@@ -131,12 +131,12 @@ class Galaxy(MockObject):
bulge_shape = galsim.Shear(g1=self.e1_bulge, g2=self.e2_bulge)
bulge = bulge.shear(bulge_shape)
gal = self.bfrac * bulge + (1.0 - self.bfrac) * disk
# gal = self.bfrac * bulge + (1.0 - self.bfrac) * disk
# # (TEST) Random knots
# knots = galsim.RandomKnots(npoints=100, profile=disk)
# kfrac = np.random.random()*(1.0 - self.bfrac)
# gal = self.bfrac * bulge + (1.0 - self.bfrac - kfrac) * disk + kfrac * knots
knots = galsim.RandomKnots(npoints=100, profile=disk)
kfrac = np.random.random()*(1.0 - self.bfrac)
gal = self.bfrac * bulge + (1.0 - self.bfrac - kfrac) * disk + kfrac * knots
gal = gal.withFlux(nphotons)
gal_shear = galsim.Shear(g1=g1, g2=g2)
......@@ -220,12 +220,12 @@ class Galaxy(MockObject):
bulge_shape = galsim.Shear(g1=self.e1_bulge, g2=self.e2_bulge)
bulge = bulge.shear(bulge_shape)
gal = self.bfrac * bulge + (1.0 - self.bfrac) * disk
# gal = self.bfrac * bulge + (1.0 - self.bfrac) * disk
# (TEST) Random knots
# knots = galsim.RandomKnots(npoints=100, profile=disk)
# kfrac = np.random.random()*(1.0 - self.bfrac)
# gal = self.bfrac * bulge + (1.0 - self.bfrac - kfrac) * disk + kfrac * knots
knots = galsim.RandomKnots(npoints=100, profile=disk)
kfrac = np.random.random()*(1.0 - self.bfrac)
gal = self.bfrac * bulge + (1.0 - self.bfrac - kfrac) * disk + kfrac * knots
gal = gal.withFlux(tel.pupil_area * exptime)
gal_shear = galsim.Shear(g1=g1, g2=g2)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment