728 The Wavelength Solution: An Initial Guess That Decides

Sections §700.1 and §456.8 traced the reference wavelengths backward, from the arc line list to the energy levels to the metre. This subsection goes the other way: it takes a raw SDSS arc exposure, in detector counts, and follows the procedure that converts a pixel index into a wavelength.

728.0.1 The procedure

The SDSS spectroscopic pipeline determines the wavelength solution in fitarcimage.pro, which begins by calling arcfit_guess.pro. That routine does not search for an assignment of observed peaks to catalogue lines. It synthesises an arc spectrum from the line list, cross-correlates it against the observation, and returns the Legendre coefficients that maximise the correlation:

  model[npad+iloc:npad+iloc+1] += intensity[iline] * [1-dx/dpix, dx/dpix]
  corrval = max( c_correlate(speccorr, model, lags), icorr )
  if (corrval GT bestcorr) then bestcorr = corrval

The search is confined to a neighbourhood of a fixed starting point. In configuration__define.pro:

  function configuration::spcalib_arcfitguess_acoeff, color
    if (self->isSDSS2()) then begin
      if (color EQ 'blue') then return, [3.6930, -0.1044, -0.0041, 0.00016]
      if (color EQ 'red')  then return, [3.8700,  0.1008, -0.0044, -0.00022]
    endif
    if (color EQ 'blue') then return, [3.6846659, 0.19959101, -0.023845067,
                                       0.0012433996]
    if (color EQ 'red')  then return, [3.8927011, 0.16506676, -0.018754040,
                                       0.0011861915, -1.1795306e-05,
                                       -2.4502617e-05]
  end

  function configuration::spcalib_arcfitguess_dcoeff, color
    if self->isSDSS2() then return, 0
    return, [0.15, 0.008, 0.0003, 0.0001, 1e-5, 1e-5]
  end

The first coefficient is \(\log _{10}\lambda \) at the centre of the detector: \(3.6930\) corresponds to \(4932\) Å. No derivation of these values appears in the source.

728.0.2 The exhaustive assignment does not exist

A raw blue-camera arc frame was taken from the SDSS DR17 archive (sdR-b1-00169793.fit.gz), overscan-subtracted, and a central column block extracted. Seventeen peaks were detected above the pipeline’s own threshold. The line list lamphgcdne.dat contains \(24\) entries flagged GOOD in the blue range.

Enumerating all \(\binom {24}{17} = 346\,104\) assignments of peaks to lines and fitting a degree-\(7\) Legendre polynomial to each, the number satisfying the pipeline’s own tolerance of maxdev\(\,=1\times 10^{-5}\) in \(\log \lambda \) (\(23\) ppm) is

\[ 0 . \]
The best assignment over \(2\times 10^{5}\) sampled combinations has an rms residual of \(3714\) ppm, two orders of magnitude outside tolerance. The same holds at polynomial degrees \(3\), \(5\) and \(9\).

The assignment is therefore not recoverable from the frame and the line list alone. The pipeline does not attempt it; it starts from the fixed coefficients above and refines within dcoeff.

728.0.3 Moving the starting point

Reimplementing arcfit_guess and varying only the first coefficient, with the line list and the frame held fixed:

\[ \begin {array}{rrrrr} a_0 & \lambda _{\rm centre}\,[\text {\AA }] & \text {bestcorr} & \lambda \ \text {range}\,[\text {\AA }] & \lambda (\text {peak 1})\,[\text {\AA }] \\ \hline 3.5930 & 3917 & 0.4819 & 3054-4935 & 4481.64 \\ 3.6430 & 4395 & 0.4539 & 3393-5584 & 5054.49 \\ 3.6730 & 4710 & \mathbf {0.4858} & 3638-5987 & 5415.86 \\ 3.6930 & 4932 & 0.4587 & 3827-6241 & 5656.56 \\ 3.7130 & 5164 & 0.4401 & 4025-6504 & 5907.98 \\ 3.7430 & 5534 & 0.4373 & 4334-6938 & 6314.25 \\ 3.7930 & 6209 & 0.3458 & 4795-7895 & 7138.83 \\ \end {array} \]
The same detector pixel is assigned wavelengths from \(4482\) to \(7139\) Å, a range of \(2657\) Å or \(60\%\).

