{'fraction_non_alphanumeric': 0.022435063245015877, 'fraction_numerical': 0.007183384519285825, 'mean_word_length': 4.736637802329054, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Normalized and Asynchronous Mirror Alignment for Cherenkov Telescopes

Imaging Atmospheric Cherenkov Telescopes (IACTs) need imaging optics with large apertures and high image intensities to map the faint Cherenkov light emitted from cosmic ray air showers onto their image sensors. Segmented reflectors fulfill these needs, and as they are composed from mass production mirror facets they are inexpensive and lightweight. However, as the overall image is a superposition of the individual facet images, alignment is a challenge. Here we present a computer vision based star tracking alignment method, which also works for limited or changing star light visibility. Our method normalizes the mirror facet reflection intensities to become independent of the reference star's intensity or the cloud coverage. Using two CCD cameras, our method records the mirror facet orientations asynchronously of the telescope drive system, and thus makes the method easy to integrate into existing telescopes. It can be combined with remote facet actuation, but does not require one to work. Furthermore, it can reconstruct all individual mirror facet point spread functions without moving any mirror. We present alignment results on the 4 meter First Geiger-mode Avalanche Cherenkov Telescope (FACT).


Introduction
The Imaging Atmospheric Cherenkov Telescope (IACT) technique, with its large effective area, has opened the very high energy gamma ray sky to astronomy. Almost [1] all former [2,3], current [4,5,6,7,8], and future IACTs [9,10] make use of segmented imaging reflectors with apertures up to 614 m 2 [6]. Segmented reflector facets can be mass produced cost-efficiently with an acceptable image quality. Facets are much lighter than a monolithic mirror, which allows for very fast telescope repositioning, e.g. for gamma ray burst hunting.
However, there is one challenge to segmented reflectors. This is the task of manipulating the mirror facet orientations and positions to improve the spatial image resolution or to reduce the Point Spread Function (PSF)'s size, also known as alignment. Alignment needs to be done not only during installation but also in case of repair and replacement of facets. To find the few gamma ray induced events in the far more numerous class of hadronic cosmic ray induced events, the air shower records are analyzed for geometrical and temporal features. Higher image contrast, more isochronous photon arrivals, less image distortions, and higher spatial image resolution all help to lower the trigger and energy threshold of an IACT and further help to better reconstruct the energies and source positions of the primary particles. This makes alignment and mirror facet orientation determination important for an IACT.
Above this, determining the mirror facet orientations without manipulation of the facets orientations or positions is desirable to put the mirror facet orientations in the IACT simulations, which rely on precise input to calibrate the IACT.

Current methods
To tackle the challenge of alignment, several approaches are in use. We can summarize them in three categories.
First, there is the 2f method and its more general equivalent Bokeh alignment [11]. Both can be performed with simple hardware and minimal to no software.
With an artificial light source, the mirror facets are aligned without the need for clear nights or star light. However, 2f alignment is geometrically very restricted [12,3] and struggles to reach the most inner facets. The novel Bokeh alignment is less restricted but was not yet performed on typical observation elevations to correct for gravitational slump. In the first simple implementation of Bokeh alignment on an IACT, which was limited by the thin lens approximation, the method did not yet reach the same high quality PSF as the star tracking methods [11]. Second, there are methods which do direct PSF investigations on a tracked star using a dedicated image screen [13,6]. While achieving high PSF quality these methods make extensive use of mirror facet orientation actuation during alignment. Because of overcoming the PSF facet ambiguity using the mirror facet actuation, the run time of these methods scales linear with the number of facets.
Third, there is the VERITAS raster method [14] which is based on the SCCAN [15] method. Synchronized with the telescope's drive, the telescope rasters a grid on the sky dome close to a star while the mirror facets surfaces are recorded by a CCD camera, positioned in the reflector's focal point. In contrast to the direct PSF observations, many different pointing positions are needed to restore the mirror facet PSFs but on the other hand the raster method's run time is constant in the number of facets. Since the facet reflections are recorded through out the whole process of grid pointing, the method works best when the reference star's light intensity is steady over time, which favors clear nights and sticking to one particular reference star. Combining two records on different reference stars is not straight forward since the stars might have different light intensities. Also there is extensive bi-directional communication to the telescope drive, which needs a software interface.
Here we present an enhanced alignment system based on the VERITAS raster scan method. We implement a second CCD camera, that observes the reference star. Using the star's intensity observed in the second camera, our method normalizes the facet reflection intensities. Further the second camera is used to estimate the telescope's relative pointing, which makes communication to the telescope drive obsolete by recording asynchronously of it. We call it Normalized

Method and Implementation
Our NAMOD implementation uses two digital cameras, see Figure 1. First, the reflector camera monitors all the reflector's facets and is mounted in the focal point of the reflector. Second, the star camera is mounted parallel to the telescope's optical axis and observes the same part of the night sky as the telescope.   : Light rays and camera images when pointing off axis to a star. Here the telescope tilt Θ happens to make the misaligned facet reflect the star light into the reflector's focal point. In the reflector camera image the misaligned facet shows up bright whereas the rest of the facets are dark. In the star camera image, the star appears off center by the angel Θ.
Our NAMOD computer program reads out and adjusts both cameras. To determine the facet orientations, the telescope is pointed to a bright reference star in the night sky, see Figures 2 and 3. While the telescope moves close to the star, our NAMOD program, asynchronously from the telescope's drive, acquires images of the two cameras. Both random or spiral telescope movements close to the star are possible. The size of the region to move in depends on the prealignment state of the reflector. The better the pre-alignment, the smaller is the region to move in, the faster the NAMOD acquisition is done, see Section 4. To later reconstruct the PSFs of the mirror facets, our NAMOD program records the telescope's relative pointing Θ x , Θ y and the star's intensity s as well as the mirror facets reflection intensities m 1 ... m N of all the N facets. Instead of communicating with the drive of the telescope, our NAMOD program restores Θ x , Θ y directly from the star camera images. During a NAMOD recording, the reference star's light intensity s changes, e.g. due to clouds or varying zenith distance of the reference star. Also, s changes when switching to another star. All these changes in s reduce the capability of reconstructing the facet orientations because the light intensities observed in the reflections of the mirror facets m depend on the reference star.
The NAMOD method addresses this challenge by normalizing m using s, see Section 3.4. This way, the mirror facet orientations are recorded more independent of the sky quality or the reference star. After the recording is done: First the mirror facets PSFs are reconstructed, see Section 3.5. Second, the orientation of each facet is calculated using the reflection law and the reconstructed facet's PSFs, see Section 3.6. An overview of our implementation and example images are shown in Figure 4.

Cameras, calibration and control
We use two industrial digital cameras for our NAMOD implementation, see Table 1. First, a highly responsive 0.7 Mpixel camera and a wide angle lens serve as reflector camera, see Figure 5. Second, a 5 Mpixel camera with a high mapping quality lens is used as star camera, see Figure 6. We use the same cameras on Mini FACT and FACT.    To compare the light intensity observed in both cameras, the radiometric properties of the cameras have been measured. Knowing the exposure time T expo and the response of a pixel C pix , our NAMOD program calculates the absolute light intensity I pix , which is proportional to the photon intensity in this pixel. In our implementation we use log 10 (I pix ) = r resp · log 10 (C pix ) + r expo · log 10 (T expo ) + r const (1) to reconstruct I pix . The two slopes r resp and r expo as well as the offset r const are A calibration of the geometric properties of the star camera together with its lens is taken into account in order to later reconstruct the relative pointing directions Θ x , Θ y from the star camera images. Since the star camera lens distortion turned out to be negligible, an affine mapping relation is used where the angular resolution of a pixel α is shown in Table 1. For radiometric and geometric calibration we use methods inspired by [16] and [17].

Reference star identification
Our NAMOD program identifies stars in the star camera image to estimate the relative telescope orientation Θ x , Θ y and to measure the star's intensity s.
Our program accepts star images where only a single dominant star is present and where the shape and the size of the star is within an expected margin.
In our implementation we look for dominant stars with intensities 5 standard deviations above the initial image noise level and accept spatial sizes of about 0.025 • . If a star image is rejected, both star and reflector image are discarded and acquired again.

Mirror facet identification
The NAMOD method needs to know which pixel intensities I pix i of the i-th reflector image belong to a specific mirror facet j so that the mirror facets reflection intensity m i,j can be averaged from these pixel intensities. In our implementation, the NAMOD program is fed polygons describing mirror facets.
The polygons can have individual shapes and sizes. To define the polygons, a reflector camera image is used while all the facets edges are visible, see Figure   12.

Normalizing the mirror responses
In our NAMOD implementation, we extract for each record i the reflection intensity m i,j of the j-th mirror facet from the reflector camera image as well as the star's intensity s i from the star camera image. We obtain the normalized mirror facet reflection response by division. Figure 13 shows the performance of our radiometric camera calibration and the resulting normalization stability R(s).

Point Spread Function (PSF) reconstruction
By recording the normalized reflected intensity R j of the j-th mirror facet for many different pointings Θ x and Θ y , the NAMOD method records the PSF of the j-th mirror facet directly.
In our implementation of NAMOD, we export the mirror facets PSFs using 2D histograms H PSF because these are easy to interpret and work with. To fill the final H PSF , we take the exposure map of the pointings Θ x and Θ y into account. This is done as the telescope movement might be unevenly spread along the 2D pointing range. First, we fill for each mirror facet j a weighted 2D histogram H j raw . The normalized mirror response R i,j of each record i is filled into the bins of H j raw according to the corresponding pointing Θ xi and Θ y i . Second, we fill a 2D exposure histogram H exposure to count the numbers of records taken in a specific pointing bin. We then obtain the final 2D PSF histogram H j PSF for each mirror facet j, by bin wise dividing the facet's raw response using the exposure histogram: H j PSF = H j raw /H exposure . Figure 14 shows example PSF histograms recorded with our NAMOD implementation.

Correction Implementation
After recording and reconstruction of the individual mirror facet PSFs H PSF , our NAMOD implementation produces both human and machine readable instructions to correct the facet misalignments. First, we calculate the position Θ CoG,j of the Center of Gravity (CoG) in H j PSF for each facet j with respect to the reflectors focal point. Second, we calculate the correction angle to be applied to the j-th mirror facet Φ CoG,j using the reflection law Our NAMOD program knows the inverse kinematics of the mirror facet mountings of FACT so it can further give directly the manipulation instructions for the three linear joints of a mirror facet's tripod mount. Figure 12 shows an example of our NAMOD program's instructions.

The NAMOD development mock-up -Mini FACT
Our NAMOD implementation was developed on a mock-up called Mini FACT in order to not lose observation time on FACT. Mini FACT is a 10th scale model of FACT with similar tripod mirror facet mounting, see Figure 7 and

Reflector redesign and need for new alignment
In May 2014 we redesigned the FACT reflector, see Figure 8 and Table 3, to be a hybrid of Davies Cotton [19] and paraboloid geometry to decrease the reflector's time spread with an acceptable worsening of its spatial resolution.
Since FACT's overall timing precision of ≈ 0.3 ns used to be in the regime of the reflector's time spread, we changed the reflector's geometry to further improve the overall timing precision [20] and lower the minimal energy trigger threshold.

Numerical PSF comparison
For numerical guidance, we compare the areas A σ of the different PSFs before and after the NAMOD alignment, see Table 4. The area is defined by the ellipse spanned by the standard deviations of the light intensity distribution I pix (Θ x , Θ y ) along its principal components. Here

pre-alignment
After the redesign, we performed a first pre-alignment using the most simple version of Bokeh alignment [11], which led to the overall PSF shown in Figure 9.
The small pre-alignment PSF sped up the following NAMOD alignment since the movements close to the reference star could be limited to a region of the size of the pre-alignment PSF of ≈ 0.5 • in diameter.

NAMOD alignment
After pre-alignment, our NAMOD alignment fine tuned the FACT reflector in a single iteration resulting in the PSF shown in Figure 10. For this particular NAMOD alignment, our implementation took about 1300 records in 1 hour. Figure 12 shows the instructions provided by our NAMOD implementation, which were applied to FACT's mirror tripod mount joints manually using a goniometer. Deformation tests on FACT showed, that gravitational slump is not an issue on its reflector, but to be sure in this first NAMOD alignment, we chose only reference stars within 45 • zenith distance.

Theoretical lower PSF limit
For comparison we present the lower limit of the FACT reflector PSF found in ray tracing simulations in Figure 11. In the simulation, the FACT reflector has perfect spherical mirrors, a perfect alignment and the actual hybrid Davies Cotton and parabola geometry.

Direct PSF recording with dedicated image sensor
The PSFs in figures 9 and 10 are recorded with our radiometrically calibrated

Independence of night sky conditions
Two years after the initial radiometric calibration of the two cameras in our NAMOD implementation, we checked the normalization again, in the lab, and directly on a Mini FACT facet. Mini FACT was pointing to an artificial light source of adjustable intensity while our NAMOD setup was taking records. Figure 13 shows the recorded 'star' intensity s and the normalized mirror intensity R(s). The normalized mirror intensity R changes only (17.2 ± 0.5)% when s changes by one order of magnitude, respectively it changes (6.9 ± 0.2)% for one step of s in apparent magnitude. Our NAMOD implementation aligned Mini FACT several times successfully on the partly clouded night sky of Dortmund, Germany. Unusable records were rejected automatically and we did not notice a drop in PSF reconstruction quality although the reference stars and their intensities changed during the process. This shows, that our NAMOD implementation's intensity normalization helps to reconstruct the facets orientations more independent of the sky conditions across the full range of possible reference star magnitudes.

PSF reconstruction performance
To demonstrate the performance and repeatability of our NAMOD implementation, we show that the individual mirror facet PSF signatures can be identified for two NAMOD runs, separated by one year, see Table 5. Without moving or tilting the facets, our NAMOD implementation recorded the facets orientations to feed the FACT IACT simulation so that mismatches between observed and simulated air shower records can be reduced.

Conclusion
Our NAMOD implementation is stable and delivered a high quality PSF during its first use. In a single iteration on FACT, our NAMOD implementa-tion narrowed the PSF area down from 1149% to only 260% of the theoretical PSF area limit found in ray tracing simulations, where the ray tracing was done for perfect mirror facets and a perfect alignment. The mirror facet reflection normalization allows to switch to various reference stars during recording and makes facet orientation reconstruction less dependent on changes in sky quality or zenith distance. The absence of telescope drive communication, and the flexible feeding of facet geometry makes our NAMOD implementation a simple to use, plug and play solution, that can be applied to similar telescopes easily.
For example it can be applied to Mini FACT, which runs a completely different drive software. The pocket Mini FACT mock up sped up the development of our NAMOD implementation while no observation time was lost on FACT.
In future implementations one might install the NAMOD cameras permanently.
On FACT, our NAMOD implementation was mounted temporary but a permanent installation is possible when placing the reflector camera and the pseudo optical axis on top of the lid of the telescope's image sensor. The reflection coefficients of the mirror facets might be determined as well. The normalization stability R(s) might be further improved by not using electric light bulbs but light sources with a spectral distribution closer to the one of stars. Also, the NAMOD records might be used to validate the ray tracing IACT simulation when used as directional look up table for a given aperture intersection. An adaptation of NAMOD on the dual mirror Schwarzschild Couder telescopes of the Cherenkov Telescope Array (CTA) [9] is not straight forward. However, because of the PSF quality, but especially because of the flexibility and the tolerance for a wider range of night sky conditions, we believe NAMOD is ideal for the future single mirror (single primary segmented reflector) telescopes of CTA.