def gim2d_catalog(cat, band): ''' http://irsa.ipac.caltech.edu/data/COSMOS/tables/morphology/cosmos_morph_zurich_colDescriptions.html ''' ''' ACS_MU_CLASS float Type of object. 1 = galaxy 2 = star 3 = spurious ''' ''' ACS_CLEAN float Object useable flag. 0 = do not use this object 1 = use this object ''' ''' FLUX_GIM2D float counts GIM2D total flux R_GIM2D float arcseconds GIM2D psf-convolved half-light radius of object ELL_GIM2D float GIM2D ellipticity = 1-b/a of object PA_GIM2D float degrees GIM2D position angle of object - cw from +y-axis DX_GIM2D float arcseconds x-offset of GIM2D-model center from ACS-coordinate center DY_GIM2D float arcseconds y-offset of GIM2D-model center from ACS-coordinate center SERSIC_N_GIM2D float GIM2D Sersic index R_0P5_GIM2D float arcseconds GIM2D half-light radius of object without PSF convolution TYPE float ZEST Type CLASS 1 = Early type 2 = Disk 3 = Irregular Galaxy 9 = no classification ''' ''' BULG float ZEST "Bulgeness" CLASS - only for Type 2 (disk) galaxies. 0 = bulge dominated galaxy 1,2 = intermediate-bulge galaxies 3 = pure disk galaxy 9 = no classification ''' ''' STELLARITY float Visual Stellarity flag. 0 if ACS_CLASS_STAR<0.6 (object is ASSUMED to be a galaxy; no visual inspection) 0 if ACS_CLASS_STAR>=0.6 AND object visually identified as a galaxy. 1 if ACS_CLASS_STAR>=0.6 AND visually identified as a star. 2 if ACS_CLASS_STAR>=0.8 (object is assumed to be a star and was not visually inspected) 3 if ACS_CLASS_STAR<0.6 but object is visually identified as a star (e.g. saturated star, etc) JUNKFLAG float 0 = good object 1 = spurious ''' print('Classifications:', Counter(cat.type).most_common()) cat.is_galaxy = (cat.stellarity == 0) srcs = [] for t in cat: pos = RaDecPos(t.ra, t.dec) bright = NanoMaggies( **{band: NanoMaggies.magToNanomaggies(t.acs_mag_auto)}) shape = GalaxyShape(t.r_0p5_gim2d, 1. - t.ell_gim2d, 90. + t.pa_gim2d) is_galaxy = (t.is_galaxy * (shape.re >= 0) * (shape.ab <= 1.) * (shape.phi > -999)) if is_galaxy and t.type == 1: # deV src = DevGalaxy(pos, bright, shape) elif is_galaxy and t.type == 2: # exp src = ExpGalaxy(pos, bright, shape) else: src = PointSource(pos, bright) srcs.append(src) return srcs