Two features of this table matter. The first is that the correlation is a weak discriminator: it varies only between \(0.35\) and \(0.49\) across a range in which the wavelength scale changes by more than half. The second is that the distributed value does not maximise it. At \(a_0 = 3.6730\) the correlation is \(0.4858\) and at \(a_0 = 3.5930\) it is \(0.4819\), both above the \(0.4587\) obtained with the shipped \(3.6930\). Selecting the starting point by the criterion the routine optimises would not return the value the pipeline uses.

728.0.4 Using the other camera’s starting point

Substituting the red-camera coefficients \([3.8700, 0.1008, -0.0044, -0.00022]\) into the same blue frame, with the same blue line list, yields a correlation of \(0.3572\) against \(0.4587\), and assigns the first peak \(6547.68\) Å instead of \(5656.56\) Å — a difference of \(891\) Å from changing four numbers in a configuration file.

728.0.5 The line list is nearly irrelevant

The list lamphgcdne.dat carries per-line quality flags assigned by hand. Twenty-five entries bear an explicit adjudication in the comment field: twenty-one DRL declares too faint, three DRL declares blended, and one Added by DRL with a URL. Four further lines are commented out entirely. The header records the provenance:

  # Calibration lines for Lick, Schlegel, 22 June 1995
  # Wavelengths in air from Handbook of Chemistry & Physics 67th edition, 1987

Repeating the fit with four different admitted subsets:

\[ \begin {array}{lrrr} \text {line set} & N & \text {bestcorr} & \lambda (\text {peak 1})\,[\text {\AA }] \\ \hline \texttt {GOOD} \text { only} & 24 & 0.4636 & 5656.56 \\ \texttt {GOOD}+\texttt {BLEND} & 44 & 0.4601 & 5656.56 \\ \text {all active} & 58 & 0.4587 & 5656.56 \\ \text {including commented-out} & 60 & 0.4580 & 5656.56 \\ \end {array} \]
The assigned wavelength is identical to the last decimal in all four cases. The hand adjudications — which lines are too faint, which are blended, which are excluded — change the correlation in the fourth decimal and change the result not at all.

This is worth stating precisely. The manual curation is visible and appears consequential; it is not. What determines the answer is the four-number starting point, which carries no annotation of any kind.

728.0.6 The starting point changes with the epoch

The coefficients are selected by a method test, isSDSS2, defined as

  return, self.mjd lt self.sdss3_start_mjd     ; sdss3_start_mjd = 55000

Frames from before MJD \(55\,000\) receive the four-coefficient SDSS-2 values and \(\texttt {dcoeff} = 0\), disabling the search entirely; frames from after receive a different four-coefficient set for the blue camera and a six-coefficient set for the red. The first-order coefficients differ in sign between the two eras, \(-0.1044\) against \(+0.19959101\), and the source records why in a commented-out block:

  ; The following are for the BOSS commissioning data w/out rotating the images
  ;  if (color EQ 'blue') then return, [3.6846659,-0.19959101, ...]

The sign encodes the readout orientation of the detector. An exposure taken one day either side of the boundary is reduced with a different initial guess, a different number of coefficients, and — for SDSS-2 — no search at all.

728.0.7 Amplifier crosstalk

The same configuration file carries \(4\times 4\) crosstalk matrices, one per camera, applied before extraction:

\[ \begin {array}{ll} \texttt {b1} & [1,\ 1.269\times 10^{-4},\ 1.034\times 10^{-4},\ 1.323\times 10^{-5}] \\ \texttt {b2} & [8.453\times 10^{-5},\ 1,\ 4.060\times 10^{-5},\ 2.956\times 10^{-3}] \\ \end {array} \]
for the first and second rows respectively. The \(\texttt {b2}\) entry \(2.956\times 10^{-3}\) is \(27\) times the corresponding \(\texttt {b1}\) value. The matrices are given to six significant figures and no measurement procedure or date is recorded for them.
728.0.8 Summary
\[ \begin {array}{lll} \text {what is varied} & \text {effect on } \lambda (\text {peak 1}) & \text {documented?} \\ \hline a_0:\ 3.5930 \to 3.7930 & 4482 \to 7139\ \text {\AA } & \text {no derivation} \\ \text {blue} \to \text {red starting point} & 5657 \to 6548\ \text {\AA } & \text {no} \\ \text {MJD across } 55\,000 & \text {different set, sign flip} & \text {commented} \\ \text {line list: } 24 \to 60\ \text {lines} & \text {no change} & \text {25 hand flags} \\ \text {exhaustive assignment} & \text {no solution within tolerance} & - \\ \end {array} \]

