A&A 535, A129 (2011) Astronomy DOI: 10.1051/0004-6361/201015702 & c ESO 2011 Astrophysics

Stray- contamination and spatial deconvolution of slit-spectrograph observations

C. Beck1,2, R. Rezaei3, and D. Fabbian1,2

1 Instituto de Astrofísica de Canarias (CSIC), Vía Láctea, 38205 La Laguna, Tenerife, Spain e-mail: [cbeck,damian]@iac.es 2 Departamento de Astrofísica, Universidad de La Laguna, 38206 La Laguna, Tenerife, Spain 3 Kiepenheuer-Institut für Sonnenphysik, Schöneckstr. 6, 79104 Freiburg, Germany e-mail: [email protected] Received 7 September 2010 / Accepted 9 September 2011

ABSTRACT

Context. Stray light caused by scattering on optical surfaces and in the Earth’s atmosphere degrades the spatial resolution of ob- servations. Whereas post-facto reconstruction techniques are common for 2D imaging and spectroscopy, similar options for slit- spectrograph data are rarely applied. Aims. We study the contribution of stray light to the two channels of the POlarimetric LIttrow Spectrograph (POLIS) at 396 nm and 630 nm as an example of a slit-spectrograph instrument. We test the performance of different methods of stray-light correction and spatial deconvolution to improve the spatial resolution post-facto. Methods. We model the stray light as having two components: a spectrally dispersed component and a “parasitic” component of spectrally undispersed light caused by scattering inside the spectrograph. We used several measurements to estimate the two contribu- tions: a) observations with a (partly) blocked field of view (FOV); b) a convolution of the FTS spectral atlas; c) imaging of the spider mounting in the pupil plane; d) umbral profiles; and e) spurious polarization signal in telluric spectral lines. The measurements with a partly blocked FOV in the focal plane allowed us to estimate the spatial point spread function (PSF) of POLIS and the main spec- trograph of the German Vacuum Tower Telescope (VTT). We then used the obtained PSF for a deconvolution of both spectroscopic and spectropolarimetric data and investigated the effect on the spectra. Results. The parasitic contribution can be directly and accurately determined for POLIS, amounting to about 5% (0.3%) of the (con- tinuum) intensity at 396 nm (630 nm). The spectrally dispersed stray light is less accessible because of its many contributing sources. We estimate a lower limit of about 10% across the full FOV for the dispersed stray light from umbral profiles. In quiet regions, the stray-light level from the close surroundings (d < 2) of a given spatial point is about 20%. The stray light reduces to below 2% at a distance of 20 from a lit area for both POLIS and the main spectrograph. The spatial deconvolution using the PSF obtained improves the spatial resolution and increases the contrast, with a minor amplification of noise. Conclusions. A two-component model of the stray-light contributions seems to be sufficient for a basic correction of observed spectra. The instrumental PSF obtained can be used to model the off-limb stray light, to determine the stray-light contamination accurately for observation targets with large spatial intensity gradients such as sunspots, and also to improve the spatial resolution of observations post-facto. Key words. methods: data analysis – line: profiles – Sun: chromosphere

1. Introduction treatment of this contamination by using a separately provided stray-light profile (see also, e.g., Orozco Suárez et al. 2007a,b). The importance of stray-light contributions to observed spectra For analysis techniques that make direct use of the observed and images was realized very early on and continues to be a spectra or of broad-band images, the stray light has to be dealt problem today (see, e.g., Henoux 1969; Mattig 1971; Martinez with in advance. This problem had to be tackled in the con- Pillet 1992; Chae et al. 1998; Wedemeyer-Böhm 2008; DeForest text of the accurate determination of sunspot intensities to de- et al. 2009; Mathew et al. 2009). The intrinsically limited opti- rive their temperature at continuum forming layers (Kneer & cal quality of the reflective surfaces of or of the glass of Mattig 1968; Maltby & Mykland 1969; Maltby 1970; Mattig leads to scattering of photons in the light path. In addition, 1971; Tritschler & Schmidt 2002) or in the determination of scattering during the passage through the Earth’s atmosphere by, the continuum contrast of solar granulation (Mathew et al. 2009; for instance, dust particles spreads the light from the full solar Wedemeyer-Böhm & Rouppe van der Voort 2009). It is also im- disk to any point of an observed restricted field of view (FOV). portant in studies of solar chemical abundances that seek to de- Depending on the wavelength and the target of the observations, rive consistent results from different spectral lines (Asplund et al. the stray light can amount to a significant fraction of the ob- 2009; Fabbian et al. 2010). served intensity and can have a strong impact on the final results The stray-light contribution is often decomposed in differ- of the data analysis. Therefore, many inversion codes that deter- ent sources: 1. the atmospheric stray light caused by large-scale mine physical quantities from observed spectra, such as the SIR scattering in the Earth’s atmosphere, with a slow temporal evo- code (Ruiz Cobo & del Toro Iniesta 1992), include an explicit lution because of the change of air-mass in the light path during Article published by EDP Sciences A129, page 1 of 13 A&A 535, A129 (2011) the day; 2. the “blurring”, i.e., the rapidly changing amount of case of ground-based observations. For intrinsically 2D observa- stray light caused by the fluctuations of the refractive index in the tions, whether broad-band imaging or narrow-band spectroscopy Earth’s atmosphere (which are nowadays commonly referred to or spectropolarimetry with suitable 2D instruments (see, e.g., as “seeing”); and 3. instrumental stray light, i.e., scattering in the Tritschler et al. 2002; Mikurda et al. 2006; Cavallini 2006; telescope/instrument or (static) stray-light effects of the Puschmann et al. 2006; Scharmer et al. 2008; Beck et al. 2010), telescope/instrument caused by the geometry of the finite aper- the instantaneous PSF can be estimated using series of rapid ture and the possible presence of (central) obscurations in the short-exposed images. Two different approaches, speckle imag- light path (Zwaan 1965; Staveland 1970; Mattig 1983; Martinez ing (e.g., von der Lühe 1993) and blind deconvolution (e.g., Pillet 1992; Wedemeyer-Böhm 2008). For space-based observa- van Noort et al. 2005, and references therein), then allow a post- tions, naturally, the first two points are absent. facto reconstruction of the most probable original solar image The stray-light contamination is quantified in the “spread that lies behind the observed image series. The reconstruction function”, whose large-scale and small-scale contributions are algorithms are, however, only capable of recovering the instan- usually approximated as analytical functions of varying shapes, taneous PSF within some limits and are also partially blind to e.g., Gaussian or Lorentzian, or with combinations of a number the static parts of the PSF (Scharmer et al. 2010). of them (Mattig 1971; Wedemeyer-Böhm 2008; DeForest et al. For slit-spectrograph observations, at any given moment of 2009; Mathew et al. 2009). For describing the purely instrumen- time, only a 1D slice of the solar surface is available, whereas tal effects without temporal dependence and in night-time as- the PSF is a 2D function that therefore also introduces stray tronomy, the label “spatial point spread function” (PSF) is com- light from locations that are not covered by the slit in that mo- monly used because the function describes the spatial shape that ment. Thus, even if both the static and the time-variant parts the light from a point source (as a star can be approximated to of the PSF are known, it is not straightforward to use this in- be) would attain after passing through the optical system. formation to improve the spatial resolution of slit-spectrograph To determine the exact shape of the spread function, either data post-facto. Keller & Johannesson (1995)andSütterlin & theoretical calculations of the optical systems or observations Wiehr (2000) introduced a method similar to a speckle deconvo- with an only partly illuminated FOV are used. The theoretical lution, requiring a fast series of slit-spectra. In our contribution, calculations are usually limited to the time-invariant effects of we tested the application of a post-facto correction of “standard” the optics, while for the varying contributions from, e.g., the slit-spectrograph data for the static part of the instrumental PSF seeing only some statistically averaged effects may be assumed. as obtained from a dedicated set of measurements. For determining the spread function in the solar case, suitable The stray-light contribution becomes significant when the observations can be obtained in different ways (Mattig 1971; light level in observations is low, as for observations of sunspots, Briand et al. 2006; Wedemeyer-Böhm 2008; DeForest et al. near the solar limb, or for spectroscopy of very deep spec- 2009), namely by planetary transits in front of the Sun, by ob- tral lines such as Hα or Ca ii H. For a recent study of the servations near and off the solar limb, or by artificial occulters in center-to-limb variation (CLV) of Ca ii H spectra taken with the the light path. Planetary transits are actually the best suited be- POlarimetric LIttrow Spectrograph (POLIS; Beck et al. 2005) cause they provide the perfect reference of an intrinsically zero at the German Vacuum Tower Telescope (VTT, Schröter et al. light level, but the diameters of the planets are usually smaller 1985), we thus had to investigate the stray-light contamination than the extent of the PSF and thus do not allow to determine the in detail. During the CLV run and some of the subsequent obser- far wings of the PSF; moreover, transits are rare events. Thus, vational campaigns, we obtained various data sets for character- the radial variation of the residual intensity beyond the solar izing the stray-light contamination for both POLIS and the main limb (“aureole”) has often been used to determine the spread spectrograph of the VTT. Because the measurements also allow function of ground-based telescopes. Some of the older observa- one to estimate the spatial PSF of the instrument, we addition- tions, however, have to be treated with some care because they ally investigated the option of using the known PSF for a spatial were done with telescopes without an aperture field stop; i.e., the deconvolution of the slit-spectrograph observations. telescopes created a full-disk solar image in the focal plane with- In Sect. 2, we outline the basic approaches to correcting out a restriction to a limited FOV. This implies that there was a stray light based on the observed spectra and generic estimates large contribution from the full-disk stray light in those obser- at first (Sect. 2.1), and then explicitly taking the instrumental vations. Additionally, these data were usually obtained without PSF into account (Sect. 2.2). The measurements used to derive active compensation for seeing effects by a correlation tracker the generic stray-light estimates and the PSF are described in (Ballesteros et al. 1996) or adaptive optics (AO, von der Lühe Sect. 3. Section 4 shows examples of the application of both the et al. 2003; Scharmer et al. 2003; Rimmele 2004), therefore mix- stray-light correction and the deconvolution to a few data sets. ing seeing and atmospheric scattering. Mattig (1983) found that The application to observational data allowed us to cross-check the stray light from near the solar limb (up to one solar radius and improve the stray-light estimates. Section 5 shows the rela- above it) is dominated by instrumental and seeing effects. The at- tion between the generic stray-light correction and the explicit mospheric scattering only becomes dominant at larger distances use of the PSF for a few data sets. Our findings are discussed in to the Sun or in the case of coronagraphs, where the illumination Sect. 6. Section 7 presents the conclusions. from the solar disk is blocked inside the telescope optics. Briand et al. (2006) show that the determination of the spread function from the aureole does not necessarily provide a good measure 2. Theoretical description of the stray-light problem of the instrumental stray light because the telescope/instrument optics are only partly illuminated near the limb, which yields a The transfer through the optical system composed of the (fluc- different amount of scattering than for the full illumination on tuating) atmosphere of the Earth, the telescope, and finally the disk center. instrument modifies the real intensity distribution Itrue and yields Even if the static instrumental part of the PSF is known instead an observed intensity Iobs that is related to Itrue by from either calculations or measurements, the time-variant part caused by the Earth’s atmosphere is usually unknown in the Iobs(t) = PSF(t) ⊗ Itrue(t) , (1)

