practical applications: ccd spectroscopy tracing path of 2-d spectrum across detector –measuring...
TRANSCRIPT
Practical applications: CCD spectroscopy
• Tracing path of 2-d spectrum across detector– Measuring position of spectrum on detector
– Fitting a polynomial to measured spectrum positions
• Optimal extraction of spectra from CCD images with simultaneous sky background subtraction:
– Scaling a profile + constant background
• Wavelength calibration of 1-d spectra– Measurement of positions of arc-line images
– Fitting a polynomial to measured positions of images of arc lines with known wavelengths
Observing hints• Rotate detector so that arc lines are parallel to
columns:
• To minimise slit losses due to differential refraction, rotate slit to “parallactic angle”
– i.e. keep it vertical:
• Spectra are then tilted or curved due to– camera distortions
– Differential refraction
To zenith
x
x
Night sky lines
Target spectrum
(Reference spectrum)
After bias subtraction and flat fielding
• Recall Lecture 3 for subtraction of B(x,), construction of flat field F(x,) and measurement of gain factor G.
• Corrected image values areD(x,) =[C(x, )−B(x,)] / F(x,)
=sky(x,) + f()P(x,)
Var(D) =Var(C) / F 2
= σ 02 +(C−B) /G[ ] / F 2
≈σ 02 + (C−B) /G[ ] sinceF ~1
Tracing the spectrum
• Spectra may be tilted, curved or S-distorted.
• Trace spectrum via a sequence of operations:
– divide into -blocks
– measure centroid of spectrum in each block (fit gaussian)
– fit polynomial in to calibrate x0().
• Once this is done, use x0() to select object/sky regions on subsequent steps.
x0
xx0
x
Sky subtraction• Alignment (rotation) of CCD detector
relative to grating aims to make ~const along columns.
• Imperfect alignment gives slow change in along columns.
• This causes gradient, curvature of sky background when is close to a night-sky line.
• Solution: fit low-order polynomial in x to sky background data.
• Alternative: fit linear function to interpolate sky from “sky regions” symmetric on either side of object spectrum:
on edge of night-sky emission line
away from night-sky emission line
x
TargetRefstar
Ref
Target
Slices across spectrum at =const:
“Normal” extraction
• Subtract sky fit, and sum the counts between object limits:
• Dilemma: How do we pick x1, x2?
– too wide: too much noise
– too narrow: lose counts
A = D(x)−S(x)( )x=x1
x2
∑
Var( A) = Var D(x)( )x=x1
x2
∑
S(x)
xx1 x2
Slice across spectrum at =const:
Optimal extraction
• 1) Scale profile to fit the data:
• 2) Compute σ(x) from the model:
• 3) σ-clip to “zap” cosmic-ray hits.
• Iterate 1 to 3, since σ(x) depends on A:
S(x)
xx1 x2
Slice across spectrum at =const: Starlight
profile P(x)D(x) =S(x) +AP(x)
ˆ A=D(x) −S(x)( )P(x) / σ 2 (x)
x∑P2 (x) /σ 2 (x)
x∑
Var ( ˆ A ) =1
P2 (x) / σ 2 (x)x∑
σ 2(x) =σ02(x)+
S(x)+ ˆ A P(x)G
Estimating the profile P(x)• The fraction of the
starlight that falls in row x varies along the spectrum and is given by:
• This is an unbiased but noisy estimator of P(x).
• It varies as a slow function of wavelength.
• Plot against and fit polynomials in at each x.
D−S(D−S)
x∑-0.05
0
0.050.1
0.150.2
0.250.3
0.350.4
0.45
0 20 40 60 80
Column ( )
Fraction of starlight in
row
2 rows below
1 row below
Centre row
1 row above
2 rows above
3 rows above
00.05
0.10.15
0.2
0.250.3
0.350.4
-3 -2 -1 0 1 2 30
0.050.1
0.150.2
0.250.3
0.350.4
-3 -2 -1 0 1 2 3
Column 20 Column 60
Optimal vs. normal extraction
• Pros:– Optimal extraction gives lower statistical noise.
– Equivalent to longer exposure time
– Incorporates cosmic-ray rejection
• Cons:– Requires P(x,) slowly varying in (point sources).
• Essential papers:– Horne, K., 1986. PASP 98, 609
– Marsh, T. and Horne, K.
Wavelength calibration
• Select lines using peak threshold.
• Measure pixel centroid xi by computing x or fitting a gaussian
• Identify wavelengths i
• Fit polynomial (x) to i, i=1,...,N.
• Reject outliers (usually close blends)
• Adjust order of polynomial to follow structure without too much “wiggling”.
-100
0
100
200
300
400
500
0 20 40 60 80
threshold level
Dealing with flexure
• Flexure of spectrograph causes position xi of a given wavelength to drift with time.
• Measure new arcs at every new telescope position.
• Interpolate arcs taken every 1/2 to 1 hour when observing at same position.
• Master arcfit: Use a long-exposure arc (or sum of many short arcs) to measure faint lines and fit high-order polynomial.
• Then during night take short arcs to “tweak” the low-order polynomial coefficients.
Statistical issues raised
• Outlier rejection: what causes outliers, and how do we deal with them?
– Robust statistics.
• Polynomial fitting: how many polynomial terms should we use?
– Too few will under-fit the data.
– Too many can introduce “flailing” at ends of range.
• We’ll deal with these issues in the next lecture.