90 likes | 307 Views
How to use galfit (and galphot). Gijs Verdoes Kleijn. Galfit (& Galphot). Galfit: 2-D galaxy profile fitting routines (C) Author: Chien Peng (STScI) Awe-status: basics incorporated Reference: zwicky.as.arizona.edu/~cyp/work/galfit/galfit.html Peng etal 2002 AJ 124, 266
E N D
How to use galfit (and galphot) Gijs Verdoes Kleijn
Galfit (& Galphot) • Galfit: 2-D galaxy profile fitting routines (C) • Author: Chien Peng (STScI) • Awe-status: basics incorporated • Reference: • zwicky.as.arizona.edu/~cyp/work/galfit/galfit.html • Peng etal 2002 AJ 124, 266 • Galphot: ellipse fitting routine (fortran) • Author: Marijn Franx (Leiden) • To be incorporated • ref: www.strw.leidenuniv.nl/~franx • Franx etal 1989 AJ 98, 538
What galfit does • fitting 2-D parameterized axisymmetric functions to images • Any (in)dependent combination of Sersic(devauc/expo),nuker,gaussian,king,moffat,sky • Disky/boxy shapes • Error weighing • Inclusion PSF via FFT • Meant for well resolved galaxies: explore sub-structure • Future plans of galfit: more profiles, more isophotal shapes, allow for axial twists, spiral structure. • No batch mode perl scripts exist (used for GEMS survey)
Astro-WISE implementation • Python wrapper: • Give input to galfit c-code from python • Input+output+links to SourceList contained in classes instances of which are stored in database • no alteration c-code • Written by Ewout Helmich, help from C. Trachternach & GVK • Description • Input: SLID, SID, cut-out via cut-out server, configuration parameters • Defaults for configuration parameters based on SourceList • Initial guess x position: SourceList x position • Size cut-out image: 15* SourceList r_eff
Examples of usage (see how-to) Run galfit using local cpu: awe>from DBRecipes.GalFit import GalFitTask awe>task = GalFitTask(instrument='WFI', slid=57424, sids=[31,52,73], models=['sersic', 'sky'], commit=1) awe>task.execute() Run galfit using parallel cluster: awe>from astro.net.dpu import Processor awe> from astro.local.Environment import Env awe>dpu = Processor(Env['dpu_name']) awe>dpu.run('GalFit', i='WFI', slid=57424, sids=[31,52,,73], m=['sersic', 'sky'], commit=1)
Examples continued Show model parameters for SLID=57424, SID=[31,52,73] for last run: awe> mysources = [(57424, 31), (57424, 52), (57424, 73)] awe>models = [] awe>for slid, sid in mysources: awe> q = (GalFitModel.SLID == slid) & (GalFitModel.SID == sid) awe> model = q.max('GFID') awe> models.append(model) awe>for m in models: awe> m.show_model_parameters()
Now & Future • Code itself can be found at: • opipe/astro/main/GalFitModel.py (show it) • opipe/DBRecipes/GalFit.py (Task) • Current implementation • Sersic+sky on ReducedScienceFrame,RegriddedFrame • Contaminant fitting included • Next steps • All profiles (Sersic+sky implemented: rest coming soon • Psf convolution • Background subtraction statistics right • Constraints file inclusion
Summary • Surface photometry tools getting ready in Astro-WISE for large data sets: • GalFit implemented basics, more coming soon • Easy (re-)processing and inspecting of galfit results on large number of galaxies • GalPhot is coming…..