Kanzelh\"ohe Observatory: instruments, data processing and data products

Kanzelh\"ohe Observatory for Solar and Environmental Research (KSO) of the University of Graz (Austria) is in continuous operation since its foundation in 1943. Since the beginning its main task was the regular observation of the Sun in full disc. In this long time span covering almost seven solar cycles, a substantial amount of data was collected, which is made available online. In this paper we describe the separate processing steps from data acquisition to high level products for the different observing wavelengths. First of all we work out in detail the quality classification, which is important for further processing of the raw images. We show how we construct centre-to-limb variation (CLV) profiles and how we remove large scale intensity variations produced by the telescope optics in order to get images with uniform intensity and contrast. Another important point is an overview of the different data products from raw images to high contrast images with heliographic grids overlaid. As the data products are accessible via different sources we also present how to get information about the availability and how to obtain these data. Finally, in an appendix, we describe in detail the information in the FITS headers, the file naming and the data hierarchy.


Introduction
Kanzelhöhe Observatory for Solar and Environmental Research (KSO) of the University of Graz is located on a mountain ridge at an altitude of 1526 m a.s.l. near Villach in southern Austria. The observatory was founded in 1943 as part of a network of solar observatories operated by the German Airforce (Pötzi et al., 2016;Jungmeier, 2017). The discovery of Mögel and Dellinger (Dellinger, 1935) that solar flares can cause ionospheric disturbances by a sudden increase of the ionisation of the D-layer in the ionosphere, such that blackouts of radio communications can occur, made it necessary to investigate such phenomena to arrive at a better understanding and predictions of these effects (Seiler, 2007). Solar observations at KSO date back to 1943. In the early years of the observatory, most observations were performed using a heliostat guiding the light beam down to a laboratory in the basement, where a projection device for sunspot drawings and a spectroheliograph (Siedentopf, 1940;Comper, 1958) were installed. In a second tower a coronagraph was operated (Comper and Kern, 1957), which was transferred in 1948 to the top of the Gerlitzen mountain (1 900 m a.s.l). First observations in the Hα spectral line were made visually at the spectroheliograph. In 1958, a Zeiss-Lyot monochromator acquired on occasion of the International Geophysical Year made photographic observations in the Hα line possible. In addition, a piggy-back mounted telescope on the coronagraph was used to record the photosphere on glass plates. A more detailed description about the early observations at KSO can be found in Kuiper (1946). Corona observations were suspended in 1964 as the seeing conditions on top of the mountain worsened. In 1973 all observations were transferred to the northern tower ( Figure 1) offering better seeing conditions (Pötzi et al., 2016).
In pre-digital times, i.e. up to the year 2000, observing was a combination of "manual" and "visual" work. Photographs were made on glass plates (later on sheet film and 36 mm film), which had to be manually exposed and afterwards developed. Observations at the coronagraph were on the one hand noted on special form sheets describing the intensity in the green (5303 Å) and red (6874 Å) a small telescope for testing purposes replaced the coronagraph after 1948. Since 1973 all observations are performed in the northern tower. corona lines (cf. Waldmeier, 1942) and on the other hand also photographs of the corona intensity in Hα (FWHM=20 Å) were taken (Comper and Kern, 1957). White-light observations on photographic material date back to 1943, images were recorded irregularly, mostly on occasion of big sunspots. From 1989 on every day at least three images were taken using the photoheliograph in the northern tower (Pettauer, 1990). Patrol observations of Hα images started in 1958 on an irregular basis and were already automatized in 1973 at a cadence of one image every 4 minutes on 35 mm film rolls. Large parts of the data have been digitized like the white-light images on sheet film from 1989 to 2007 (Pötzi, 2010) and the Hα film rolls from 1973 to 2000 (Pötzi, 2007). Digitising the corona images and the Hα images before 1973 is not planned as the effort is too high and the quality of the data is often very low. Digitizing the white-light images on glass plates between 1943 and 1970 is planned in the future. Sunspot drawings have always been made by hand and they will not be subject to automatized procedures in order to contain long-term consistency, as is explained in detail by Clette et al. (2014). Nonetheless all drawings are scanned immediately and published in our archive. In 2010 full disc observations in the Ca ii K line widened out the monitoring of the solar activity.

