LSSTApplications
19.0.0-14-gb0260a2+599893a4c6,20.0.0+126303c00d,20.0.0+2f3d0e5c40,20.0.0+36ef800059,20.0.0+5ac7adcc0c,20.0.0+693a64958a,20.0.0+bebc1f60e8,20.0.0+cad136aba6,20.0.0+e2e26847c2,20.0.0+e69b5d60e7,20.0.0-1-g10df615+11b215b765,20.0.0-1-g253301a+36ef800059,20.0.0-1-g2b7511a+bebc1f60e8,20.0.0-1-g4d801e7+aeeb640673,20.0.0-1-g5b95a8c+f111d5f02f,20.0.0-1-g660595b+f45b7d88f4,20.0.0-1-gc96f8cb+e3b38461e6,20.0.0-1-gd1c87d7+85c46248f3,20.0.0-1-gedffbd8+d0b27f8bcb,20.0.0-16-g111fe95+e3b38461e6,20.0.0-16-g18096c8+d1a4df0137,20.0.0-16-g233ea98+a4df35922d,20.0.0-17-ga9337b4+41f27cfd54,20.0.0-2-g4dae9ad+e3b38461e6,20.0.0-2-g7818986+85c46248f3,20.0.0-2-gec03fae+ff10c6d78d,20.0.0-28-g282f9e7e+feda6aebd8,20.0.0-3-g4cc78c6+63636aeed8,20.0.0-3-g6a8623c+d1a4df0137,20.0.0-3-g750bffe+f5427621ce,20.0.0-4-gfea843c+f45b7d88f4,20.0.0-5-g357b56b+f45b7d88f4,20.0.0-5-gfcebe35+e2b15ed341,20.0.0-52-g73d9071+9bf1eb8e0a,20.0.0-7-gcda7bf1+773ba852cb,20.0.0-8-g4540fe2a+952f6d3c43,20.0.0-9-g61a2a9a3d+14f89e4eca,w.2020.40
LSSTDataManagementBasePackage
|
Functions | |
def | makeGalaxy (flux, gal, psfImage, galType='sersic', cosmosCat=None, drawMethod='no_pixel', trunc=10.0, transform=None, addShear=False, calib=None, sersic_prec=0.01, addPoisson=False) |
def | parseRealGalaxy (gal) |
def | parseDoubleSersic (tflux, gal) |
def | arrayToGSObj (imgArr, scale=1.0, norm=False) |
def | galSimDrawImage (galObj, size=0, scale=1.0, method="no_pixel", addPoisson=False) |
def | galSimConvolve (galObj, psfObj, size=0, scale=1.0, method="no_pixel", returnObj=False) |
def | galSimAdd (galObjList, size=0, scale=1.0, method="no_pixel", returnArr=False) |
def | plotFakeGalaxy (galObj, galID=None, suffix=None, size=0, addPoisson=False) |
def | galSimFakeCosmos (cosmosCat, calib, gal, psfImage=None, plotFake=False, returnObj=True, sersic_prec=0.02, drawMethod='no_pixel', scale=1.0, transform=None, addShear=False, addPoisson=False) |
def | galSimFakeSersic (flux, gal, psfImage=None, scaleRad=False, returnObj=True, expAll=False, devAll=False, plotFake=False, trunc=0, drawMethod="no_pixel", addPoisson=False, scale=1.0, transform=None, addShear=False) |
def | galSimFakeDoubleSersic (comp1, comp2, psfImage=None, trunc=0, returnObj=True, devExp=False, plotFake=False, drawMethod='auto', addPoisson=False, scale=1.0, transform=None, addShear=False) |
def | galSimRealGalaxy (flux, real_galaxy_catalog, index=None, psfImage=None, random=False, returnObj=True, plotFake=False, drawMethod='auto', addPoisson=False, scale=1.0, transform=None) |
def | testMakeFake (galList, asciiTab=False, single=True, double=True, real=True) |
def lsst.synpipe.makeFakeGalaxy.arrayToGSObj | ( | imgArr, | |
scale = 1.0 , |
|||
norm = False |
|||
) |
Convert an input 2-D array into a GalSim Image object TODO : Check the scale here According to the GalSim Doxygen If provided, use this as the pixel scale for the Image; this will override the pixel scale stored by the provided Image. If scale is None, then take the provided image's pixel scale. [default: None]
Definition at line 165 of file makeFakeGalaxy.py.
def lsst.synpipe.makeFakeGalaxy.galSimAdd | ( | galObjList, | |
size = 0 , |
|||
scale = 1.0 , |
|||
method = "no_pixel" , |
|||
returnArr = False |
|||
) |
Just add a list of GSObjs together using GalSim Make sure all elements in the input list are GSObjs
Definition at line 234 of file makeFakeGalaxy.py.
def lsst.synpipe.makeFakeGalaxy.galSimConvolve | ( | galObj, | |
psfObj, | |||
size = 0 , |
|||
scale = 1.0 , |
|||
method = "no_pixel" , |
|||
returnObj = False |
|||
) |
Just do convolution using GalSim Make sure the inputs are both GalSim GSObj The galaxy model should be the first one, and the PSF object is the second one; Returns a imgArr or GSObj
Definition at line 215 of file makeFakeGalaxy.py.
def lsst.synpipe.makeFakeGalaxy.galSimDrawImage | ( | galObj, | |
size = 0 , |
|||
scale = 1.0 , |
|||
method = "no_pixel" , |
|||
addPoisson = False |
|||
) |
"Draw" a GalSim Object into an GalSim Image using certain method, and with certain size TODO : Think about the scale here: By default scale=None According to GalSim Doxygen : If provided, use this as the pixel scale for the image. If scale is None and image != None, then take the provided image's pixel scale. If scale is None and image == None, then use the Nyquist scale. If scale <= 0 (regardless of image), then use the Nyquist scale.
Definition at line 185 of file makeFakeGalaxy.py.
def lsst.synpipe.makeFakeGalaxy.galSimFakeCosmos | ( | cosmosCat, | |
calib, | |||
gal, | |||
psfImage = None , |
|||
plotFake = False , |
|||
returnObj = True , |
|||
sersic_prec = 0.02 , |
|||
drawMethod = 'no_pixel' , |
|||
scale = 1.0 , |
|||
transform = None , |
|||
addShear = False , |
|||
addPoisson = False |
|||
) |
Generate fake galaxy using galSim.COSMOSCatalog objects.
Definition at line 279 of file makeFakeGalaxy.py.
def lsst.synpipe.makeFakeGalaxy.galSimFakeDoubleSersic | ( | comp1, | |
comp2, | |||
psfImage = None , |
|||
trunc = 0 , |
|||
returnObj = True , |
|||
devExp = False , |
|||
plotFake = False , |
|||
drawMethod = 'auto' , |
|||
addPoisson = False , |
|||
scale = 1.0 , |
|||
transform = None , |
|||
addShear = False |
|||
) |
Make a fake double Sersic galaxy using the galSim.Sersic function Inputs: total flux of the galaxy, and a record array that stores the necessary parameters [reffPix, nSersic, axisRatio, posAng] Output: a 2-D image array of the galaxy model OR a GalSim object of the model Options: psfImage: PSF image for convolution trunc: Flux of Sersic models will truncate at trunc * reffPix radius; trunc=0 means no truncation drawMethod: The method for drawImage: ['auto', 'fft', 'real_space'] addPoisson: Add Poisson noise plotFake: Generate a PNG figure of the model devexp: The first component will be seen as a nSersic=4 bulge; And, the second one will be seen as a nSersic=1 disk returnObj: If TRUE, will return the GSObj
Definition at line 475 of file makeFakeGalaxy.py.
def lsst.synpipe.makeFakeGalaxy.galSimFakeSersic | ( | flux, | |
gal, | |||
psfImage = None , |
|||
scaleRad = False , |
|||
returnObj = True , |
|||
expAll = False , |
|||
devAll = False , |
|||
plotFake = False , |
|||
trunc = 0 , |
|||
drawMethod = "no_pixel" , |
|||
addPoisson = False , |
|||
scale = 1.0 , |
|||
transform = None , |
|||
addShear = False |
|||
) |
Make a fake single Sersic galaxy using the galSim.Sersic function Inputs: total flux of the galaxy, and a record array that stores the necessary parameters [reffPix, nSersic, axisRatio, posAng] Output: a 2-D image array of the galaxy model OR a GalSim object of the model Options: psfImage: PSF image for convolution trunc: Flux of Sersic models will truncate at trunc * reffPix radius; trunc=0 means no truncation drawMethod: The method for drawImage: ['auto', 'fft', 'real_space'] addPoisson: Add Poisson noise plotFake: Generate a PNG figure of the model expAll: Input model will be seen as nSersic=1 devAll: Input model will be seen as nSersic=4 returnObj: If TRUE, will return the GSObj
Definition at line 371 of file makeFakeGalaxy.py.
def lsst.synpipe.makeFakeGalaxy.galSimRealGalaxy | ( | flux, | |
real_galaxy_catalog, | |||
index = None , |
|||
psfImage = None , |
|||
random = False , |
|||
returnObj = True , |
|||
plotFake = False , |
|||
drawMethod = 'auto' , |
|||
addPoisson = False , |
|||
scale = 1.0 , |
|||
transform = None |
|||
) |
def lsst.synpipe.makeFakeGalaxy.makeGalaxy | ( | flux, | |
gal, | |||
psfImage, | |||
galType = 'sersic' , |
|||
cosmosCat = None , |
|||
drawMethod = 'no_pixel' , |
|||
trunc = 10.0 , |
|||
transform = None , |
|||
addShear = False , |
|||
calib = None , |
|||
sersic_prec = 0.01 , |
|||
addPoisson = False |
|||
) |
Function called by task to make galaxy images INPUTS: flux = calibrated total flux gal = galaxy parameters in record (np.recarray) psfImage = np.ndarray of psfImage galType = type of galaxy we want to make, this has to agree with what's in the record array, options now are: 'sersic' (single sersic), 'dsersic' (double sersic), and 'real' (for making galaxies from real HST images) 'cosmos' (Using GalSim.COSMOSCatalog) All the necessary keywords need to be in the fits catalog, including maybe drawMethod and trunc...
Definition at line 9 of file makeFakeGalaxy.py.
def lsst.synpipe.makeFakeGalaxy.parseDoubleSersic | ( | tflux, | |
gal | |||
) |
Parse the input total flux [tflux] and parameter record array [gal] into two parameter records for each component [comp1, comp2]
Definition at line 107 of file makeFakeGalaxy.py.
def lsst.synpipe.makeFakeGalaxy.parseRealGalaxy | ( | gal | ) |
def lsst.synpipe.makeFakeGalaxy.plotFakeGalaxy | ( | galObj, | |
galID = None , |
|||
suffix = None , |
|||
size = 0 , |
|||
addPoisson = False |
|||
) |
Generate a PNG image of the model By default, the image will be named as 'fake_galaxy.png'
Definition at line 253 of file makeFakeGalaxy.py.
def lsst.synpipe.makeFakeGalaxy.testMakeFake | ( | galList, | |
asciiTab = False , |
|||
single = True , |
|||
double = True , |
|||
real = True |
|||
) |