A129, page 2 of 13 C. Beck et al.: Stray-light contamination and spatial deconvolution of spectrograph observations

where “dc” denotes the dark current of the CCD. Itrue(λ, x,y)is the spectrum that emerges from the spatial location (x,y)onthe Sun that corresponds to the CCD pixel row y when the slit is located at position x on the solar image. The average intensity spectrum before the first focal plane F1 is denoted by Iglobal(λ); the full solar disk contributes to it. Because of the CLV of the solar intensity, Iglobal(λ) will be dominated by contributions from the disk center and its surroundings, and its shape is independent of the telescope pointing. This term corresponds to the integra- tion over the full solar disk weighted by a spread function, as done in, e.g., Mattig (1971). It can be assumed that the stray-light level proportional to Iglobal(λ) is uniform across the FOV, with no direct relation to the solar location (x,y)whereItrue(λ, x,y)orig- inates. Scattering by any of the optical elements in front of F1 will only need to produce slight beam deviations from the optical axis to spill light from the full aperture to each location on the focal plane because of the long path length before F1 is reached. The factor α1 then refers to all nine optical elements in front of F1 (7 mirrors and 2 glass windows, see the upper part of Fig. 1). The average intensity spectrum behind F1, Ilocal(λ), comes only from a restricted FOV and not from the full solar disk be- cause of the field stop in the filter wheel near F1. The shape of Ilocal(λ) depends on the telescope pointing. For the CLV obser- vations, we used an aperture field stop with a diameter of 40 mm (≈180). The diameter of the field stop in F2 inside of POLIS is similar to the one of the field stop in F1. The stray light propor- tional to Ilocal(λ) actually is made up of two contributions: I(λ)dA A α2 Ilocal(λ) = α4 Fig. 1. Sketch of the light path at the VTT (drawing not to scale). Focal dA planes are denoted by blue rectangles, pupil planes by brown ones. Red A rectangles denote an artificial blocking of the light path. The 45-deg + PSFinstr(Δx, Δy) × I(λ, Δx, Δy)(Δx,Δy), (4) behind the relay optics was used to direct the light to either the Δ , Δy PCO setup or towards POLIS. The design of POLIS is shown in side where A is the area of the field stop in F1, and ( x ) the dis- view up to the location of the slit (upper panel at lower right) and in top tance between (x,y) and all other points inside the FOV that pass view for the rest of the optics (lower panel at lower right). through the field stop. The first term is caused by the fact that the optical elements between F1 and F4 will uniformly mix the light across the full where PSF(t) is the instantaneous optical point spread function aperture of the field stop (as was the case for the optics upfront of and ⊗ denotes a convolution. F1), especially because there are three additional pupil planes in- The three contributions to the PSF are explained in the intro- between. The second term depends on the spatial PSF of POLIS duction above. For observations with real-time correction by an that introduces a strongly field-dependent stray-light contribu- AO system, the atmospheric part is already (partially) corrected tion to the spectrum from locations close to (x,y)when(Δx, Δy) for, leaving the large-scale atmospheric scattering and the static is smaller than about 10 (see Sect. 3.4). PSFinstr only refers to contributions from optics. The PSF spills the light from one loca- the optics behind F1. We assume that both contributions on the tion into its surroundings and vice versa, which adds additional right-hand side of Eq. (4) can be modeled as being proportional intensity to all points in the FOV via false light originating in to the same profile Ilocal(λ) because in quiet Sun regions averag- other locations in the FOV, the so-called stray-light contamina- ing over a small (a few arcsecs2) or large (several ten arcsecs2) tion. To apply a correction for the stray-light contamination, we area inside the local FOV will yield a similar profile. The fac- first derive a direct approach based on only the observed spectra tor α2 then refers to all optics between F1 and F4 (for POLIS: and a generic estimate of the stray-light fraction in a simplified 15 mirrors, modulator, grating, interference filter, and the polar- approach in the next section, and a more explicit model taking izing beam splitter for the 630 nm channel). The stray-light con- the instrumental PSF into account in Sect. 2.2. tributions proportional to Iglobal(λ)andIlocal(λ) are both assumed to pass through a grating, and thus to be spectrally dispersed. 2.1. Modeling of stray-light contributions The “stray light” without wavelength dependence, the con- stant term in Eq. (2), again contains two contributions: the usual For the direct correction of the stray-light contamination, we dark current (dc) of the CCD cameras and a second contribution model the intensity spectrum Iobs(λ, x,y) on a certain CCD row that corresponds to light that reaches the CCD without passing in the focal plane of the POLIS CCD cameras (focal plane F4, through the grating, called “parasitic” light. The source of the see Fig. 1)as parasitic light photons in the case of POLIS is indicated schemat- λ, ,y = λ, ,y +α λ +α λ + , ically in Fig. 2, which shows the optical design of POLIS just in Iobs( x ) Itrue( x ) 1 Iglobal( ) 2 Ilocal( ) const. (2) front of the CCD cameras. In the light path behind the grating, with a small pick-up mirror is used to deflect the blue part (indicated by a blue ray in the figure) of the dispersed spectrum towards const. = dc + parasitic light = dc + α3 Ilocal  f (λ) , (3) the vertically mounted Ca ii H CCD camera (“blue channel”).

