Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Image Analysis with Shapelets
M. den [email protected]
Kapteyn InstituteUniversity of Groningen
Guest lecture for the Applied Signal Processing course, 2008
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Outline
1 Introduction
2 Cartesian Shapelets
3 Polar Shapelets
4 Summary
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Introduction
Post-reduction data analysis important for images
Examples: Fourier transform, wavelets, &c.
Use Shapelets to analyse shape of object
Applications of this technique include gravitational lensingand image simulation.
Technique is fairly young (first article appeared in 2001)
This lecture is based on the articles by Refregier (2003),Refregier & Bacon (2003)
A lot of information can be found athttp://www.astro.caltech.edu/~rjm/shapelets/,including IDL code.
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
One-dimensional basis functions
The goal is to describe a 1-d image (I(x)) as a series of basisfunctions. (cf. Fourier series)The Shapelets dimensionless basis functions are defined asdistorted Gaussians:
φn =(
2nπ12 n!) 1
2Hn(x)e
− x2
2 (1)
In practice, however, these are rescaled to the dimensional basisfunctions:
Bn(x , β) = β12φn(x/β) (2)
So,
I (x) =∑n
InBn(x , β) (3)
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Hermite polynomials
First few Hermite polynomials:
H0(x) = 1
H1(x) = 2x
H2(x) = 4x2 − 2
H3(x) = 8x3 − 12x
H4(x) = 16x4 − 48x2 + 12
Some useful properties:
Hn+1(x) = 2xHn(x)− 2nHn−1(x)H ′n(x) = 2nHn−1(x)
Hn(x) = (−1)nex2 dn
dxne−x
2
= ex2/2
(x − d
dx
)e−x
2/2
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
We can define an inner product between continuous functions:
< f , g >=
∫ ∞−∞
f (x)g(x)dx
The Shapelet basis functions are orthonormal in this innerproduct space:
< Bm,Bn >= δm,n
Since I (x) =∑
n InBn(x , β), we can find the components Insimply by taking the inner product with the right basis function:
Im =< I ,Bm >
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Berry, Hobson & Withington(2004)
However, in practice, theshapelet basisfunctions arediscretized: in this caseorthogonality betweenbasisfunctions is lost. For thisreason, decomposition intoshapelets is usually done by aleast squares fit, or a SingularValue Decomposition.
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
2-Dimensional Basisfunctions
Refregier (2003)
The one-dimensional formalism iseasily extended to 2-D. Eachtwo-dimensional basisfunction is theproduct of two one-dimensionalbasisfunction:
Bnxny (x , y , β) = Bnx (x , β) · Bny (y , β)
This set of 2-D basisfunctions iscomplete (you may prove thatyourself.)
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Example decomposition
In practice, only a finite number of components is used. Highfrequency components start sampling noise, and this is usuallynot what you want. Therefore, a maximum shapelet order isdefined as nx + ny
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Application: weak gravitational lensing
Light of distant sources is bent around object of high mass:gravitational lensing. Three different kinds of lensing
Strong lensing: Great distortions in the light distribution.Multiple images and Einstein rings occur.
Microlensing: High mass object moves before backgroundsource, beaming the light of the background source andincreasing the intensity. Transient effect (used, amongother things, to detect exoplanets)
Weak lensing: the shape distortion can only be detectedby statistically analyzing the shear of a large number ofgalaxies.
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Application: weak gravitational lensing
For weak lensing it is important to have a formalism thatdescribes the shape of the galaxy in a quantitative way. One ofthe most widely used methods is the KSB method (Kaiser,Squires & Broadhurst 1995) This method determines the effectof weak gravitational lensing on the gaussian-weightedquadrupole moment of galaxies. In the shapelets formalism,this corresponds to the n1 + n2 = 2 coefficients.
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Remember: φn =(
2nπ12 n!) 1
2Hn(x)e
− x2
2
Question: Do the Shapelet basisfunctions somehow lookfamiliar to you?
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Remember: φn =(
2nπ12 n!) 1
2Hn(x)e
− x2
2
Question: Do the Shapelet basisfunctions somehow lookfamiliar to you?
Answer: they are also the eigenfunctions of the QuantumHarmonic Oscillator (QHO)
This is very useful, because now we can use the formalismof Quantum Mechanics.
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Application: Fourier transform
Because we know that the Basisfunctions are theEigenfunctions of the QHO, the Fourier transform of aBasisfunction is straightforward:
The dimensionless 1-D equation of the Q.H.O looks likeĤΨ = (x̂2 + p̂2)Ψ = E Ψ
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Position space
In position space, the base kets used are the position kets:
x̂ |x ′ >= x ′|x ′ >
which are orthonormal:
< x ′′|x ′ >= δ(x ′′ − x ′)
Any physical state can be expanded in these base kets:
|α >=∫
dx ′|x ′ >< x ′|α >
Here we recogize < x ′|α > as ψα(x ′) and hence< β|α >=
∫dx ′ψβ
∗(x ′)ψα(x′)
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Momentum space
For momentum space, we can do something similar:
p̂|p′ >= p′|p′ >
The momentumspace base kets are also orthonormal:
< p′′|p′ >= δ(p′′ − p′)
|α >=∫
dp′|p′ >< p′|α >
Using momentum as generator of translations, one can derive:
p̂|α > =∫
dx ′|x ′ >(−i~ ∂
∂x ′< x ′|α >
)< x ′|p̂|α > = −i~ ∂
∂x ′< x ′|α >
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Relation between position/momentum space
From the above, we know:
< x ′|p̂|p′ >= p′ < x ′|p′ >= −i~ ∂∂x ′
< x ′|p′ >
From this, the relation between position and momentum spacefollows:
< x ′|p′ >= Aeip′x′
~
Normalization requires that A = 1√2π
and hence:
|Φ >=∫
dp|p >< p|Φ >=∫
dp|p > φ(p)
φ(x) =< x |Φ >=∫
dp < x |p > φ(p) =∫
dp1√2π
eip′x′
~ φ(p)
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Application: Fourier transform
Because we know that the Basisfunctions are theEigenfunctions of the QHO, the Fourier transform of aBasisfunction is straightforward:
The dimensionless 1-D equation of the Q.H.O looks likeĤΨ = (x̂2 + p̂2)Ψ = E Ψ
In x-space we have (x2 − ∂2∂x2
)Ψ(x) = E Ψ(x)
Transforming this equation to momentum space:(p2 − ∂2
∂p2)Ψ(p) = E Ψ(p)
From the symmetry between x and p, we deduce that theFourier transform of the basisfunction should be, up to amultiplicative constant, equal to the same basisfunction.
It turns out that φ̃(k) = inφn(x)
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Fourier transform of an image
The decomposition of a 2d image yields a vector withshapelets coefficients and a scale parameter (β.)
The fourier transform of this image consists of thecomponents of this vecor, multiplied with flying factors ofi , and with scale 1/β
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Convolution
It is however more interesting to look at convolution of animage:
h(x) =
∫d2x f (x− x′)g(x′)
Each image can be decomposed into shapelets with scalesα, β, γ and coefficients fn =< n, α|f >,gn =< n, β|g >,hn =< n, γ|h >.Convolution is bilinear (remember, in Fourier space you have asimple product of two functions). Therefore, the shapeletcoefficients of a convolved image should look like:
hn =∑m,l
Cn,m,lfmgl
Cn,m,l(α, β, γ) is a 2d convolution tensor. The coefficients ofthis tensor can be calculated analytically (a rather lengthyexpression though.)
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Deconvolution
Smoothing an image in Shapelet formalism is just matrixmultiplication. Therefore, if the smoothing kernel is known, animage can be deconvolved by multiplying with the inversematrix.Lots of applications require PSF deconvolution
weak lensing
micro lensing
photometry
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Application: simple astro/photometric expressions
Using the basisfunctions, we can compute certain photo- andastrometric quantities fairly easy.
1 Total flux: F = π12β∑even
n1,n2 212(2−n1−n2)
( n1n1/2
) 12 fn1,n2
2 First moment: xf = πβ2F−1
∑oddn1
∑evenn2
(n1 +
1)12 2
12(2−n1−n2)
( n1+1(n1+1)/2
) 12( n2n2/2
) 12 fn1,n2
3 Rms radius: r2f = πβ2F−1
∑oddn1
∑evenn2
(n1 + 1)12 (1 + n1 +
n2)212(4−n1−n2)
( n1n1/2
) 12( n2n2/2
) 12 fn1,n2
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Polar shapelets
In 1d, the shapelet basisfunctions are the eigenfunctions of
Ĥ = â†â +1
2
where ↠and â are the creation and annihilation operators,with:
↠= x̂ − i p̂â = x̂ + i p̂[â†, â
]= 1
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
We can define 2d angular momentum operators as follows:
L̂l = âl†âl
L̂r = âl†âr
âl =1√2
(â1 + i â2)
âr =1√2
(â1 − i â2)
The Hamiltonian may thus be written as:
Ĥ = a†l al + a†r ar + 1 = N̂l + N̂r + 1
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Polar shapelets
The operators N̂r and N̂l form a complete set of observables(you can work out the commutation relations yourself). Theeigenfunctions,
N̂l |nl , nr >= nl |nl , nr >,
are the basisfunctions for polar shapelets. The eigenfunctionscan be defined in terms of r and θ:
χn,m(r , θ, β) =−1(n−|m|)/2
β|m|+1
[((n − |m|)/2)!π((n + |m|)/2)!
] 12
×
r |m|L|m|(n−|m|)/2
r2
β2e− r
2
2β2 e−imθ
Lqp is the associated Laguerre polynomial.
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Polar Shapelets
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Polar Shapelets
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Application: morphological classification
Galaxies come in different types, p.e. spirals, ellipticals.Classification is always a problem, because it is somewhatsubjective. The authors below try to classify galaxies usingShapelets.Recipe:
1 Select suitable sample of galaxies from SDSS
2 Put galaxies at same redshift (by rebinning)
3 Convolve galaxies to common PSF
4 Perform Principal Components Analysis of shapeletcoefficients.
(Kelly & McKay, astro-ph:/307395)
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Application: morphological classification
9 dimensions needed
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Application: morphological classification
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Application: image simulation
There exists some packages for image simulation (p.e. IRAF’sartdata), but most packages only provide symmetric profiles.The creation of bars, spiral arms &c is more difficult.Recipe:
1 Draw large number of galaxies from sample (in this case,HDF).
2 Determine the distribution of shapelet coefficients
3 Pick shapelet coefficients at random from this distribution
(Massey, Refregier, Conselice & Bacon, astro-ph/0301449)
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Application: image simulation
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Application: image simulation
Image simulation with Shapelets has another nicety:Gravitationally shearing an image is can be done analytically.First, let’s look at a general image transformation, usinginfinitesimal displacement:
x− > x′ = (1 + Ψ)x + �
Ψ =
(κ+ γ1 γ2 − ργ2 + ρ κ− γ1
)Assuming all quantities are small, we can describe thetransformed image as:
f ′ ≈ (1 + ρR̂ + �T̂ + κK̂ + γi Ŝi )f
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Application: image simulation
One of the beautiful things of the Shapelet formalism is, thatthese transformation matrices are expressible in creation andannihilation operators.
R̂ = −i (x̂1p̂2 − x̂2p̂1) = â1â†2 − â†1â2
K̂ = −i (x̂1p̂1 + x̂2p̂2) = 1 +1
2
(â†21 + â
†22 − â
21 − â22
)Ŝ1 = −i (x̂1p̂1 − x̂2p̂2) =
1
2
(â†21 − â
†22 − â
21 + â
22
)Ŝ2 = −i (x̂1p̂2 + x̂2p̂1) = â†1â
†2 − â1â2
T̂j = −i p̂j =1√2
(â†j − âj), j = 1, 2.
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
The infinitesimal transformations are easily converted to finitedisplacements, by taking the exponent of the matrix.This method has for example been used for STEP 2 (ShearTesting Programme), where a set of simulated sheared galaxieswas created. The purpose of this was recovering the shear ofthese galaxies, to test how well weak lensing methods perform.
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
Summary
Shapelets are a way to decompose (astronomical) imagesin a set of orthogonal basisfunctions.
The basisfunctions come in two tastes: cartesian and polarshapelets
The basisfunctions have nice properties:1 Analytical expressions for flux, first, second moment2 Analytical convolution/deconvolution (calculationally easy)
Applications include:1 Weak gravitational lensing2 Accurate photometry3 Image compression4 Image simulation5 Morphological classification
Shapelets
Mark denBrok
Introduction
CartesianShapelets
PolarShapelets
Summary
Appendix
For FurtherReading
For Further Reading I
Refregier A. 2003, MNRAS 338 35
Massey R. & Refregier A. 2005, MNRAS 363, 197
Refregier A. & Bacon D. 2003, MNRAS 338 48
Massey R., Refregier A., Conselice C. & Bacon D. 2004,MNRAS 348 214
Kelly B. & McKay T. 2004, AJ, 127, 625
Massey R. et al. 2006, MNRAS submitted
IntroductionCartesian ShapeletsPolar ShapeletsSummaryAppendix