Practical applications: CCD spectroscopy

Download Report

Transcript Practical applications: CCD spectroscopy

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:
x

• To minimise slit losses due to differential
refraction, rotate slit to “parallactic angle”
To
zenith
– i.e. keep it vertical:
• Spectra are then tilted or curved due to
– camera distortions
– Differential refraction
Night
sky lines
Target spectrum
x

(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 are
D(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 since F ~ 1
Tracing the spectrum
x
• 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
x
x0

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 nightsky 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:
Slices across
spectrum
at=const:
 on edge of night-sky
emission line
Target
Ref
star
x
 away from night-sky
emission line
Target
Ref
“Normal” extraction
• Subtract sky fit, and
sum the counts
between object limits:
A
Slice across
spectrum at
=const:
x2
 D(x)  S(x)
x x1
Var(A ) 
S(x)
x2
 Var D(x)
x x1
• Dilemma: How do we
pick x1, x2?
– too wide: too much noise
– too narrow: lose counts
x
x1
x2
Optimal extraction
• 1) Scale profile to fit the data:
D(x)  S(x)  AP(x)
Slice across
spectrum at
=const:
Starlight
profile P(x)
2

D(x)

S(x)

P(x)
/

(x)

x
Aˆ 
2
2
P
(x)
/

(x)
x
• 2) Compute (x) from the model:
S(x)  Aˆ P(x)
 (x)   (x) 
G
2
2
0
• 3) -clip to “zap” cosmic-ray hits.
• Iterate 1 to 3, since (x) depends
on A:
1
Var( Aˆ ) 
2
2
P
(x)
/

(x)
x
S(x)
x
x1
x2
Estimating the profile P(x)
2 rows bel ow
0.3
0.25
1 row below
0.2
0.15
1 row above
0.1
0.05
3 rows above
Centr e r ow
2 rows above
0
-0.05
0
20
40
60
80
Column 20
Column 60
3
2
1
0
-1
-2
3
2
0.2
0.15
0.1
0.05
0
1
0.2
0.15
0.1
0.05
0
0
0.4
0.35
0.3
0.25
-1
0.4
0.35
0.3
0.25
-3
Column ( )
-2
• 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.
0.4
0.35
-3
D S
 x (D  S)
0.45
Fract ion of st arlight in
row
• The fraction of the
starlight that falls in
row x varies along the
spectrum and is given
by:
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
500
400
300
200
100
threshold level
0
-100
0
20
40
60
80
• 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”.
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.