A129, page 3 of 13 A&A 535, A129 (2011)

2.2.1. First-order correction To derive a first-order correction for the stray light caused by the instrumental PSF, we reformulate and discretize Eq. (1)as Iobs(x,y) = Itrue(x,y) + K(x − x ,y− y )Itrue(x ,y) x ,y − K(x − x ,y− y )Itrue(x,y)(6) x ,y Fig. 2. Design of POLIS close to the CCD cameras in a side view (not to scale). “IF”: order selecting interference filters. The thin red rectangle = (1−α)Itrue(x,y)+ K(x−x ,y−y )Itrue(x ,y),(7) indicates the location where the light path was blocked for measuring x,y the parasitic stray light. where K is the kernel describing the instrumental PSF and the sums are to be executed for all x,y  x,y. The part of the spectrum at a longer wavelength (indicated in The last two terms on the right-hand side of Eq. (6) describe the figure by a red ray) instead passes below the pick-up mirror the stray light introduced into a location (x,y) from other lo- towards the channel at 630 nm (“red channel”). Spectrally undis- cations in the FOV (“gain” term) and the “loss” of intensity to persed scattered light inside the instrument (indicated in the fig- them, respectively. It can be shown that the first-order correction ure by black arrows) can reach the 630 nm channel CCD only for the gain term is given by from a small solid angle, whereas most of the scattered light that ii hits the pick-up mirror can still reach the Ca H CCD at some Itrue(x,y) = Iobs(x,y) − K(x − x ,y− y )Iobs(x ,y), (8) place. Because the solar light level in the near-UV is rather low, x,y especially in the line core of Ca ii H, additional photons can eas- ily lead to a detector count rate that is significant with respect to when all terms proportional to α, α2, K α, K2 are neglected (see the true solar spectrum. Appendix A). Equation (8) thus corresponds to the approach of The parasitic stray light is generated inside of POLIS. Its calculating the stray light that enters at (x,y) as the observed light level should therefore scale with the amount of light that intensity in the surroundings weighted by a PSF with a form as enters through the field stop in F2, which can be related to the in the second term on the right-hand side of Eq. (4). average of Ilocal.Thecoefficient α3 in Eq. (3) does not refer to For an application of the correction, one has to take into ac- any specific optical element. count that for slit-spectrograph observations the scanning direc- Equation (2) can be simplified for any practical applica- tion (denoted by x) and the direction along the slit (denoted by tion of a stray-light correction. The full aperture contributing y) are not fully equivalent. All spectra Iobs(x ,y)forx  x are to Ilocal(λ) is rather large, covering more than one supergran- taken at a different time t , and only the profiles in the individ- ular cell and therefore providing a large-scale average profile ual spectrum Iobs(x,y) are obtained simultaneously for all y . similar to a full-disk spectrum, and there are no means to de- Because the solar scene is changing with time during the scan- termine Iglobal(λ) from the observed spectra. We thus substituted ning, it can therefore be necessary to restrict the sum in x to the Iglobal(λ) with Ilocal(λ), even if for observations off the disk center temporally “close” surroundings instead of using the full range there should be some difference between the two spectra because of the known PSF. The time lag between two scan steps is given Ilocal(λ) changes with the telescope pointing. To apply the correc- by the integration time for each step tinteg times their distance Δx, tion to observations, we here implicitly assume that the average where Δx · tinteg should be significantly smaller than the typical profile Ilocal(λ) is always calculated from quiet Sun regions with granular time scale of about five minutes. a granular pattern. In the case of, e.g., sunspot observations, this The loss term in Eq. (7) could in principle be corrected for implies that only a subfield of the observed FOV is used for the as well using the value of α, but given the difficulty of achieving average. Because the dark current can be directly measured and high accuracy in its determination, that is not recommended. If subtracted, the simplified version of Eq. (2) then reads as the intensity normalization of the observed spectra is later done by normalizing an average profile after the correction to a the- λ, ,y = λ, ,y + α λ + β  . Iobs( x ) Itrue( x ) Ilocal( ) Ilocal (5) oretical or observed reference profile, the loss term will also be corrected for automatically by the normalization coefficient. The Even if the equation depends solely on two parameters, it turns first-order correction is easy to apply and does not introduce nu- out that determining α is far from straightforward. In Sect. 3,we merical problems when K is given, despite some eventual inter- describe the results of our several different approaches to deter- polation in the construction of a discrete 2D kernel. mine α and β.

2.2.2. Fourier deconvolution 2.2. Stray-light correction and spatial deconvolution usingaknownPSF In the Fourier domain, Eq. (1) transforms to ff To apply the stray-light correction, di erent approaches are pos- I˜ = K˜ · I˜ , (9) sible. One straightforward method is based on the simplified obs true Eq. (5). The knowledge of the instrumental PSFinstr also allows, where ˜ denotes the Fourier transform and only the static instru- however, more detailed methods to be used that take the spa- mental PSF described by the kernel K is considered. It can be tial dependence of stray light – as given by the second term on easily shown (e.g., DeForest et al. 2009) that for a known K the the right-hand side of Eq. (4) – fully into account. For such ap- reverse direction is given by proaches, we describe a first-order and a full correction by a de- −1 convolution in the following. I˜true = K˜ · I˜obs (10)

A129, page 4 of 13 C. Beck et al.: Stray-light contamination and spatial deconvolution of spectrograph observations where K˜ −1 is the element-wise inverse operator for the Fourier transform of K. The application of Eq. (10) exceeds the first-order correc- tion by taking both the gain and the loss term into account at the same time. However, even if the derivation of K˜ −1 and the subse- quent deconvolution is straightforward, its application can have unwanted side effects, such as amplifying noise. We compared the Fourier transform of the inverse PSF for POLIS with the cor- responding Fig. 1 of DeForest et al. (2009). The resulting curve directly resembled the kernel they obtained after regularization for the noise suppression. For the present study we therefore as- Fig. 3. Intensity normalization curve for the observations of 14/08/2009. sumed that we do not need to additionally modify the PSF or The observed intensity at disk center is given by the black crosses,the apply a high-frequency noise filtering before the deconvolution. red line is a polynomial fit to the data points.