Instruments
The main instrument at KSO is the patrol instrument, which is in operation since 1973 in the northern tower. This instrument carries four telescopes ( Figure  2) on a parallactic mounting: (1) Ca ii K: A refractor with a diameter of 100 mm and a focal length of 1 500 mm. The system is protected by a dielectric energy reflection filter. The main filter was originally a DayStar etalon, which degraded in 2012 and was replaced by a Lunt B1800 Ca-K module in 2013. As the specifications required a F/20 configuration in order to guarantee the designed bandwidth (Hirtenfellner-Polanec et al., 2011) the aperture front lens was reduced to 70 mm. (2) White-light: A refractor with an objective lens of 130 mm and a focal length of 2000 mm. The broadband filter with a FWHM of 100 Å is centred in the green range of the visual electromagnetic spectrum at 5 460 Å (Otruba, Freislich, and Hanslmeier, 2008). The telescope is based on the Kanzelhöhe Photoheliograph (PhoKa) which went into operation in 1989 and was described in detail in Pettauer (1990). In order to compensate for thermal expansion the camera position is adapted each day. (3) Hα: A refractor with 100 mm diameter and a focal length of 1 950 mm. The objective lens is coated with gold serving as heat filter and the Zeiss Lyot Hα filter with a central wavelength of 6 562.8 Å and a FWHM of 0.7 Å is placed behind a broadband Hα pre-filter Pötzi et al., 2015). A beam-splitter provides the possibility to attach a second camera, which can be used for, e.g., ultra-high cadence observations with several images per second additional to the standard patrol observations. (4) Drawing Device: The drawing device is mounted near the declination axis of the telescope, which makes it comfortable to produce the drawing on the projected image (which has a diameter of 25 cm) and also minimizes the forces applied to the telescope by the drawing procedure itself. The drawing is used for obtaining the relative sunspot number, which is sent to SILSO (Sunspot Index and Long-term Solar Observations 1 ) World Data Center at the Royal Observatory of Belgium for calculating the International Sunspot Number (ISN), more details can be found in Pötzi et al. (2016).
An overview of the telescope configurations is given in Table 1. In the current configuration the same CCD camera type (2048×2048 pixels with 4 096 intensity levels) is used for data acquisition (further technical details on the camera specification can be found in Appendix A). Identical grabbing software and almost the same processing software is implemented for all observation types. This configuration reduces the workload in handling, maintaining and keeping up to date. As a measure of precaution we have acquired additional CCD cameras of the same type for immediate replacement if necessary.

Data acquisition
The data acquisition software is written in C++ and makes use of commercial camera control libraries (Common Vision Blox from Stemmer Imaging). The user interface ( Figure 3) is kept as simple as possible but also offers many additional features, which are not used in standard patrol mode. The observer marks a rectangular box on the solar disc: during enhanced solar activity this box is placed over an active region and in case of quiet solar conditions the box is placed at solar disc centre. This AOI (area of interest) is used for calculating the exposure time and the image contrast. The mean brightness in this AOI is set to a fixed value (600 counts for Hα in order to avoid saturation of the CCD chip in case of bright flares, 2 000 for white-light and 1 000 for Ca ii K). Based on these pre-defined mean values, the exposure time for the camera is calculated. As the camera is much faster (6 to 7 images per second) than the typical image cadence (6 seconds) the system can use frame selection and profits from very short moments of better seeing conditions (Scharmer, 1989). For this purpose the image contrast in the AOI is calculated, i.e., the camera selects from a sequence of about 10 images the one that has the highest rms contrast. Before and after the daily observations, when the objective lens is protected with the dust cover, a dark current image is made. For this purpose the exposure time is fixed to 3 msec, which corresponds to an average exposure time in patrol mode. Dark current images during the observation time are not possible as there always falls light onto the CCD chip, since the cameras are not equipped with a mechanical shutter. The button "SnapFixExpTimes" starts a series of images at 5 msec, 20 msec and 50 msec exposure time. It is used especially for the Hα camera in order to get an image of the lower corona in Hα light by overexposing the solar disc. These images are used as backup and additional data for the solar prominence catalogue of the Lomnický Štít Observatory (Rybák et al., 2011). All images are stored directly in a live archive on a raid system as raw FITS files and JPEG files for a quick inspection. . Flow diagram of the data pipeline for solar images at KSO. Each of the three branches -acquisition, processing and provision -is running on a separate system. All systems work in parallel, the whole process takes not more than 5 seconds for an individual image from acquisition to provision. Figure 4 shows the data pipeline for images from their recording at the CCD camera to the main archive. The whole process can be divided into three steps: data acquisition, data processing and data provision. Each step is performed by a separate workstation, which work in parallel. The whole process from data acquisition to the provision of the processed data takes about 5 seconds per image. Hα images undergo a second step of processing (FITS files of quality 1) in order to automatically detect and characterize flares and filaments in the realtime observations. This procedure is elaborated in detail in Pötzi et al. (2015) and evaluated in Pötzi, Veronig, and Temmer (2018).

