the magic of b-splines - astronomybolton/bspline08.pdf · the magic of b-splines adam s. bolton ifa...
TRANSCRIPT
The Magic of B-Splines
Adam S. BoltonIfA Astrocoffee2008 March 14
B-splines
o For “basis splines” (I think...)
o When you need to fit an arbitrarily complicatedsmooth model to an arbitrarily complicated data set.
o Think of them as a cross between a fit and aninterpolation.
o Piece-wise polynomial of order n (by convention,n=2 is linear, n=3 is quadratic, n=4 is cubic,etc.), continuous at “breakpoints” throughderivative order n-2, cast in terms of localizedbasis functions that are fitted linearly to thedata in a least-squares sense.
The “truth”...
... with some finite sampling...
... and errors...
... and of course we don’tactually know what the truth is.
We can break it up into binsdelineated by “breakpoints”...
... and compute a binned average.This is an “order n=1” B-spline.
For piece-wise continuity, we canuse and “order n=2” B-spline.
For continuity of slope, use an“order n=3” B-spline.
For continuity of slope andcurvature, an “order n=4” B-spline.
Not a bad approximation to the“truth”
Not a bad approximation to the“truth”
Advantages of B-splineso Linear model => one-shot parameter solution.
o “Local” basis functions => band-diagonal matrix to invert, limited parameter covariance.
o Smoothness & continuity built in.
o Breakpoint spacing arbitrarily adjustable.
o Another independent variable can be incorporatedthrough multiplication of basis functions by low-order global function (e.g., polynomial ormultipole) of that 2nd variable.
Application: flatfielding, modelingand extraction of fiber spectroscopy
Figure from Bolton & Burles 2007Also SDSS 2D spectro pipeline (Burles & Schlegel)
Data B-spline model= fiber flat
Data / model= pixel flat
Application: flatfielding, modelingand extraction of fiber spectroscopy
Data Extraction model
Data w/ model CR rejection Residual (Bolton &Burles 2007)
Application: sky subtraction forfiber spectroscopy
Figure from Bolton & Burles 2007Also see SDSS 2D spectro pipeline (Burles & Schlegel)Also see Kelson 2003
~7700 Ang
~8100 Ang
Application: sky subtraction forfiber spectroscopy
Bolton &Burles 2007
Application: Elliptical galaxysurface-brightness modeling (usingmultipole angular dependence)
Bolton et al. 2006, 2008a
Key B-spline references/resources
o Carl de Boor, numerous publications, esp. “A practical guide to splines”
o IDL implementation of S. Burles & D. Schlegel: http:// spectro.princeton.edu/ (“idlutils”)
o Also implemented in Fortran, C, and Python (I believe...)
Thank you!