3. Stray-light measurements for the calibration curve, too. For each separate scan of a certain The following sections describe the measurements for obtaining FOV, one then calculates the average profile over all scan steps, generic estimates of the stray-light level and of the instrumental first dividing each spectrum by the corresponding value of the PSF. We also suggest the best approach to applying the parasitic normalization curve. This removes the temporal trend during the light correction. scan and provides an average spectrum Ilocal with an intensity only proportional to that of the observed FOV. The parasitic cor- rection is then given by the 5%-fraction of the intensity in the 3.1. Parasitic light continuum window of the average profile. To include the change We start with the parasitic light coefficient β (Eq. (5)) because, in light level during the observation again – because Ilocal at a unlike α, it can be determined directly. From the discussion of given moment of time scales with it – the normalization curve the source of the parasitic light in the previous section, it fol- from the start until the end of the scan is normalized to its mean lows that if the direct illumination of the CCD with sunlight is value inside that time span. This provides the relative variation blocked, only the randomly scattered light will be left over. This in the light level, hence of the parasitic correction for a spectrum is thus the method of choice in determining β. We therefore com- taken at a given moment inside the FOV that entered into the pared measurements of a spectrum with a fully open aperture calculation of Ilocal. Multiplying the parasitic correction with the and a spectrum with the light path blocked close to the camera relative temporal variation in intensity during the scan yields a mirror inside of POLIS (Fig. 2). The location of the blocking correction for the parasitic stray light that accounts for both the prevented the direct illumination of the CCDs with the resolved variation in Ilocal with the telescope pointing and the temporal spectrum, but did not affect the stray-light level inside the spec- variation in the light level during the day. trograph otherwise. Both measurements were corrected for the dark current before the analysis. 3.2. Spider mounting To quantify the amount of parasitic light as a fraction of some mean intensity of the incoming light, we averaged the intensity The guiding telescope of the VTT is fed by a small pick-up mir- of the full-aperture spectrum over a pseudo-continuum window ror located close to the entrance window of the evacuated tele- in the spectrum from 396.383 nm to 396.393nm as reference, scope tube. The pick-up mirror is fixed to a spider mounting and and this yielded a mean value of 2716 counts. The average in- produces a central obscuration in any pupil plane at the VTT. tensity value of the measurement without direct illumination of We set up an imaging channel to determine the light level inside the CCD was around 148 detector counts. The corresponding im- the central obscuration. We deflected the light with the 45-deg age was homogeneously lit and showed no trace of spectral lines mirror to an optical rail where we mounted a for creating which ensures that no dispersed stray light was included in the a pupil image, a small-band interference filter at 557.6 nm, and measurement. The ratio of parasitic and reference intensity then some neutral density (ND) filters to reduce the intensity to a suit- is about 5% in the Ca ii H channel. The corresponding values for able level for the PCO Sensicam camera used. With this setup, the channel at 630 nm were 20380 and 58 counts, respectively, we took images of the spider mounting in the pupil plane for yielding a fraction of 0.3% that is presumably negligible in an a CLV run similar to the scientific observations, to measure the analysis of the 630 nm data. stray-light level and at the same time to identify a possible varia- For all following stray-light measurements in the Ca ii H tion with the telescope pointing. The upper panel of Fig. 4 shows channel, we have corrected the spectra for the parasitic light sep- the resulting pupil images when moving across the solar disk in arately spectrum by spectrum. We determined the average inten- steps of 100. We took cuts through the images to determine sity in the continuum window in each spectrum, averaging along the residual intensity in the shaded areas and normalized each of the slit as well, and then subtracted 5% of this average value in the cuts to its maximum intensity value (lower panel). The pupil detector counts from all intensity values of the spectrum. images show a change in the global light level with the tele- For the correction of scientific observations, we suggest us- scope pointing, but the intensity curves after the normalization ing a slightly modified approach. From repeated small maps are nearly identical. The residual intensity in the central obscu- taken with about half an hour cadence at the center of the solar ration is always about 4%. The light level at the border of the disk, one can obtain an intensity normalization curve for each FOV (“tail”), which can only be caused by stray light, is below point of time during the day. Figure 3 shows an example of such 2%. These numbers now, however, refer to a pupil plane, not a a curve for 14 August 2009. The first observation of this day focal plane. After the reflection on the 45-deg mirror, the light was a large-area scan on disk center, so its intensity was used passed through only three optical elements (lens, interference

A129, page 5 of 13 A&A 535, A129 (2011)

Fig. 5. POLIS Ca ii H spectra with partly illuminated FOV, logarithmic display range. Left: FOV blocked in F2 (hairline mounting). Middle: FOV blocked in F1 (filter wheel). Right: slit across the solar limb.

behavior could be traced back to the I → QUV cross-talk cor- rection in combination with the real-time demodulation of the Stokes vector in POLIS. This demodulation uses pairs of image differences for Stokes QUV, but the addition of all images for Stokes I. Parasitic light thus adds up in I but cancels in QUV. For a correction of the cross-talk, one then has to use a reduced intensity Itrue = Iobs − const. in the calculation of the cross-talk coefficient cI→QUV = QUVobs/Itrue at continuum wavelengths. Subsequently, also cI→QUV · Itrue has to be subtracted from QUV. Fig. 4. Images of the pupil plane taken with the PCO setup in a CLV run This additional correction was used in the data reduction of at 557 nm. Top panel: pupil images, all shown in an identical display POLIS data in 2003 with const. ≡ β = 4% of I , but only for ff c range. The o set of the telescope pointing from the disk center is given the long-integrated data. For shorter integration times, the effect in each subpanel in arcsec. Bottom: intensities of each pupil image along was below the noise level and could not be detected. Because the the cut marked by the red vertical line in the image at 0 . stray-light covers in POLIS were modified afterwards as a conse- quence of this finding, the number can only serve as an order of magnitude estimate. We point out that this effect produces spu- filter, ND filter). Because the spider mounting is located behind rious polarization signals inside spectral lines caused by cross- the entrance window, the stray light caused by the two coelostat talk from Stokes I even when close-by continuum wavelengths mirrors and the entrance window is absent. are forced to zero polarization.

3.3. Methods without explicit measurements 3.4. FOV partially blocked in the focal plane (spatial PSF) There are three more methods that provide an estimate of stray To derive the spatial PSF of POLIS, we took spectra with POLIS light without requiring explicit measurements. The first is to where part of the FOV in the focal plane was blocked by a metal match average observed spectra to an atlas profile, as suggested plate. In addition to blocking part of the FOV in the focal planes by Allende Prieto et al. (2004)andCabrera Solana et al. (2007). F1 (telescope focus) and F2 (entrance of POLIS), we also took A comparison with the presumably stray-light-free spectra of the spectra with the slit placed across the solar limb. Figure 5 shows FTS spectral atlas (Kurucz et al. 1984; Brault & Neckel 1987) example spectra of the three cases. The blocking edge is sharper yielded the best match for a value of β = 20% for both channels for the blocking in F2 inside of POLIS. This is caused by fewer of POLIS. The approach is, however, not fully consistent with optical elements being located behind F2, by the impossibility Eq. (5) because it implies that all stray light is of parasitic na- of using the adaptive optics while blocking in F1 and by the ture. Instead, the direct measurement of β of Sect. 3.1 excludes fact that the metal plate had to be placed at some distance to F1 the high value retrieved with this approach. The approach is also (≈1 cm). All spectra are displayed on a logarithmic scale, other- aimed at determining the spectral point spread function of the wise the stray light could not be seen at all directly in the images. optics behind the slit, because it uses an average observed profile We then averaged the intensity in the same continuum window without spatial resolution and the comparison of its shape to a near 396.4 nm as before to obtain the spatial intensity variation reference profile. It therefore measures all spectral resolution ef- across the blocking edge and the limb, respectively (Fig. 6). fects of the spectrograph in addition to the parasitic contribution. To determine the spatial PSF, we then defined an artificial A second method is to compare profiles from the umbra of sharp edge located appropriately along the slit, and constructed a sunspots with only a little intrinsic radiation to an average quiet model for the spatial PSF from a combination of a Gaussian and Sun spectrum. Rezaei et al. (2007) determined a level of at max- a Lorentzian curve. We convolved the sharp-edge function with imum 12% of stray light at 396 nm for the sum of α + β in the the kernel and modified the free parameters of the two functions umbra, which can be taken as the minimum amount of stray light used in its generation by trial-and-error until the convolved edge in the brighter quiet Sun surroundings. A simultaneous inversion function (red line) matched the observed intensity trend across of 630 nm and 1565 nm spectra with the SIR code yielded a value the edge for the blocking in F1. The finally used kernel is shown of α = 10% of stray light in the umbra (Beck 2006, 2008). in the right part of Fig. 6 at about x =+25; it drops to basically The last indirect method is the presence of residual polar- zero at about 10 distance from its center. The area of the kernel ization signal in the telluric line blends of the 630 nm channel. is normalized to unity, and its maximum value then is around In the data reduction of long-integrated (>20 s) spectra of the 20%. For better visibility, it is shown multiplied by four in the 630 nm channel, the telluric lines at 630.20 nm and 630.27 nm figure. The shape of the kernel can also be cross-checked against sometimes showed a non-zero polarization signal even if the the observed intensity variation by another method than the con- nearby continuum wavelengths showed none. This puzzling volution of the sharp-edge function. In case of an axisymmetric

A129, page 6 of 13 C. Beck et al.: Stray-light contamination and spatial deconvolution of spectrograph observations

Table 1. Stray-light levels for the VTT/POLIS in various studies.

Measurement Wavelength Stray-light level Pupil plane (PCO) 557 nm 4% (∼1–2% tail) POLIS (this work) F1 blocked 396 nm ∼1–2% (tail) F2 blocked 396 nm ∼1–2% (tail) Limb 396 nm ∼1–2% (tail) Blocked behind grating 396 nm ∼5% Blocked behind grating 630 nm 1% Convolution of FTS 630/396 nm 20% POLIS (other studies) Umbral profile1 396 nm ∼12% Room light1 396 nm <1% Fig. 6. Observed intensity variation along the slit for FOV blocked in Convolution of FTS2 630 nm 15% F1 (black), blocked in F2 (green), and for the slit across the limb (blue). 3 ∼ ,y= , Umbral profile 630 nm 10% The purple lines at x (0 100%) denote a simulated sharp edge that Parasitic light correction4 630 nm ∼4% after convolution with the kernel at the right yields the red curve.The inlet on the left shows a magnification of the stray-light tail region. The Notes. (1) Rezaei et al. (2007). (2) Cabrera Solana et al. (2007). (3) Beck derivative of the observed intensity variation for the FOV blocked in F1 (2008). (4) Keyword in POLIS data reduction software, used for long- is overplotted over the kernel as an orange line. integrated data in 2003.