Data pipeline
In the following, we describe the standard processing pipeline, which every image grabbed by one of the CCD cameras passes through. In order to keep the system simple and to reduce maintenance and work load for updates all following steps are performed by almost the same script that is executed three times in parallel, one instance for each of the 3 CCD cameras. This script calls individual programs, which process the images or manage the database. The scripts are started before sunrise and just wait for new images appearing in the live archive for processing until they stop after sunset.
Step 1: Before processing, the observed image is transferred from the live archive to the temporary archive, which can hold up to nearly one year of the raw observation data. In order to free space for new images, successively the oldest ones in this temporary archive are deleted. Normally in the live archive there is only the latest image. If there is some interruption or delay in the processing pipeline, a larger amount of images can accumulate there. But also in this case only the latest image is processed and transferred in order to prevent any delay in data provision. All images that remain on the live archive until the end of the observation day are processed later. The temporary archive is used as an emergency backup, in case the processing fails due to some unexpected reason or if even images of low quality can be of interest for inspection of some extraordinary solar events. It can also be of interest in developing algorithms for the parametrization of image quality or classification purposes (Jarolim et al., 2020), see Section 3.2.
Step 2: A crucial step is the quality check (described in detail in Section 3.2), that selects the images that are processed and stored in the main data archive. This procedure should be fast and deliver stable results independently of the solar cycle phase or time of day. The images are categorized as good (quality=1), fair (2) and bad. Images of quality 1 are suitable for all further automatic processing steps, whereas quality 2 images can still be used for visual inspection.
Step 3: Images of quality 2 (fair image quality, suitable for visual inspections) and of quality 1 (good quality) get a an updated FITS header containing all relevant image information, see Appendix C) and a normal contrast JPEG image is produced for real time display. The JPEG image is centred, contrast enhanced by unsharp masking and contains logos, date and time stamp and is overlaid with a heliographic grid. The FITS file and the JPEG file are stored in the data archive.
Step 4: From images of quality 1 additionally high contrast JPEG images are generated, i.e. they are corrected for global anisotropies in order to provide a homogeneous contrast across the solar disc (details in Section 3.4). Like normal contrast images, they are overlaid with a heliographic grid, they contain logos and a date and time stamp. These images are also stored in the data archive.
Dark current is not subtracted from the images, This effect cannot be seen in the JPEG images as the dark current correponds to a very low level of additional noise, which is removed by the JPEG compression algorithm. Flat field is also not applied for reasons explained in Section 3.4.3.

Image quality detection
In this section we describe the details of the image quality determination, which is in operation at KSO. The quality estimate makes use of a variety of properties of the images, which allow us to characterize the quality on both global and local scales: • exposure time • mean intensity in AOI • solar limb and radius determination, see 3.2.1 • large-scale image inhomogeneities, see 3.2.2 • image sharpness, see 3.2.3 Since the exposure time is automatically controlled and set in a way that the AOI has a pre-defined mean count value, it is sensitive to clouds and to a low elevation of the Sun above the horizon. The mean intensity in the AOI can vary when clouds move very fast across the solar disc, in such cases the exposure time adjustment can be too slow, and the image can be under-or overexposed.

Detection of solar limb and radius
This procedure is an enhanced version of the method published by Veronig et al. (2000) and is based on the limb detection by finding the limb points as the maximum gradient of intensity profiles in x and y direction. To get stable results the profiles are smoothed over 7 pixels before the gradient is applied via a morphological operation. For reducing the calculation time only 64 profiles from each direction are generated (see Figure 5). Through these limb points a circle is fitted using Taubins method (Taubin, 1991). This method is very stable and fast and it needs only a limited number of points for the fit. The circle fit tries to minimize which is the geometric distance from each detected limb point (x i ,y i ) on the solar limb to the fitting circle whose centre and radius are (a,b) and R ⊙ , respectively. As a measure for the quality of the circle fit we obtain the value σ which is the rms of d i . In order to improve the circle fit and to obtain a robust solution, outliers are iteratively removed. I.e., in the first iteration limb points with a distance from the fitted circle d ≥ R ⊙ /30 are excluded and a new circle fit is performed. If σ is still ≥ 2 this procedure is repeated with d ≥ R ⊙ /100 and if necessary also with d ≥ R ⊙ /200. In Figure 6 two examples demonstrate the workflow of this process. The whitelight image at good observing conditions in the first row needs just one iteration for finding sufficiently precise solar disc parameters, the outliers near the large sunspot group (red dots) are removed immediately. In the second row an Hα image is strongly disturbed by clouds. In this case all three iteration steps are needed in order to obtain a good circle fit through the limb. As the profiles used for detection of the limb points go from the image border one fourth into the Figure 5. Illustration of the determination of the solar limb and centre. The maximum gradient (green dots) of the intensity in 64 profiles for each direction is calculated. A circle fit through these points gives the radius and the centre coordinates of the solar disc. In this white-light image from 6 September 2017 large sunspots lead to some outliers in the first step of the limb detection, which are automatically removed in the following iterative steps.
image (cf. Figure 5), some of the detected points are aligned in almost a straight line (red dots in left image of the second row in Figure 6). These "outliers" are responsible for the bad circle fitting (overplotted green circle). Therefore in the next iterations outliers are removed and the circle fit is recalculated. The right image shows the result obtained in the last step, where the circle fit (indicated as green line) is within the required limits (σ ≤ 2). We note that such image is not further processed. This is an example to demonstrate how robust this method is. We note that the result of this limb finding procedure is also used to fine-tuning the telescope guider. Thanks to this robustness, the telescope position can be maintained accurately to the centre of the solar disc also during cloudy periods. Figure 7 shows the determined radius and the Hα image quality for a complete observation day for the Hα telescope (11 April 2020). In total 4 204 Hα images Figure 6. Illustration of the determination of the solar limb and centre. Detected limb points (red dots) and limb fit (green circle) obtained after the first (left panels) and final (right panels) iterations. In the first row a white-light image from 6 September 2017 at good observation conditions shows already after one iteration a good fit for the solar limb. In the second row clouds disturbed the Hα observations on 31 December 2020 and therefore three iterations where necessary to obtain a good circle fit.
were recorded on this day: 3 098 of quality class 1, 738 of class 2 and 375 of quality 3. One can see from the plot, that the observations get worse over the day. The observation conditions are commonly the best in the morning. In case of fine and sunny weather, over the day the rising air causes turbulences that decrease the seeing conditions. In the afternoon occurring cumulus clouds interrupt the observations, in most cases these clouds dissolve until the evening. The determined radius of the solar disc (bottom panel) reveals in general very stable results, with an average R ⊙ = 940.16 ± 0.52 pixels (determined from all images of quality class 1). The radius values in the morning and later in the afternoon are somewhat smaller due to refraction effects and less image motion. The radius determinations are coloured according to the corresponding image quality. This is a typical seeing situation during a fine sunny day at KSO, where the seeing conditions become worse during the day and cumulus clouds evolve in the afternoon. The data series plotted contains a total of 4204 images.
As one can also see, the radius distribution becomes wider when the image quality decreases.

