Model-fitting E. BertinDES Munich meeting 05/2010 1 Automated model fitting in DESDM E.Bertin (IAP)

18
E. Bertin DES Munich meeting 05/2010 1 Model- fitting Automated model fitting in DESDM E.Bertin (IAP)

Transcript of Model-fitting E. BertinDES Munich meeting 05/2010 1 Automated model fitting in DESDM E.Bertin (IAP)

E. Bertin DES Munich meeting 05/2010 1

Model-fitting

Automated model fitting in DESDMAutomated model fitting in DESDM

E.Bertin (IAP)E.Bertin (IAP)

E. Bertin DES Munich meeting 05/2010 2

Model-fitting

Model fitting

• History• SExtractor

– Source detection– PSF modeling– Modeling PSF variations

• Model fitting in the DESDM– Specific features– Control of systematics– Pending issues and forthcoming

developments

E. Bertin DES Munich meeting 05/2010 3

Model-fitting

History

• SExtractor’s first release was in 1994.– For years people would use

scripts that would combine SExtractor and model-fitting software (GalFit, GIM2D.,,) to perform morphometry on large galaxy samples

• EFIGI project in 2005-2007• DES

– Apply to PSF-homogenized data

– Performance improvements and control of systematics

E. Bertin DES Munich meeting 05/2010 4

Model-fitting

Sextractor’s internal pipeline

• Image and detection buffers are handled as FIFO stacks:

E. Bertin DES Munich meeting 05/2010 5

Model-fitting

How sources are detected in SExtractor

• 4 steps:– Sky background

modeling and subtraction

– Image filtering at the PSF scale (matched filter)

– Thresholding and image segmentation

– Merging and/or splitting of detections

E. Bertin DES Munich meeting 05/2010 6

Model-fitting

Model-fitting: implementation• PSF modeled using PSFEx

– Sampling automatically adjusted depending on image– Many improvements and bugfixes done over time

• Models are computed using a grid size that depends on sampling and on the object– Image and model rasters are rebinned for very large objects

• Several model components currently available:– Background level– Dirac peak (2 + 1 parameter)– Sersic (2 + 5 free parameters)– De Vaucouleurs (2 + 4 free parameters)– Exponential (2 + 4 free parameters)– others currently in development

• Automatic sharing of component parameters (e.g. x,y,…)• Minimization uses the LevMar implementation of the Levenberg-Marquardt algorithm by

M.Lourakis– Adaptive Jacobian– Initial parameter guesses made from « classical » SExtractor measurements– Bright pixels from neighbours automatically masked by SExtractor.– Robust fitting

E. Bertin DES Munich meeting 05/2010 7

Model-fitting

Model-fitting: fighting degeneracies

• It is mandatory to include some implicit priors in the 2:– positivity constraints for fluxes– ellipticity constraints for the bulge

• Implementation of the box-constrained algorithm by Kanzow, N. Yamashita and M. Fukushima (2004) in levmar did not lead to satisfactory results.

• House-made trick: map free parameters from a « bounded space » to an « unbounded space »– A sigmoid function works fine!– In some cases a free parameter can

get stuck at one of the boundaries– Covariance matrix also mapped back

to « bounded space »

E. Bertin DES Munich meeting 05/2010 8

Model-fitting

Robust model-fitting

• The sky around galaxies is not « clean » because of overlapping stars, galaxies or defects.– The old SExtractor « CLEANer » masks out the pixels from bright neighbours, but it is not efficient

enough

• The « perfect fit » does not exist, except may be for some ellipticals and spheroidals– dust, star formation regions, overlapping objects,…

• Minimizing fractional errors instead of absolute ones is more appropriate for bright parts of the profile

• Proposition: replace the usual residuasl in

with

~1: linear close to the noise and continuously derivable

i

ii xfI2

2 )(

otherwise )1log(

0 if )1log()( where

)(2

2

u

uuug

xfIg

i

ii

E. Bertin DES Munich meeting 05/2010 9

Model-fitting

Robust profile-fitting (cont.)

Galaxy Linear weighting Non-linear weighting

• More robust towards bright interlopers• In rare cases, the minimization algorithm may accidentally “lock” on some bright,

non-galaxy feature

E. Bertin DES Munich meeting 05/2010 10

Model-fitting

Positional accuracy

Sersic + Exponential fit (i<22)X/YWIN (i<22)

E. Bertin DES Munich meeting 05/2010 11

Model-fitting

“Total” magnitudes

Asymptotic from Sersic+Exponential fitMAG_AUTO (Kron-like)

E. Bertin DES Munich meeting 05/2010 12

Model-fitting

“Total” magnitudes: seeing dependency

Asymptotic from Sersic+Exponential fitMAG_AUTO (Kron-like)

E. Bertin DES Munich meeting 05/2010 13

Model-fitting

Recovered galaxy parameters

Sersic (n=4) + Exponential fit for i<21

E. Bertin DES Munich meeting 05/2010 14

Model-fitting

Galaxy measurements on homogenized simulations

Sersic+Exponential fitAsymptotic magnitude Disk scalelength (i<21)

Stack of 16 homogenized exposures with 0.65’’<FWHM<1.3’’ (including 0.5 ’’ coma)

E. Bertin DES Munich meeting 05/2010 15

Model-fitting

Control of systematics and weak shear measurements with SExtractor

• Good test bed for estimating ellipticity / position angle measurement biases in model-fitting– With a good model of the PSF

and a simple Sersic model for galaxies, is it possible to measure shear to a fairly good accuracy, at least on two-component simulated galaxies (Voigt and Bridle 2010)?

– Test in realistic conditions (random positions, crowding, non-symetric PSF aberrations)

– Analysis restricted to SNRs20

E. Bertin DES Munich meeting 05/2010 16

Model-fitting

Weak shear measurements with Sextractor (cont.)

E. Bertin DES Munich meeting 05/2010 17

Model-fitting

Weak shear measurements with Sextractor (cont.)

• No obvious trend seen as a function of PSF ellipticity, FWHM, or asymmetry

E. Bertin DES Munich meeting 05/2010 18

Model-fitting

Pending issues and future improvements

• Magnitude estimates– SDSS model/cmodel equivalents– Aperture magnitude + asymptotic correction– Improved simulations?

• Multiband fitting• Parallelizing the code

– Manage to have every tile processed in less than 24h

• Multiple galaxy fit as part of deblending• Star/galaxy separation

– CLASS_STAR appears to be more reliable than SPREAD_MODEL in DC5 (and in other tests)

– Adaptive CLASS_STAR?

• Improve background noise modeling and subtraction