2D kernel K(x,y), it can be shown that the 1D kernel K(x)is of the intensity for the channel at 396 nm (630 nm) for the data given by taken in 2009, but it presumably was higher in previous years before the modification of the stray-light covers inside the spec- dI K(x) = obs (x), (11) trograph. The stray-light level at distances above 20 from any dx lit area is on the order of 2% only, and the spatial PSF is strongly peaked with significant contributions only up to about 2.There when the true intensity corresponds to a step function and were no indications that the relative stray light in the telescope I (x) is the observed intensity variation across the step func- obs changes somehow with the telescope pointing in a CLV run. The tion (Collados & Vazquez 1987; Bonet et al. 1995). tail of the observed intensity variation across a sharp edge can We overplotted the derivative of the observed intensity vari- be used as a proxy for the reduction of the stray-light level in ation for the blocking in F1 over the kernel in the right part of off-limb spectra. Fig. 6. The match is reasonably close, with a slightly lower cen- tral value and a broader central core in the derivative. The trial- and-error method for defining the kernel thus yielded a good 4. Application to data match to the theoretical expectation. Since the chosen kernel exhibits a sharp drop, most of the lo- As a first application to observed data, we compare the perfor- cal stray light should come from the close vicinity (d < 2)ofa mance of the stray-light corrections with and without explic- given point (x,y). The inlet in the left-hand part of Fig. 6 shows itly using the instrumental PSF on a data set taken near the so- that, actually, the tail level of the observations is not matched lar limb. The application to the limb data set actually yielded α well, because the curve of the convolved sharp edge reaches zero improved values for the stray-light contribution because the several arc seconds before the observations. The residual inten- residual intensity beyond the limb provides a good reference for sity in the far tail (>20) is at maximum 2%. We point out that the quality of the correction. In the second and third examples, ff the observations of the solar limb and with the FOV blocked in we instead test the e ects of the deconvolution as a method to F1 only differ slightly for x > 0, which implies that most of the improve the spatial resolution of observations on spectroscopic stray light is caused by the instrumental PSF and not the tele- and spectropolarimetric data, respectively. scope or atmospheric scattering. For the application of Eqs. (8)and(10), a 2D kernel is 4.1. Example A: application to a limb data set needed. We used the assumption of axial symmetry to create the 2D kernel K from the 1D version shown in Fig. 6, and divided To test both the stray-light correction and the spatial deconvo- K(x,y)by2π r, with r = x2 + y2, to maintain the normaliza- lution, we used a data set that was taken near the solar limb on tion of the area of the 1D kernel. 25 August 2009, with an FOV that extended beyond the limb (see Fig. 8 below). This offers a good opportunity to determine the quality of the corrections because the limb is similar to a 3.5. Summary of stray-light measurements sharp edge and beyond the limb the (pseudo-)continuum inten- . ff sity should be zero. The map was taken with 134 steps of 0 3 We used di erent methods to estimate the amount of stray light step width and an integration time of 13 seconds per scan step in POLIS. The upper two sections of Table 1 list the stray-light (for more details see Beck & Rezaei 2011). We applied a vari- values determined in this work. In the lower section, we added ation of corrections to the previously flat-fielded data to assess the values that have been presented in previous studies for any of the effects of each step on the data. We used the following com- the two channels of POLIS. The definition of the stray-light frac- binations of corrections: tion differs in most cases, but the umbral profiles provide a lower limit of 10–12% for the total stray-light contamination in quiet 1. parasitic light only (β); Sun areas without strong spatial intensity gradients. The para- 2. parasitic light (β) with subsequent first-order correction sitic light fraction could be accurately determined as 5% (0.3%) (Eq. (8));

A129, page 7 of 13 A&A 535, A129 (2011)

Fig. 7. Comparison of a large-scale average profile multiplied by α (thick black) and individual local stray-light profiles calculated around a given pixel using the PSF. The labels denote the distance of the pixel to the limb in arcsec (negative/positive ≡ on/off-disk).

3. parasitic light (β) with subsequent Fourier deconvolution (Eq. (10)); 4. parasitic light (β) and stray light (α)asgivenbyEq.(5) (more details below). Some of the approaches had to be modified slightly for treating off-limb spectra. Method No. 1 serves as a reference of basically uncorrected spectra. For the first-order correction in Method No. 2, we restricted the sum of Eq. (8)to(x,y) = (x,y)±(5, 40) pixels to avoid using scan steps that were taken at a significantly different time. The Fourier deconvolution in the 3rd method was done according to Eq. (10) by multiplying the Fourier transform of the 2D maps of the intensity at each wavelength, I(λ), with the inverse of the kernel. For Method No. 4, we used a constant value of α = 10% as the minimum level of stray light for all spectra on the disk and an average local profile Ilocal calculated from the part of the FOV that was most remote from the limb. The intensity beyond the limb drops fast, however, with the limb distance (Fig. 6), so subtraction of a fixed α Ilocal yielded negative intensity values beyond the limb. To avoid this overcompensation, we scaled α down with increasing limb distance using the variation in inten- sity for the observation with the FOV blocked in F1 (Fig. 6). We took the observed intensity variation beyond the location of the < edge (x 0 ) and normalized the first point to 10% to have a Fig. 8. 2D maps and spectra after the correction. Lower panel: OW map smooth connection to the correction on the disk. The limb loca- in logarithmic display (bottom row), H2R map (middle row), spectra (top tion was set to where the intensity dropped below 5% of Ic. row) along the cuts marked by white vertical lines in the H2R map. It turned out that a good off-limb correction was only achiev- Upper panel: magnification of the areas marked by black squares in able when the intensity of Ilocal was increased by a factor of two. the H2R map (on-disk and at the limb). The white rectangles denote the ff Because the correction uses α Ilocal, the factor of two can be at- o -limb area used to derive the profiles of Fig. 10. tributed either to α or Ilocal. Using an average disk center pro- file with its intrinsically higher intensity and keeping α at 10% yielded a worse result, because the spectral line blends in the stray-light profiles calculated using the PSF to each other and to wing were located at slightly different wavelengths than in the the average profile supports using a single average profile Ilocal observed FOV, and it overcompensated for the stray light present in Eq. (4) ignoring the PSF, but with a doubled α of 20%. The as well. We therefore used an on-disk correction corresponding profile at 50 limb distance has a lower intensity because it is to α Ilocal with α = 20%, with the off-limb correction normalized at the lower border of the FOV, where the full area of the kernel to 20% on the first point. could not be used. The values used in the correction can actually be cross- Figure 8 shows the result of applying all four methods (each checked with the PSF. Figure 7 shows α Ilocal used in Method shown in a column of the figure, in the same order as presented No. 4 on the disk, together with some profiles corresponding to in the text) to the data set in 2D maps of the FOV and one sample the gain term of Eq. (8), calculated locally from the surround- spectrum. We derived one map in a pseudo-continuum window ings of each pixel in the FOV weighted with the PSF. The stray- in the outer wing (OW, see, e.g., Beck et al. 2008)oftheCaii light contributions predicted by the gain term match the generic H line and one map averaged over the wavelength region of the α Ilocal well, as long as the pixel, whose surroundings were used, H2R emission peak. The amount of residual off-limb stray light was more remote from the limb than 10. The similarity of the can be clearly seen in the OW map (bottom row) and the spectra

A129, page 8 of 13 C. Beck et al.: Stray-light contamination and spatial deconvolution of spectrograph observations

Fig. 9. Intensities across the limb in the OW wavelength range for an Fig. 11. Fourier power spectrum of the OW map vs. spatial frequency. individual spectrum. Solid black line: Method No. 1. Triple-dot-dashed Line styles and colors are as in Fig. 9. orange line: Method No. 2. Dash-dotted blue line: Method No. 3. Dotted red line: Method No. 4. Table 2. Spatial rms contrast and spectral rms noise in % of Ic.