Parametrization of large-scale image inhomogeneities
The detection of image inhomogeneities is normally a very computation expensive task, which can be done with structural bandpass filters (cf. Pötzi et al., 2015) or also with neural networks (Jarolim et al. (2020), see also Section 3.3). For the real-time processing this method must be fast and effective. To accomplish this task, in the current implementation at KSO, the recorded and centred image is reduced to 2×2 pixels and the ratio of the maximum to the minimum value of these pixels, the so called global quadrant intensity ratio (f pr), is computed. Images without any inhomogeneities should have a f pr of nearly 1, active regions or filaments have only a small influence on this ratio as their area is in the range of maximum a few percent of the solar hemisphere. Clouds, however, can shift this ratio to values far larger than 1 as illustrated in Figure 8 top right. A drawback of this method is that clouds uniformly distributed also lead to a value of about 1 (Figure 8 top left). In such case other measures are needed to quantify the reduced image quality like the exposure time or the image sharpness.

Parametrization of image sharpness
Normally for the image sharpness the rms of the intensity distribution is used, but in case of the Sun this value changes considerably with the solar activity. The presence of filaments, active regions or flares produce substantially higher images. The full-disc images are reduced to 2×2 pixels (right to each solar disc image) and the ratio of the maximum to the minimum of the 4 pixels is computed (annotated in each image). The images that are partially obstructed by clouds lead to high ratios, far higher than the optimum case of 1.
rms values compared to a quiet Sun. Therefore, for an alternative approach that works fully automatic, we use the central part of the solar disc, covering the central quarter of the image area, smooth it by convolving the subimage with a simple kernel consisting only of 1's, e.g., a kernel of size 3 looks like: For KSO images the kernel k 15 is used (≈15 arcsec), which is the same as averaging pixels in a neighbourhood of 225 pixels. This smoothed subimage is then correlated with the original subimage. Sharpness values S are then obtained by: where r is the Pearson's correlation coefficient between the smoothed and the original subimage. The factor of 1 000 was introduced to obtain integer results in a typical range up to ≈100. The reasoning behind this method is the following: when the smoothing of the image does not substantially change the image, i.e. when the image was already unsharp before smoothing, the value of r would be 1 and therefore S = 0. Typical values are S > 50 in case of quality class 1 Hα images, whereas images in quality class 3 have S < 25. These boundaries are lower in case of white-light and Ca ii K images.

Summary of quality determination
The three quality levels are determined by single or combinations of the above parameters or procedures, e.g, for Hα images: high exposure times (exp ≥ 18 ms): quality class 3 rms of solar radius determination > 5 pixel: quality class 3 global quadrant intensity ratio > 1.08: quality class 3 exp > 5 ms and rms of solar radius > 3: quality class 3 mean intensity in AOI ≤ 400 or ≥ 1200 counts: quality class 3 image sharpness < 25: quality class 3 image sharpness < 50: quality class 2 The settings for white-light and Ca ii K images differ slightly, like the mean intensity in the AOI has a much higher default value for white-light images as we do not expect large changes of image brightness, in contrast to Hα images that may vary strongly during flares. The parameters defining the quality classes for each camera are listed in Appendix Section B.

