LSSTApplications
18.0.0+106,18.0.0+50,19.0.0,19.0.0+1,19.0.0+10,19.0.0+11,19.0.0+13,19.0.0+17,19.0.0+2,19.0.0-1-g20d9b18+6,19.0.0-1-g425ff20,19.0.0-1-g5549ca4,19.0.0-1-g580fafe+6,19.0.0-1-g6fe20d0+1,19.0.0-1-g7011481+9,19.0.0-1-g8c57eb9+6,19.0.0-1-gb5175dc+11,19.0.0-1-gdc0e4a7+9,19.0.0-1-ge272bc4+6,19.0.0-1-ge3aa853,19.0.0-10-g448f008b,19.0.0-12-g6990b2c,19.0.0-2-g0d9f9cd+11,19.0.0-2-g3d9e4fb2+11,19.0.0-2-g5037de4,19.0.0-2-gb96a1c4+3,19.0.0-2-gd955cfd+15,19.0.0-3-g2d13df8,19.0.0-3-g6f3c7dc,19.0.0-4-g725f80e+11,19.0.0-4-ga671dab3b+1,19.0.0-4-gad373c5+3,19.0.0-5-ga2acb9c+2,19.0.0-5-gfe96e6c+2,w.2020.01
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 235 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 216 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 186 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 284 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 479 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 374 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 |
|||
) |
Real galaxy.
Definition at line 553 of file makeFakeGalaxy.py.
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 14 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 254 of file makeFakeGalaxy.py.
def lsst.synpipe.makeFakeGalaxy.testMakeFake | ( | galList, | |
asciiTab = False , |
|||
single = True , |
|||
double = True , |
|||
real = True |
|||
) |
Test the makeFake functions.
Definition at line 592 of file makeFakeGalaxy.py.