Method1234 contrast 5.2 5.8 6.7 6.5 noise 1.15 1.18 1.34 1.17

Fourier deconvolution (No. 3) yields nearly the same intensity as the uncorrected spectra (No. 1). Even if Method No. 4 gives the best results for the off-limb stray-light correction, this does not signify that the principle of the other methods is wrong. Methods Nos. 2 and 3 follow the initial way in which stray light is created closer than Method No. 4. Both approaches, however, only correct the static contri- bution to the stray light caused by the instrumental PSF, within Fig. 10. Average off-limb spectra from the area marked by a white rect- the limits of accuracy in its derivation. Their worse performance angle in Fig. 8. Line styles and colors are as in Fig. 9. beyond the solar limb implies that in this case both the resid- ual dynamical part of the PSF beyond the AO correction and the PSF of the telescope and the optics upfront of F1 play a role. Because the true solar off-limb intensity outside of the very ff (third row). Only Method No. 4 removes the o -limb stray light emission core is zero, any residual stray light not accounted for satisfactorily. by the instrumental PSF is seen prominently in Figs. 8 or 10.The The residual stray-light level beyond the limb is quantified ad-hoc method (No. 4) instead seems to correct well for both the in Fig. 9, which shows the intensity variation along the slit in stray light caused by the instrumental PSF, as well as for the the OW map for a randomly chosen scan step. The on-disk light additional stray-light contributions, but only with a static cor- level is globally reduced for Methods Nos. 2 and 4, whereas the rection without taking fluctuations of the atmospheric scattering Fourier deconvolution (No. 3) keeps the same level as the uncor- into account. rected spectra (No. 1). This reflects that only with the Fourier As far as the spatial resolution is concerned, both the first- deconvolution is the loss term of Eq. (8) taken into account, order correction (No. 2) and the Fourier deconvolution (No. 3) whereas all other methods only correct the gain term. Beyond have led to an improvement, even if it is not very noticeable the limb, the stray-light level stays at the value of the uncorrected (second and third columns in the top two rows of Fig. 8). The spectra of about 1–2% for the Fourier deconvolution (No. 3), Fourier deconvolution had a stronger effect on the visual im- whereas the first-order correction (No. 2) and the ad-hoc stray- pression. This is verified by the plot of the spatial Fourier power light correction (No. 4) reduced the off-limb light level. The last for the OW map shown in Fig. 11. Only the lower part of the method yields a correction an order of magnitude better than all OW map up to y = 40 was used. The power at higher spatial others, reaching a level of about 0.2% of residual intensity. frequencies is slightly enhanced after the application of the first- The average profiles shown in Fig. 10, calculated for the order correction and significantly enhanced after the Fourier de- off-limb area marked in the OW map of Fig. 8, also indicate convolution. The improved spatial resolution is reflected also in the quality of the correction. These profiles allow instant dif- the root-mean-square (rms) contrast of the OW maps (Table 2). ferentiation of under/overcorrected stray light by the shape of This number, which measures the relative intensity variation, the line blends in the wing: absorption profiles indicate resid- has, however, to be taken with caution because any correction ual stray light, whereas emission profiles for the photospheric that reduces globally the intensity automatically increases the blends at these heights above the limb indicate an overcorrec- rms contrast. We also determined the rms variation inside wave- tion. Only Method No. 4 yields fully negligible residuals of the length windows of about 10 pm extent in the OW spectral re- line blends. For the three other methods, absorption lines are gion and found it to stay basically at about 1.2% of Ic, with an seen in the wing. For the emission in the Ca ii H line core – basi- average value of the intensity itself of about 20% at these wave- cally, the only scientifically interesting quantity beyond the limb lengths. The Fourier deconvolution (No. 3) has slightly increased – Methods Nos. 2 and 4 yield a similar amplitude, whereas the the noise.

A129, page 9 of 13 A&A 535, A129 (2011)

Fig. 12. Original (top row) and deconvolved (bot- tom row) continuum intensity maps at 777 nm of an active region with several pores. Left:full FOV. Right: magnification of the region marked by a black rectangle.

Fig. 13. 2D maps of the sunspot observations at 630 nm. Top/bottom row: original/deconvolved spectra. Left to right:StokesIQUV. The white dashed line marks the location of the cut shown in Fig. 14; the crosses and the corresponding numbers label the locations of the profiles shown in Fig. 15. The horizontal black/white lines at the upper and lower border of the FOV are caused by the hairlines of POLIS.

4.2. Example B: application to pore observations at 777 nm that applying this kernel to a knife-edge observation at 630 nm also provides a satisfactory match. The observation we discuss In another observing campaign in November 2009, we took here consists of a scan with 150 scan steps of 0. 3 step width identical measurements with a partly blocked FOV with the main i across an active region (Fig. 13) done on 6 July 2005, with AO spectrograph of the VTT in a wavelength range around the O correction. The integration time was ten seconds per scan step. triplet at 777 nm. The corresponding convolution kernel derived In this case, the Fourier deconvolution was applied separately to from the measurement is shown in Appendix B. The spatial sam- each wavelength and Stokes parameter. pling along the 0. 18 wide slit was 0. 18 in this case. We then applied the spatial deconvolution to an observation In the visual impression of Fig. 13, the improvement in the of an active region with several pores, using Eq. (10) without spatial resolution is prominent, both in the continuum intensity any additional stray-light correction. The spatial scanning in the map (left) and the maps of the absolute wavelength-integrated observation was done with 201 steps of 0. 36 width, undersam- polarization signal, |QUV|/Idλ. The umbral dots inside the pling the slit width. Figure 12 shows the full FOV before ( upper umbra of the bigger spot can be seen well in the deconvolved left panel) and after the deconvolution (lower left panel). The data set and the filamentary structure of the penumbra of the seeing was moderate to bad during the scan, producing frequent smaller spot is much clearer. The rms contrast in the continuum failures of the AO system, with jumps of the FOV as well. The image increased from 3.7% to 5.3%. Figure 14 demonstrates that magnification of two of the pores (right panels), however, shows the increase in the rms contrast is not only caused by the removal that the deconvolution has not only increased the contrast by a of the stray-light contamination. It shows a cut through the um- reduction of the intensity, but also leads to an improvement in bra of the larger sunspot where a light bridge was located. The full width at half maximum of the light bridge is slightly re- the sharpness of the structures, e.g., for the boundaries of the darkest parts of the pores. duced and the intensity values to the left (x ∼ 26 ) and right (x ∼ 30.5) of the central region decrease to the benefit of a more concentrated distribution with a stronger intensity peak in 4.3. Example C: application to polarimetric observations the deconvolved data, compared to the original data. To test the effect of the deconvolution by Eq. (10) on polarimetric The polarization signal was also usually amplified by the data, we applied it to observations taken with POLIS in its red deconvolution. Figure 15 shows four Stokes V profiles before channel at 630 nm. Assuming that the PSF derived for the blue and after the deconvolution; taken from the locations marked in channel is characteristic of the instrument, we did not determine Fig. 13. On average, the Stokes V amplitudes increased relatively a new PSF but used the same one as before. Appendix B shows by about 5% of their previous value. These spectra, however,

A129, page 10 of 13 C. Beck et al.: Stray-light contamination and spatial deconvolution of spectrograph observations

Fig. 16. Histograms of the local value of α in a QS map (thick black), a sunspot map (red), and the limb data set (thin blue).

Fig. 14. Cut through the intensity maps of Fig. 13. Thick black: original data. Thin grey: deconvolved data. The upper panel shows a magnifica- mutually related to each other in a way that makes a separation tion of the central region where the cut crossed a light bridge. between them difficult. To cross-check that the approach of us- ing a single profile averaged over the full FOV instead of the ex- plicit local version given by the PSF is reasonable, we calculated the local stray light using the gain term of Eq. (8) for all pixels of three data sets: the limb (@396 nm) and sunspot (@630 nm) observations used in the previous section, and a large-area map taken in quiet Sun (QS) on disk center (@396 nm, not shown here). We then determined the intensity of the local stray-light profiles relative to the average profile of the full FOV because the number can be used as first-order proxy1of the true α. Figure 16 shows the histograms of the relative frequency of occurrence of agivenvalueofα. In QS regions, α is about 24%. For the limb and the sunspot data sets it is also generally at or above 20%; however, it can in some instances fall below 15% (see the tail of the corresponding distributions in the figure). Throughout the umbra of the large sunspot of Fig. 13, α was about 8–10%.