Quality parametrization with Generative Adversarial Networks
A different approach for image quality assessment of ground-based solar observations was presented by Jarolim et al. (2020), where the authors used a neural network to identify quality degradation. The method is based on generativeadversarial-networks (GANs) to model the true image distribution of high quality KSO Hα observations and assessing deviations from it, such that atmospheric influences (e.g., clouds) result in large deviations. This metric is more objective in terms of the solar activity level. The method provides a human-like quality assessment that agrees in 98.5% of the cases with human assigned labels. The developed neural network provides a continuous image quality metric and a binary classification into high-and low-quality observations. In the upper panel of Figure 9 we compare the image sharpness (defined in Section 3.2.3) with the continuous image quality value of the neural network. For comparison fixed thresholds in the image quality metric were set and additionally the binary classification to further distinguish between good (class 1) and fair (class 2) images was used (cf. Jarolim et al., 2020). The direct comparison shows that both assessment methods are in general in good agreement. The neural network shows a higher sensitivity for clouds, while it is less sensitive to the variations in seeing, in agreement with the objective for large scale image inhomogeneities. The fast performance of the neural network makes it suitable for the critical step of quality assessment in a real-time environment. The further extension to small scale quality estimations (e.g., seeing), multiple channels (e.g., white-light, Ca ii K) and the applicability to a real-time data pipeline are under investigation.

Centre-to-limb variation
In order to derive a centre-to-limb variation (CLV) profile we apply a median filter on each concentric ring of the solar disc with a width of one pixel. Features like sunspots, active regions or filaments do in general not have an effect on such a filter, as they are clearly smaller than the half length of such a concentric ring. However, close to the centre of the solar disc, these activity features can cover a substantial part of the rings. Thus, for robustness, for the inner rings a further post-processing should be applied, e.g., an interpolation via a CLV functional fitting as is described below. This procedure is computationally intensive, but as each ring can be handled independently the code can easily be parallelized.
According to Scheffler and Elsässer (1990) the CLV profile can theoretically be expressed as where I is the intensity, β is the centre-to-limb variation factor and θ is the exit angle of the light (disc centre: β = 0, limb: β = π/2). In order to use distances from the centre of the solar disc this equation can also be rewritten to with a as scale factor of the solar radius, b as centre-to-limb variation factor and x = r/R ⊙ . This formula does not describe the whole profile as the numerator is always larger than or equal one and the upper limit of the denominator is defined by 1 + b, which is in most cases smaller than 3. By fitting the calulated CLV profile by Eq. 6, a complete smooth CLV profile can be obtained which is not affected by intensity fluctuations introduced by the individual rings. In order to avoid the potential effects of solar activity features (sunspots, flares, filaments) on the inner rings, we applied the fits to different subranges (avoiding the inner parts) and evaluated the robustness of the fit results, namely These evaluations were done with KSO white light and Hα mages recorded at times of very low activity (no sunspots present) and the resulting fit range was then also used for images obtained at times of high activity. The fit result is extrapolated on the full range using Eq. 6 giving the new centre-to-limb variation (CLV new ) profile. This method also works for active solar conditions, i.e. images with magnetic features like sunspots in white-light or active regions in Hα. An example for this procedure for very high solar activity with one of the largest sunspot groups in the last decade on 22 October 2014 and for a quiet Sun from 1 August 2017 is show in Figure 10. This approach assures that large sunspots, filaments and flares close to the inner (smaller) rings, where they may produce a substantial effect on the obtained (median) ring intensities, do not affect the determined CLV profile. The application of this procedure to produce a smooth CLV is demonstrated in Figure 11. One can see that in the inner regions, the raw CLV profile calculated from the median intensities along the rings rings is affected by the flare (panel b). This effect is removed by the CLV fit and extrapolation for the inner parts r > 0.5R ⊙ (panel c). Also, the image contrast is improved considerably by dividing the original image with the CLV new intensity profile (panel d). We note that such strong deviations show up in the presence of large flares in Hα images, due to the large intensity enhancement during flares. Big sunspots in white light images do in general not reveal a significant distortion of the inner CLV rings.
Finally, the CLV profile fit parameters a and b were also studied in their evolution over complete observing days and compared to different other image parameters, such as exposure time (exp), the global image quadrant intensity ratio (f pr), the image sharpness parameter and the image quality (Q) from Jarolim et al. (2020). Figure 12 shows as an example comparison of these parameters over about one hour of Hα observations. As can be seen, the CLV parameters evolution during the day also delivers an assessment of the image quality. In general, values deviating from average a and b are related to lower image quality.