The wavelength of a pixel is fixed by four undocumented numbers selected by observation date. The assignment of peaks to catalogue lines, which the procedure is nominally performing, is not determined by the data: enumerating all \(346\,104\) possibilities returns none within the pipeline’s own tolerance. The manual curation of the line list, the only part of the chain bearing explicit human annotation, does not affect the result.

Data

SDSS DR17 spectrum spec-0266-51630-0004.fits (legacy reduction redux/26, \(3819\) pixels, pipeline \(z = 0.0646563 \pm 2.07\times 10^{-5}\)) and the raw blue-camera arc frame sdR-b1-00169793.fit.gz, both from data.sdss.org; the arc line list etc/lamphgcdne.dat and the initial-guess coefficients in pro/config/configuration__define.pro, from the idlspec2d source distribution.

pict
Figure 935: (a) The raw blue-camera arc frame reduced to a central-column spectrum, with the \(17\) peaks detected above the pipeline’s own threshold. (b) Number of peak-to-line assignments satisfying the pipeline tolerance of \(23\) ppm, for each admitted subset of the line list; all are zero.
pict
Figure 936: (a) The wavelength solution returned by arcfit_guess for the same arc frame and the same line list, varying only the first coefficient of the starting point over \(a_0 = 3.5930\) to \(3.7930\). The distributed value is \(3.6930\). A given pixel is assigned wavelengths spanning \(2657\) Å. (b) What the routine cross-correlates: the observed arc spectrum against a synthetic spectrum built from the line list under the trial solution. The correlation varies only between \(0.35\) and \(0.49\) across the full range in (a), and is not maximised at the distributed value.
pict
pict
pict
pict

728.1 The Logarithmic Wavelength Grid

A reduced SDSS spectrum is not sampled at the detector pixels. It is resampled onto a grid uniform in \(\log _{10}\lambda \), with spacing fixed in wavevector.pro as

  binsz = 1.0d-4

and written into every spectrum header as COEFF1 \(= 0.0001\). Because a uniform logarithmic grid is uniform in velocity, this constant sets the velocity width of a pixel:

\[ \Delta v = c\ln (10)\,q = 69.03\ \mathrm {km\,s^{-1}}, \qquad q = 10^{-4}. \]
The quoted redshift uncertainty on the spectrum examined here is \(\sigma _z = 2.07\times 10^{-5}\), or \(5.82\ \mathrm {km\,s^{-1}}\). One resampled pixel is therefore twelve times the stated error.
728.1.1 Varying the grid constant

Spectrum spec-0266-51630-0004 (plate \(266\), MJD \(51\,630\), fiber \(4\); \(3819\) native pixels, pipeline \(z = 0.064656 \pm 2.07\times 10^{-5}\)) was resampled onto grids of different \(q\) and the redshift redetermined by the same line-matching procedure in each case. Only \(q\) was varied.

\[ \begin {array}{rrrrr} q & \Delta v\,[\mathrm {km\,s^{-1}}] & N_{\rm pix} & z & \delta v\ \text {vs}\ q{=}10^{-4} \\ \hline 2.50\times 10^{-5} & 17.26 & 15272 & 0.064760 & +92.91 \\ 5.00\times 10^{-5} & 34.51 & 7636 & 0.064700 & +76.03 \\ 7.50\times 10^{-5} & 51.77 & 5091 & 0.064250 & -50.70 \\ 1.00\times 10^{-4} & 69.03 & 3818 & 0.064430 & 0 \\ 1.50\times 10^{-4} & 103.54 & 2546 & 0.064060 & -104.25 \\ 2.00\times 10^{-4} & 138.06 & 1909 & 0.064250 & -50.70 \\ 3.00\times 10^{-4} & 207.09 & 1273 & 0.113090 & +13105.77 \\ 5.00\times 10^{-4} & 345.15 & 764 & 0.062700 & -488.04 \\ 1.00\times 10^{-3} & 690.30 & 382 & 0.061680 & -776.53 \\ \end {array} \]