6. Discussion The various stray-light measurements are basically consistent with the formulation of the stray-light problem in Eqs. (2), (4), Fig. 15. Stokes V spectra from the sunspot observation. Red: decon- and (6). For the special case of POLIS, the stray light contains volved spectra. Black: original spectra. The numbers in the upper left of a significant contribution of spectrally undispersed light created each panel refer to the labels in Fig. 13 that indicate the locations of the inside the instrument itself that could be absent in other spec- spectra in the 2D maps of the sunspot observation. trographs. For the spectrally resolved stray light that is created by scattering in the light path upfront of the grating, we found also clearly show the drawback of the Fourier deconvolution: a lower limit of about 10% from umbral profiles and a value of the noise level is amplified as well. In Stokes I, the rms noise in about 20% in the quiet Sun, consistently from a limb data set a continuum window increased from 0.05% to 0.07% at an aver- and an application of the PSF to calculate the local stray light. A deconvolution with the instrumental PSF alone, however, does age value of about 15 000 counts. In Stokes V, where the noise ff level is more critical in the analysis of the data, the rms noise was not provide a good correction for o -limb spectra, presumably 0.05% of I before and 0.12% of I after the deconvolution, re- because it only covers the optics behind the telescope focus and c c includes neither the atmospheric scattering nor the telescope PSF spectively. The rms noise in Stokes V is still acceptable, even ff after the increase by a factor of 2.4. For comparison, Steiner of the optics upstream of the focal plane. For o -limb data, addi- et al. (2010) found an increase of the rms noise from 0.1% to tional corrections are needed that have eventually to be adjusted 0.2–0.3% in the deconvolution of IMaX data. to the specific data set used, but a residual stray-light level be- low 0.5% can be achieved. For our data, we used the observed intensity variation across a sharp edge with only a minor ad-hoc 5. The relation between PSF and (local) stray light adjustment to satisfactorily remove the off-limb stray light. We determined the PSF from observations with a partly In the stray-light correction of the off-limb spectra, it turned out blocked FOV, for the two channels of POLIS and one obser- α = by trial-and-error that a value of 10% is definitely too low. vational run with the main spectrograph of the VTT at 777 nm. The finally used stray-light level that yielded a good correction For the latter and the 630 nm channel of POLIS, the tail region corresponds to using α = 20%. The integration of the local stray- 1 light contribution using the PSF finally returned the same level In Eq. (8), Iobs is used because Itrue is unknown; α is therefore slightly (Fig. 7). As seen in Eq. (4), the PSF and the (local) stray light are overestimated.

A129, page 11 of 13 A&A 535, A129 (2011) of the stray light far away from the blocking edge was only par- planetary transit are available, but it seems generally to be rec- tially reproduced, i.e., the derived kernel yields less stray light ommended to use a 2D FOV to determine the PSF. The PSF ob- than actually observed. This is possibly related to our basically tained allows one to determine the local stray-light contamina- 1D approach using individual slit spectra. A spatial scan of the tion of a pixel from its close surroundings. For a homogeneously blocking edge and the determination of a 2D PSF may improve lit area – as is common in the quiet Sun – the explicit calculation the result in the tail region because in the 1D case only the con- by the PSF can be exchanged by an average stray-light contri- tamination along the slit is included, and not the “lateral” stray bution proportional to the average profile of the full FOV; in the light. Determination of the instrumental PSF from observations case of sunspot observations, the stray-light correction should be with a half-blocked FOV is not limited to slit-spectrograph data calculated explicitly using the PSF because of the large intensity but can equally be done for all kind of 1D or 2D instruments. gradients. The PSF and the corresponding stray-light level can It partly allows one to avoid having to use purely ad-hoc con- be cross-checked with observations near the solar limb, where structed PSFs as in Pereira et al. (2009), Joshi et al. (2011), or continuum wavelength windows provide an excellent intensity Rutten et al. (2011). The derivation of the PSF from explicit ob- reference. For ground-based observations taken with AO correc- servations is more solid than the indirect method of a comparison tion at the VTT, with a field stop before the first focal plane, the between observed and synthetic spectra from simulations (e.g., instrumental PSF seems to be dominating over the contributions Scharmer et al. 2011), where spatial and spectral resolution ef- from the telescope and the Earth’s atmosphere. fects (cf. Sect. 3.3) can get mixed up. The PSF can also be used for a spatial deconvolution using The instrumental PSF can be used to deconvolve the ob- a Fourier method. This seems a valid option for correcting slit- served spectra post-facto for both a correction of the stray light spectrograph observations post-facto for the static contributions and an improvement of the spatial resolution. We tested the de- of the instrumental PSF. convolution on three different data sets, two spectroscopic and one spectropolarimetric observation. From the visual impres- Acknowledgements. The VTT is operated by the Kiepenheuer-Institut für Sonnenphysik (KIS) at the Spanish Observatorio del Teide of the Instituto de sion, the spatial resolution has improved in all cases beyond a Astrofísica de Canarias (IAC). The POLIS instrument has been a joint de- simple increase in contrast owing to the global reduction of in- velopment of the High Altitude Observatory (Boulder, USA) and the KIS. tensity because of the subtraction of the stray-light contribution. C.B. acknowledges partial support by the Spanish Ministerio de Ciencia e The noise level was increased bythedeconvolutionbyuptoa Innovación through projects AYA 2007-63881, AYA 2010-18029, and JCI factor of about 2, while our PSF seems to be well behaved in gen- 2009-04504. D.F. gratefully acknowledges financial support by the European Commission through the SOLAIRE Network (MTRN-CT-2006-035484) and by eral with respect to the noise amplification, presumably because the Programa de Acceso a Grandes Instalaciones Científicas financed by the it is sampling-limited in all cases and does not cover the high Spanish Ministerio de Ciencia e Innovación. We thank C. Allende Prieto, B. Ruiz spatial frequencies down to the theoretically achievable diffrac- Cobo, M. Collados, and J. A. Bonet for helpful discussions. We thank the anony- tion limit where the noise contribution to the Fourier power also mous referee for providing helpful comments. becomes important. For the polarimetric observation, we point out that we used the instrumental PSF to deconvolve an obser- Appendix A: Derivation of first-order correction vation taken five years before the PSF measurement. Even if this still led to a clear improvement, the PSF measurement should Solving Eq. (7)forItrue yields at first the recursive equation be done closer in time. Before such a deconvolved data set can, ⎛ ⎞ ⎜ ⎟ however, be used for a scientific investigation, the effects of the 1 ⎜ ⎟ I x,y = ⎜I x,y − K r I x ,y ⎟ , deconvolution on the physically relevant quantities like the net true( ) − α ⎝ obs( ) ( ) true( )⎠ (A.1) (1 ) ,y circular polarization or the LOS velocities would have to be in- x vestigated in more detail (see, e.g., Puschmann & Beck 2011). where r = (x − x,y− y). This should include tests with synthetic observations that are Exchanging the term Itrue(x ,y) with the relation given by convolved with the known PSF. Eq. (A.1)gives There are, however, more reasons that the deconvolution ⎛ ⎜ works well with the data sets used. The PSF is sharply peaked, 1 ⎜ 1 ,y = ⎜ ,y − ,y therefore pixels with a separation of more than about 2–3 from Itrue(x ) − α ⎝Iobs(x ) K(r) − α Iobs(x ) (1 ) ,y (1 ) a spatial location do not enter strongly. This automatically re- x ⎞ stricts the correction to the close surroundings of a given pixel, ⎟ 1 ⎟ which is necessary for slit-spectrograph data with their sequen- − K(r) K(r ) Itrue(x ,y )⎠⎟ . (A.2) (1 − α) tial spatial scanning over a permanently evolving solar scene. A x,y x,y second reason is that all observations were obtained using AO 1 ∼ + α α correction, therefore the time-variant part of the instantaneous With (1−α) 1 for 1 and neglecting all terms PSF is already largely compensated for. The third reason is that ∝ α, α2, K α, K2, one obtains / all observations initially have a high signal-to-noise (S N) ratio because of the comparably long integration times of ten seconds Itrue(x,y) = Iobs(x,y) − K(x − x ,y− y )Iobs(x ,y) . (A.3) or more. Finally, the observations were also spatially oversam- x,y pled for the data used here; i.e., the spatial sampling along and ff perpendicular to the slit was below the e ective resolution by a Appendix B: Convolution kernels at 777 nm factor of two or more. and 630 nm