Global anisotropies
Normally the telescope optics introduces additional intensity inhomogeneities. This can be due to dust, stray-light, filters or even shutters (a good example can be seen in Denker et al. (1999)). In order to remove also such influences the method of obtaining the CLV profile has to be adapted by replacing the median of each concentric ring with a running median. This method was first used by K. A. Burlov-Vasiljev at Kiepenheuer Institute in Freiburg, Germany. For this purpose the filter width of the running median filter applied to each concentric ring has to be set in order to neglect solar features but still detect large scale inhomogeneities. A filter width of twice the radius of each concentric ring (≈ one third of the length of the ring) seems to be a choice that fullfills these criteria. The central part (r < R ⊙ /20) is treated as for the CLV determination, where the median of the whole disc inside this boundary is taken. In the Hα images at KSO there is a small intensity gradient from east to west (left to right), this can be seen in the contour lines of the anisotropy map of Figure 13. The right panel Figure 10. Radial CLV intensity profile derived from KSO white-light (left) and Hα (right) images. In the upper panel the images were selected during quiet Sun conditions on 1 August 2017. The lower panel shows the profiles for 22 October 2014, when a very large sunspot group was present. The red curve is the CLV profile calculated from the median intensity of the rings around Sun centre, the blue crosses correspond to the CLV functional fit to the data according to Eq. 6 for r > 0.5R ⊙ , and the dashed line is the extrapolation of the CLV fit to r < 0.5R ⊙ .
illustrates this gradient more apparently. The red profile from centre to north looks like a standard CLV profile, whereas the green profile from centre to west drops down too rapidly.
To get a widely flat image -having a uniformly distributed intensity level and everywhere almost the same image contrast -the image has to be divided by the obtained anisotropic map. Figure 14 shows a comparison between the original image (left) and the flat image (right). Especially features at the limb, like the small active region in the west (right), become better visible. The radial intensity profiles shown beneath the image demonstrates the flatness of the image, the higher values and the variations in the central part (r/R ⊙ ≈ 0) are a result of the small number of averaged pixels. The variations near r/R ⊙ = 0.55 are introduced by the large active region. The peak at the limb of the corrected profile is due to the roughness of the solar limb caused by seeing effects. The jump at r/R ⊙ > 1.0 in the intensity profile is a result of the scaling above the solar limb in order to enhance prominences.

Flat field determination
The Kuhn-Lin-Loranz (Kuhn, Lin, and Loranz, 1991) method is used to obtain a real flat field, that also includes smaller intensity variations, like dust particles: This method is based on the assumption that the Sun does not change its appearance within a few seconds. A set of Sun images shifted on the CCD is used to calculate the intensity for each CCD pixel. The more images are used and the less the Sun changes, good seeing conditions are a premise, the better the flat field becomes. A drawback of this method is, that this procedure needs manual interaction, and cannot be performed very often as it interrupts the patrol observations.    At KSO for such a flat field one centre image plus 28 shifted images are taken. The shifted images are on three concentric rings, four images with a shift of 115 pixel (≈ R ⊙ /8), 8 images with a shift of 230 pixel and 16 images with a shift of 345 pixel. The exposure time is set to a fixed value and the duration of the whole procedure is kept as short as possible in order to have almost the "same" Sun for all images. Taking the full frameset takes about four minutes, most of the time is used for moving the telescope. Starting with 2021, flat field frames are produced for all telescopes (Hα, Ca ii K and white-light), when the seeing conditions are exceptionally good or when there are any changes in the telescope setup. Figure 15 shows an example for flat field frames of all three telescopes. For Ca ii K images the interpolation of the CLV according to Eq. 6 does not work properly. The reason for this is the intensity distribution of the flat field, which seems to be produced mainly by the Ca ii K filter. This flat field shows a ring-like intensity enhancement at R ⊙ /3, the central intensity is even lower than in this ring. The white-light flat field (centre panel of Figure 15) shows a relatively uniformly distribution, some very small dust particles are visible. The Hα flat field (right panel of Figure 15) is dominated by three features: The interference pattern (dark and bright bands) are very likely produced by the Lyot filter, additionally there is a global intensity gradient from the centre to the left and to the right and there are some dust particles. We have to note that the contrast in these flat field frames was strongly enhanced to make all these features visible, the intensity difference within the solar disc is about two percent. The horizontal and vertical structures are an artefact due to the image motion caused by atmospheric conditions, which should be theoretically zero for applying the Kuhn-Lin-Loranz method. Also the small scale structures are a result of the seeing. To get rid of these artefacts a really exceptionally good seeing is necessary for getting a good flat field with this method. The most important application for such a flat field map is to detect dust particles on the optical parts and to see the influences of the telescope optics on the camera image. Applying such a flat field on the raw image can only be done after some smoothing steps in order to get rid of the fine structures introduced by the seeing.

KSO data archive
The image archive of KSO as presented in Pötzi, Hirtenfellner-Polanec, and Temmer (2013) underwent a number of changes and updates in the recent years. The most important improvement is the instant of time of availability of the data in the archive. Whereas the archive was normally updated at the end of an observing day, it is now updated continuously in quasi real-time simultaneously to the observations. Every minute, for each telescope one newly recorded image is transferred to the archive. As there are differences in the image cadence (10 images per minute for Hα and Ca ii K and 3 images per minute for white-light), additional recorded images are transferred to the archive after the observing day. The number of additional images to be transferred is selected depending on Figure 16. The data path for the full white-light data set. A data set of one daily processed image is in the synoptic path, the whole daily data is located in the archive path. camera type and solar activity. Normally three chromospheric (Hα and Ca ii K) images per minute are stored and one photospheric (white-light). In case of large solar flares 2 (defined of GOES class ≥ M1 or optical flare importance class ≥ 1) all images of good and fair quality recorded during flare activity are transferred to the archive.
The data archive consists of the synoptic and the main archive branch (see Figure16). The synoptic archive consists of one higher level image data set for each observing day. The main archive holds all the observed raw images as FITS Figure 17. The mirror archive located physically at University of Graz is operated for fast data access. In case of large data transfers this archive should be favoured.
files and their corresponding processed JPEG quick look files. The data hierarchy in the synoptic branch goes from data type to yearly directories. In the main archive the data are stored in yearly directories containing the folders for each observing day. All archive data are mirrored in a local archive simultaneously. With a delay of a few hours, the data are also transferred to a mirror archive located physically at the University of Graz (Figure 17), which provides a higher bandwidth for faster data transfer. The archive can be accessed via following ways: • KSO archive webpage http://cesar.kso.ac.at • KSO ftp ftp://ftp.kso.ac.at, instructions how to access the server can be found on http://cesar.kso.ac.at/main/ftp.php • for the transfer of large data sets we suggest the use of the mirror http:// kanzelhohe.uni-graz.at ( Figure 17) as it guarantees faster download rates. • ESA SSA Spaceweather portal https://swe.ssa.esa.int, registration is necessary to access this data.