Over the range tested the recovered redshift spans \(0.06168\) to \(0.11309\), a spread of \(\delta z = 5.14\times 10^{-2}\) or \(14\,413\ \mathrm {km\,s^{-1}}\). Against the quoted uncertainty this is \(2488\,\sigma \).

The row at \(q = 3\times 10^{-4}\) is not a gradual degradation. The recovered redshift jumps from \(0.064\) to \(0.113\): at \(207\ \mathrm {km\,s^{-1}}\) per pixel the line pattern is coarse enough that a different alignment of the same features scores higher, and the fit lands on a different solution entirely. Restricting attention to \(q \leq 2\times 10^{-4}\), where the fit remains on the correct branch, the spread is still \(197\ \mathrm {km\,s^{-1}}\), or \(34\sigma \).

728.1.2 The origin of the grid

Holding \(q = 10^{-4}\) and shifting only the starting point of the grid by a fraction of a pixel:

\[ \begin {array}{rrr} \text {offset [pix]} & z & \delta v\,[\mathrm {km\,s^{-1}}] \\ \hline -0.50 & 0.064310 & 0 \\ -0.25 & 0.064370 & 16.90 \\ 0.00 & 0.064430 & 33.80 \\ +0.25 & 0.064250 & -16.90 \\ +0.50 & 0.064310 & 0 \\ \end {array} \]
The full range is \(50.7\ \mathrm {km\,s^{-1}}\), or \(8.7\sigma \), from the choice of where the first grid point falls — a quantity with no physical content. The recovered redshift is quantised in steps of \(16.9\ \mathrm {km\,s^{-1}}\), which is the scan step of the fit, not a property of the spectrum.
728.1.3 The interpolation kernel does not matter

Repeating the resampling with nearest-neighbour, linear, quadratic and cubic interpolation at \(q = 10^{-4}\) returns \(z = 0.064430\) in all four cases, to six decimal places.

This is worth recording because it is the operation most likely to be suspected and it is not the one that matters. The native spacing of the reduced spectrum is \(9.990\times 10^{-5}\), within \(0.1\%\) of the target grid, so the resampling is close to the identity and the kernel is irrelevant. The effect in the preceding tables comes from the grid itself, not from how values are moved onto it.

728.1.4 The line set

Holding \(q = 10^{-4}\) and the grid fixed, varying only which rest-frame lines are matched:

\[ \begin {array}{lrrr} \text {line set} & N & z & \delta v\,[\mathrm {km\,s^{-1}}] \\ \hline \text {all} & 11 & 0.064430 & 0 \\ \text {emission only} & 7 & 0.064430 & 0 \\ \mathrm {H}\alpha \ \text {only} & 1 & 0.064860 & 121.1 \\ \text {Mg\,b} + \text {Na\,D} & 2 & 0.076830 & 3452.2 \\ {}[\mathrm {O\,III}] + \mathrm {H}\alpha & 2 & 0.113060 & 13098.0 \\ \text {absorption only} & 4 & 0.358860 & 64957.3 \\ \text {Balmer only} & 4 & 0.358920 & 64967.7 \\ \end {array} \]

The emission set reproduces the full result exactly; the absorption set returns \(z = 0.3589\), a redshift \(5.6\) times larger. With four Balmer lines alone the answer is the same wrong value, because the Balmer spacing admits an alignment at that redshift that the other lines would exclude.

A single line cannot fix a redshift, and a set of lines with commensurate spacings can be aligned at more than one \(z\). Which solution is returned is decided by which lines the fit is told to use.

728.1.5 Summary
\[ \begin {array}{lrr} \text {what is varied} & \delta v\,[\mathrm {km\,s^{-1}}] & /\sigma _z \\ \hline \text {line set} & 64\,968 & 11\,163 \\ \text {grid constant } q\ (2.5\times 10^{-5}\text {--}10^{-3}) & 14\,413 & 2\,477 \\ \text {grid constant, correct branch only} & 197 & 34 \\ \text {grid origin } (\pm 0.5\ \text {pix}) & 50.7 & 8.7 \\ \text {interpolation kernel} & 0 & 0 \\ \hline \text {one resampled pixel} & 69.03 & 11.9 \\ \text {quoted } \sigma _z & 5.82 & 1 \\ \end {array} \]