7. Conclusions Convolution kernel at 777 nm. Figure B.1 shows the observed intensity across the location of the blocking edge at 777 nm, to- Observations with a partly blocked FOV in the first accessi- gether with the convolution kernel used to match the convolved ble focal plane allow one to estimate the (static) instrumental edge function to the observation (upper panel). The kernel has PSF downstream of the focal plane, in case no observations of a more extended wings than the one of POLIS, but we were still

A129, page 12 of 13 C. Beck et al.: Stray-light contamination and spatial deconvolution of spectrograph observations

References Allende Prieto, C., Asplund, M., & Fabiani Bendicho, P. 2004, A&A, 423, 1109 Asplund, M., Grevesse, N., Sauval, A. J., & Scott, P. 2009, ARA&A, 47, 481 Ballesteros, E., Collados, M., Bonet, J. A., et al. 1996, A&AS, 115, 353 Beck, C. 2006, Ph. D. Thesis, Univ. Freiburg Beck, C. 2008, A&A, 480, 825 Beck, C. A. R., & Rezaei, R. 2011, A&A, 531, A173 Beck, C., Schmidt, W., Kentischer, T., & Elmore, D. 2005, A&A, 437, 1159 Beck, C., Schmidt, W., Rezaei, R., & Rammacher, W. 2008, A&A, 479, 213 Beck, C., Bellot Rubio, L. R., Kentischer, T. J., Tritschler, A., & Del Toro Iniesta, J. C. 2010, A&A, 520, A115 Bonet, J. A., Sobotka, M., & Vazquez, M. 1995, A&A, 296, 241 Brault, J., & Neckel, H. 1987, Spectral Atlas of the Solar Absolute Disk- Averaged and Disk-Center Intensity from 3290 to 12 510 Å (unpublished, ditigal IDL version provided in the KIS sofware lib) Briand, C., Mattig, W., Ceppatelli, G., & Mainella, G. 2006, Sol. Phys., 234, 187 Cabrera Solana, D., Bellot Rubio, L. R., Beck, C., & Del Toro Iniesta, J. C. 2007, A&A, 475, 1067 Cavallini, F. 2006, Sol. Phys., 236, 415 Chae, J., Yun, H. S., Sakurai, T., & Ichimoto, K. 1998, Sol. Phys., 183, 229 Collados, M., & Vazquez, M. 1987, A&A, 180, 223 DeForest, C. E., Martens, P. C. H., & Wills-Davey, M. J. 2009, ApJ, 690, 1264 Fabbian, D., Khomenko, E., Moreno-Insertis, F., & Nordlund, Å. 2010, ApJ, 724, 1536 Fig. B.1. Derivation of the PSF at 777 nm. Thick black: observed in- Henoux, J. C. 1969, A&A, 2, 288 Joshi, J., Pietarila, A., Hirzberger, J., et al. 2011, ApJ, 734, L18 tensity. Dashed: edge function. Thin red: convolved edge. Upper panel: Keller, C. U., & Johannesson, A. 1995, A&AS, 110, 565 observed intensity across the blocking edge. The convolution kernel is Kneer, F., & Mattig, W. 1968, Sol. Phys., 5, 42 shown on the right; for better visibility it was multiplied by 2. Lower Kurucz, R. L., Furenlid, I., Brault, J., & Testerman, L. 1984, Solar flux atlas from panel: “tail” region. 296 to 1300 nm (National Solar Observatory, Sunspot, NM) Maltby, P. 1970, Sol. Phys., 13, 312 Maltby, P., & Mykland, N. 1969, Sol. Phys., 8, 23 Martinez Pillet, V. 1992, Sol. Phys., 140, 207 Mathew, S. K., Zakharov, V., & Solanki, S. K. 2009, A&A, 501, L19 Mattig, W. 1971, Sol. Phys., 18, 434 Mattig, W. 1983, Sol. Phys., 87, 187 Mikurda, K., Tritschler, A., & Schmidt, W. 2006, A&A, 454, 359 Orozco Suárez, D., Bellot Rubio, L. R., Del Toro Iniesta, J. C., et al. 2007a, PASJ, 59, 837 Orozco Suárez, D., Bellot Rubio, L. R., del Toro Iniesta, J. C., et al. 2007b, ApJ, 670, L61 Pereira, T. M. D., Kiselman, D., & Asplund, M. 2009, A&A, 507, 417 Puschmann, K. G., & Beck, C. 2011, A&A, 533, A21 Puschmann, K. G., Kneer, F., Seelemann, T., & Wittmann, A. D. 2006, A&A, 451, 1151 Rezaei, R., Schlichenmaier, R., Beck, C. A. R., Bruls, J. H. M. J., & Schmidt, W. 2007, A&A, 466, 1131 Rimmele, T. R. 2004, in Advancements in Adaptive Optics, ed. D. Bonaccini Calia, B. L. Ellerbroek, & R. Ragazzoni, SPIE Conf. Ser., 5490, 34 Fig. B.2. Test of the PSF at 630 nm. Thick black: observed intensity. Ruiz Cobo, B., & del Toro Iniesta, J. C. 1992, ApJ, 398, 375 Rutten, R. J., Leenaarts, J., Rouppe van der Voort, L. H. M., et al. 2011, A&A, Dashed: edge function. Thin red: convolved edge. The convolution ker- 531, A17 nel is shown on the left; it was multiplied by 8 for better visibility. Scharmer, G. B., Dettori, P. M., Lofdahl, M. G., & Shand, M. 2003, in Innovative Telescopes and Instrumentation for Solar Astrophysics, ed. S. L. Keil, & S. V. Avakyan, SPIE Conf. Ser., 4853, 370 Scharmer, G. B., Narayan, G., Hillberg, T., et al. 2008, ApJ, 689, L69 not able to perfectly reproduce the tail region for distances over Scharmer, G. B., Löfdahl, M. G., van Werkhoven, T. I. M., & de La Cruz about 15 from the location of the edge (lower panel). Further Rodriguez, J. 2010, A&A, 521, A68 Scharmer, G. B., Henriques, V. M. J., Kiselman, D., & de la Cruz Rodríguez, J. increasing the wing contribution led to a mismatch on the other 2011, Science, 333, 316 side of the edge in the lit area because the intensity of the con- Schröter, E. H., Soltau, D., & Wiehr, E. 1985, Vist. Astron., 28, 519 volved edge curve gets reduced more. Up to about 10 distance Staveland, L. 1970, Sol. Phys., 12, 328 from the edge, the observations are reproduced well by the con- Steiner, O., Franz, M., Bello González, N., et al. 2010, ApJ, 723, L180 volved edge. Sütterlin, P., & Wiehr, E. 2000, Sol. Phys., 194, 35 Tritschler, A., & Schmidt, W. 2002, A&A, 382, 1093 Tritschler, A., Schmidt, W., Langhans, K., & Kentischer, T. 2002, Sol. Phys., 211, 17 Convolution kernel at 630 nm. For the 630 nm channel of van Noort, M., Rouppe van der Voort, L., & Löfdahl, M. G. 2005, Sol. Phys., POLIS, we resampled the kernel determined at 396 nm to the 228, 191 two times finer spatial sampling in the red channel by interpo- von der Lühe, O. 1993, A&A, 268, 374 lation. Figure B.2 shows that an application of this kernel to the von der Lühe, O., Soltau, D., Berkefeld, T., & Schelenz, T. 2003, in Innovative Telescopes and Instrumentation for Solar Astrophysics, ed. S. L. Keil, & S. V. edge function reproduces the intensity in the 630 nm channel for Avakan, SPIE Conf. Ser., 4853, 187 the observation with a half-blocked FOV satisfactorily, even if Wedemeyer-Böhm, S. 2008, A&A, 487, 399 in the tail region the match is worse than for 396 nm. Because of Wedemeyer-Böhm, S., & Rouppe van der Voort, L. 2009, A&A, 503, 225 the resampling, the amplitude of the kernel is halved compared Zwaan, C. 1965, Recherches Astronomiques de l’Observatoire d’Utrecht, 17 to Fig. 6.

A129, page 13 of 13