Synoptic archive data products
The directory structure for the synoptic archive shown in Figure 16 (left) consists of a FITS and JPEG path for each camera containing a set of files for each observing day. The image is selected manually by the observer and set of various images and profiles is processed for displaying on the observatory website. These data are for a quick daily overview of the situation on the Sun.
The following files are generated: •

Main archive data products
The main archive contains all images of quality classes 1 and 2 in raw format (only FITS header updated) and as quick look JPEG files in various types as described below. The cadence of the data is three images per minute for Hα and Ca ii K observations and one image per minute for white-light. In case of flares this cadence is increased to 10 images per minute for chromospheric observations. On a day with good observing conditions and a very active Sun up to 10 000 images can be stored in the archive.
The archive consists of the following files in each daily directory  -a daily overview movie generated from greyscale JPEG files. [IdId] denotes a 4-digit internal number for identifying the flare region in the automatic flare detection system number. The colours in the coloured images are red for Hα and grey for white-light. The sizes of the jpg images are reduced to 1024×1024 pixels.

Derived higher level data products
The following higher level data products that are derived from the above data are also available: • Daily graphical observation logs are created after each observing day to present a quick overview with time marks for each archived image for all cameras (see Figure 18). These are created after each observing day and made available via the KSO archive webpage. • Sensitive filament maps are generated from the filament data produced by the automatic flare and filament detection system (Pötzi et al., 2015). These filament data are combined to hourly sensitive maps (Figure 19), where Hα images are overlaid with detected filaments. When the mouse pointer is moved over a filament, position, size and area information is shown. Via the ESA SSA space weather portal also data from the database can be obtained in a JSON 3 format. • Flare data and movies which are also produced by the automatic flare detection system are available within the ESA SSA Space weather portal and the KSO archive webpage. Each detected Hα flare is characterized by start time, peak time, end time and flare importance class. Each flare is linked to its corresponding interactive javascript movie (described in the main archive products above). • In the Hα light curves a plot of the brightest pixel in each Hα image is overlaid by GOES full-Sun SXR flux profiles. The GOES data is obtained from NOAA/SWPC (National Oceanic and Atmospheric Administration/Space Weather Prediction Center), using the long wavelength band (1.0 -8.0 Å). Additionally automatically detected flares together with their Hα importance class are annotated in the plot (see Figure 20).

Other data products and former data products
The links to the different data products can be found in Tab. 2.
• Prominence images: Once a day, when there are no thin clouds, a set of Hα images is taken with the exposure times up to 50 ms. As a result the solar disc is completely saturated, but prominences above the limb become better visible. Due to telescope limitations, prominences can only be viewed up to 1.13 R ⊙ . This data are used as complementary data to fill gaps of the Lomnický Štít prominence catalogue (Rybák et al., 2011). • The daily sunspot drawings are scanned immediately and available on the KSO archive webpage together with the derived sunspot relative numbers. This is the longest data set of KSO reaching back to 1944. • Hα photographic film data between 1973 and 2000 were scanned (Pötzi, 2007) and are available as full FITS and JPEG archive. • Hα CCD data observed with the former cameras (see Tab.1) with less resolution and less image depth are also available as synoptic and full data archive. • White-light photographic images, of which normally three exposures on 13×18 cm flat film were taken per day between 1989 and 2007, have been scanned and processed (Pötzi, 2010). The archive consists of the raw FITS files and JPEG images with overlaid heliographic grid. • NaD intensitygrams (5890 Å), dopplergrams and magnetograms of the Magneto Optical Filter (MOF) as described in Cacciani et al. (1999) (about the data reduction see Moretti and MOF Development Group, 2000). In the synoptic archive intensitygrams and magnetograms are available, the main archive consists of dopplergrams, intensitygrams and magnetograms. The data is only available from June 2000 to July 2002.