The reported uncertainty is a template-fit statistic conditional on the grid being \(10^{-4}\), on the grid origin, and on the line set. Each of those is a choice made in a source file: binsz = 1.0d-4 in wavevector.pro, the starting wavelength in the coaddition, and the eigenspectrum or line list passed to the fit. None carries a derivation in the code, and the smallest of their effects exceeds the quoted error by a factor of nine.

728.2 The interpolation kernel, and why it registers nothing

Repeating the resampling at \(q = 10^{-4}\) with nearest-neighbour, linear, quadratic and cubic interpolation returns \(z = 0.064430\) in all four cases, to six decimal places.

The reason is that there is nothing to interpolate. The native spacing of the released spectrum is \(9.9897\times 10^{-5}\), a ratio of \(1.00103\) to the target grid: the coadded spectrum was already placed on a \(10^{-4}\) logarithmic grid when it was produced. Resampling it onto \(10^{-4}\) is close to the identity map, and every kernel agrees because every kernel is evaluated at points that nearly coincide with the samples.

This is not evidence that the kernel is harmless. It is evidence that the choice was made upstream and is no longer available. To see what the kernel does, the grids must be made incommensurate:

\[ \begin {array}{rrrrrrr} q & q/q_{\rm nat} & \text {linear} & \text {nearest} & \text {cubic} & \delta v_{\rm near} & \delta v_{\rm cub} \\ \hline 1.00\times 10^{-4} & 1.00 & 0.064425 & 0.064425 & 0.064425 & 0.0 & 0.0 \\ 1.05\times 10^{-4} & 1.05 & 0.064353 & 0.064353 & 0.064098 & 0.0 & -71.8 \\ 1.30\times 10^{-4} & 1.30 & 0.064108 & 0.064098 & 0.064108 & -2.8 & 0.0 \\ 1.70\times 10^{-4} & 1.70 & 0.064083 & 0.076508 & 0.076508 & +3500.6 & +3500.6 \\ 2.00\times 10^{-4} & 2.00 & 0.064247 & 0.064247 & 0.064247 & 0.0 & 0.0 \\ 2.50\times 10^{-4} & 2.50 & 0.063925 & 0.063690 & 0.065063 & -66.2 & +320.5 \\ \end {array} \]
in km s\(^{-1}\) relative to linear.

At ratios that are integers the three kernels agree, because the target points fall on native samples. At \(1.05\) the cubic kernel departs by \(72\ \mathrm {km\,s^{-1}}\) from linear; at \(2.50\) the three span \(387\ \mathrm {km\,s^{-1}}\). At \(1.70\) nearest-neighbour and cubic both land on \(z = 0.0765\) while linear stays at \(0.0641\) — a difference of \(3501\ \mathrm {km\,s^{-1}}\), or \(601\,\sigma _z\), from the choice of interpolation alone.

Adding a fractional shift of the grid origin at \(q = 1.3\times 10^{-4}\):

\[ \begin {array}{rrrrr} \text {offset [pix]} & \text {linear} & \text {nearest} & \text {cubic} & \text {spread}\,[\mathrm {km\,s^{-1}}] \\ \hline 0.00 & 0.064108 & 0.064098 & 0.064108 & 2.8 \\ 0.17 & 0.064163 & 0.064163 & 0.064163 & 0 \\ 0.33 & 0.064213 & 0.064213 & 0.064213 & 0 \\ 0.50 & 0.064268 & 0.076595 & 0.064268 & 3459.2 \\ 0.67 & 0.064320 & 0.064320 & 0.064320 & 0 \\ \end {array} \]
At a half-pixel offset the nearest-neighbour kernel is exactly ambiguous and breaks the tie in a direction that moves the recovered redshift by \(3459\ \mathrm {km\,s^{-1}}\). At the other four offsets all three agree.

The behaviour is not a smooth sensitivity that could be quoted as an error term. It is flat over most of the parameter space and jumps by thousands of \(\mathrm {km\,s^{-1}}\) at particular commensurabilities between the two grids, where the fit crosses onto a different branch. Whether a given reduction sits near such a point is not visible in its output.

pict