KSO Database
The database is located on Kanzelhöhe Electronic Archive System (KEAS, Otruba and Egarter, 2007) and holds all compulsory information about the images. The database is updated with every image transferred to the archive. E.g., the following data is stored for each image: • the camera brand and CCD size • the filter brand, wavelength and FWHM • date and time of image acquisition • exposure time in milliseconds • image quality (1-3) • centre coordinates x and y of the solar disc in pixel • radius of the solar disc in pixel • image size in x and y direction • filesize in bytes of the FITS file • filename of FITS file including path as accessible via http • qual: (optional) select the highest quality level to select, default is 3 i.e. 1,2 and 3 are selected. • filesize: (optional) set to 1 if the filesize in bytes should be returned, this can be of interest for estimating the download time.

Conclusion
This paper gives an overview of the data processing pipeline, the data archive and the data products of the KSO solar observations. The Kanzelhöhe data pipeline could act as an example of how to process data fast and effectively. The time from data acquisition to data provision is outstanding low, it can really be called "near real-time" data. This fast processing is due to the three separated tasks -acquisition, processing and provision -running on independent servers. The processing part, e.g., is even implemented on two workstations to reduce the workload, but can in case of a hardware failure run also on one workstation alone. The data are never stored locally on camera controllers, all data beginning from data acquisition to processed data and temporary data are on network attached storages (NAS) that are accessible from all workstations. This separation of tasks on different workstations has the advantage that all steps can run in parallel, each step is just waiting for data produced by the previous step. The second important point is an almost immediate and easy access to the observed data. For this purpose data in lower cadence (one image per minute) is transferred immediately after processing to the archive and made accessible via the database. At the end of an observing day the archive and the database are filled up with the rest of the data. The data can then be retrieved via web interfaces or ftp access. Database queries can be done directly over the archive web page or automatized via scripts using the described APIs. Both, the fast data processing and the fast data availability, can only exist due to the automatized data processing pipeline. The basis for this pipeline is the quality determination of the incoming data, that decides whether an image is dismissed or further processed. The provided data products serve as direct input to automated solar feature detection algorithms and allow to study the Sun in high-resolution and high-cadence. global quadrant intensity ratio > 1.08: quality class 3 exp > 5 ms and rms of solar radius > 3: quality class 3 image sharpness < 50: quality class 2 image sharpness < 25: quality class 3 mean intensity in AOI ≤ 400 or ≥ 1200 counts: quality class 3 Ca ii K filtergrams: high exposure times (exp ≥ 25 ms): quality class 3 rms of solar radius determination > 4 pixel: quality class 3 global quadrant intensity ratio > 1.10: quality class 3 exp > 15 ms and rms of solar radius > 3: quality class 3 image sharpness < 22.5: quality class 2 image sharpness < 14: quality class 3 mean intensity in AOI ≤ 500 or ≥ 1200 counts: quality class 3 white-light images: high exposure times (exp ≥ 12 ms): quality class 3 rms of solar radius determination > 3 pixel: quality class 3 global quadrant intensity ratio > 1.10: quality class 3 exp > 8 ms and rms of solar radius > 2: quality class 3 image sharpness < 8: quality class 2 image sharpness < 5: quality class 3 mean intensity in AOI ≤ 500 or ≥ 2500 counts: quality class 3 The contrast in white-light images seems to be more sensitive to clouds, therefore the limit for the exposure time setting is here very restrictive. The radius detection is most accurate for white-light as the photosphere shows a very sharp intensity drop at the limb. This explains the higher tolerance for the rms of the radius determination in Hα as compared to white-light. The granulation in white-light images disappears immediately when the image is smoothed. Therefore the limit for the image sharpness is set very low, i.e., this parameter is not very suitable for this image type.

C. FITS header
The FITS header keywords (see Tab. 3) used at KSO are mostly in accordance with the Metadata Definition for Solar Orbiter Science Data published by ESA (De Groof, Walsh, and Williams, 2019). Most of the keywords are clear, but some need an additional explanation and sevral keywords have the same value or meaning are included for compatibility reasons with older software. DATE-OBS = DATE-BEG Date and time of image capture. DATE Date and time of FITS creation. EXP_TIME, XPOSURE both are the exposure times but the first is in milliseconds and the latter in seconds.
CDELT1, CDELT2 the angular aperture of pixels in arcsec, this angle refers to the viewing angle and not to heliographic coordinates CRVAL1, CRVAL2 the value of CRPIX1 and CRPIX2 in arcsec, it is for the horizontal coordinate (CRPIX1-CENTER_X)×CRDELT1. ANGLE, CROTA1 The inclination of solar north clockwise and counter clockwise, it is the sum of SOLAR_P0 and the camera tilt angle. RSUN_REF The reference radius of the Sun in meters based on the IAU (Prša et al., 2016) value for the photosphere and for the chromosphere transit measurements in Hα from KSO were taken, resulting in a thickness of 3 600 km. RSUN_ARC The actual diameter of the Sun in arcsec depending on the distance of the sun and RSUN_REF. PRE_INT The requested intensity in the AOI for the frame selection procedure which defines the exposure time. A_O_INT the coordinates of the AOI rectangle.