Zonal wavefront reconstruction of Shack–Hartmann and Hartmann patterns with hexagonal cells

Zonal wavefront reconstruction of Shack–Hartmann and Hartmann patterns with hexagonal cells

Optics Communications 427 (2018) 61–69 Contents lists available at ScienceDirect Optics Communications journal homepage: www.elsevier.com/locate/opt...

3MB Sizes 0 Downloads 25 Views

Optics Communications 427 (2018) 61–69

Contents lists available at ScienceDirect

Optics Communications journal homepage: www.elsevier.com/locate/optcom

Zonal wavefront reconstruction of Shack–Hartmann and Hartmann patterns with hexagonal cells Francisco Javier Gantes-Nuñez *, Zacarías Malacara-Hernández, Daniel Malacara-Doblado, Daniel Malacara-Hernández Centro de Investigaciones en Óptica, C.P. 37150, León, Gto., Mexico

ARTICLE

INFO

Keywords: Aberrations Wavefront reconstruction Optical testing Hartmann test Shack–Hartmann test

ABSTRACT In this article we will develop a method to integrate Shack–Hartmann and Hartmann pattern with hexagonal cells, using a polynomial representation (modal integration) over each hexagonal cell. Since each hexagonal has six sampling points, one at each vertex, instead of the typical four sampling points in square cells, it is possible to have a different representation of the wavefront in each cell, each with different aberration terms. The local curvatures and low order aberrations in each cell are calculated more accurately than for square cells. All the analytical functions over each hexagonal cell have a different unknown piston term, that is calculated with a method to be described here. As a result, wavefront retrieval and representation of freeform optical surfaces for some optical systems can be made, due to the calculation of aberrations in each hexagonal cell.

1. Introduction Wavefront retrieval has become a common step in modern optical testing. When using the Hartmann [1] or Shack–Hartmann [2] test, there are several wavefront retrieval or reconstruction techniques that have been developed, with different advantages and disadvantages all of them. They can be classified in modal and zonal methods. Modal methods include a fitting of the whole wavefront in the pupil to a polynomial, frequently in the form of a Zernike polynomial. If some local deformations with relatively high spatial frequency components are present, the polynomial representation smoothens sharp details at the wavefront, losing most information about these deformations, depending on how many modes are used in the reconstruction. Zonal integration methods do not use a polynomial representation. The most common is the Newtonian or trapezoidal integration [3]. Most of these methods produce very good results if the surface or wavefront is nearly a sphere, but if local small deformations are present, they cannot be obtained and the result does not have a good accuracy. The reason is that if the sampling points separation is large, when integrating between two different sampling points, along different paths, the result is not exactly the same. Zonal methods using a local polynomial representation in an array of square cells had been proposed by the authors [4]. This representation has several advantages. Since the polynomial representation is not global, but zonal, small local deformations are better represented. *

Even free form surfaces can be represented with this method. Another advantage is that local curvatures are directly obtained for each sub aperture cell. In this work we propose a kind of modal method within a zonal representation, since a polynomial or modal representation is independently made inside of each cell that covered the whole pupil, but instead of squares as in our previous publication [4], we propose to use an array of hexagons. This arrangement provides a higher density of spots [5–7] than in an array of square cells, assuming that the lenslets in Shack– Hartmann or the holes in Hartmann test are of the same diameter. Fig. 1 shows two circular pupils with the same diameter, and lenslets or holes also with the same diameter. Furthermore, Fig. 1 shows that if we choose a maximum diameter of the hole or lenslet, the hexagonal array allows to cover a larger area from the pupil than the square array. As in our previous work [4,8] mentioned, the square array is the simplest one, but with it we can obtain the tilts in two orthogonal directions, the spherical power and the astigmatism components. The hexagonal array configuration is complicated to analyze due to the geometry, but it increases the number of aberrations coefficients that can be calculated. For a hexagonal cell of a given cell size, we have two possibilities, either, the located sampling points at the center of the cells or at the vertices. In the first case, the holes or lenslets almost cover the whole pupil, while in the second case there are not sampling points at the center of the cells. However, given a hexagonal cell size, there is a higher sampling

Corresponding author. E-mail address: [email protected] (F.J. Gantes-Nuñez).

https://doi.org/10.1016/j.optcom.2018.06.027 Received 19 February 2018; Received in revised form 9 May 2018; Accepted 11 June 2018 0030-4018/© 2018 Elsevier B.V. All rights reserved.

F.J. Gantes-Nuñez et al.

Optics Communications 427 (2018) 61–69

Fig. 1. (a) Hexagonal distribution with a maximum diameter of the holes. (b) Square distribution with the same maximum diameter of the holes that in the hexagonal array.

Shack–Hartmann test [11,15]. Also, spline techniques [16,17] have been used to enhance wavefront reconstruction. Our work presented in this paper can be similar to the spline methods, but the main difference is the basis used to represent the individual polynomial of each cell. Another difference is the use of a hexagonal array of sampling points that we use to generate the wavefront retrieval. In our case, in this paper we change the array geometry of the lenslets proposed in our previous work. The developed method of wavefront retrieval using hexagonal cells is described in the following sections. Also, it is necessary to add a previous analysis to design the distribution of the lenslets in the hexagonal array and the way how can be designed the Hartmann plate.

density if the sampling points are at the vertices and not at the center of the cells. We will use this configuration. If we decided to place another sampling point at the center of the hexagonal cell, our analysis would have to consider a screen with triangular cells instead of hexagonal cells. In the proposed method, the hexagonal array generated by the Hartmann screen covers the whole pupil and hexagonal cells can be formed. After the hexagonal cells were created, a particular analytical expression for each cell is generated in an exact manner, using the twelve data available (the two slopes at each vertex), as a previous papers [8,9]. By using hexagonal cell, plus the coefficients obtained from a square cell, coma aberrations and triangular astigmatisms can be found. It is well-known that the Hartmann screen test method measure the local wavefront slopes, transverse aberrations as they are commonly known, thus, an integration method is necessary to make the wavefront reconstruction by converting gradients to phase. For this reason, a huge number of methods to wavefront retrieval have been created and classified in two types, modal and zonal. One of the most commonly used zonal methods retrieves the wavefront by Newtonian or trapezoidal integration. However, a disadvantage is that if the optical surface or wavefront to be measured has strong aberrations with wavefront high spatial frequency components, the local slopes can change abruptly and, the retrieved wavefront cannot contain the high spatial frequency components. Research on wavefront retrieval techniques has been continuously developing due to the improving accuracy for methods for wavefront sensing. A reason is that an important application of wavefront sensing is the use in the study of human eye. The fact that low-order aberrations can be measured and corrected in clinical practice, but since some high-order aberrations, such as coma and spherical aberrations, are difficult to correct and measure, it is important to continue the research in this area [10]. Visual personalized correction is the objective that new research in wavefront sensing is aimed to develop new methods and techniques. Wavefront aberrations can be used to describe the optical properties of the human eye, and the Shack–Hartmann sensor is a common technique used by aberrometers to obtain the ocular aberrations [11]. The addition of freeform optical surfaces to an optical system is another reason to maintain the research in wavefront analysis techniques. A freeform surface can be interpreted as a non-rotationally symmetric surface [12] and which can reduce the number of elements, decrease the aberrations and the size of the system [13]. The problems with the freeform optical surfaces are their fabrication and testing, and sometimes the cost of manufacturing [12–14]. Many efforts have been realized to make algorithms and tests that can solve the issues of freeform optical surfaces test [12,14]. As can be seen, several methods and techniques have been developed in recent years, aimed to increase the wavefront retrieval based on

2. Coordinates for the center and vertices of the hexagonal cells Given an array of hexagons, the center of the holes or lenslets, which produce the sampling points by focusing, can be placed at the center of each hexagon or at each vertex. In our case we place the holes or array in a configuration which allows to generate a hexagonal cell at the center of the pupil. When performing the integration, the location of each hexagonal cell within the whole cell array inside the circular pupil has to be described by a pair of numbers. However, to use Cartesian coordinates or polar coordinates becomes complicated. A simpler system is proposed, as in Fig. 2, where we need two numbers to define the location of any hexagonal cell. A hexagonal cell is at the center of the pupil, with hexagonal rings of cells around this central cell with numbers 𝑛 = 1 to N. Each ring has 𝑛 hexagonal cells on each side, so that the total number of cells in the ring is 6𝑛. Finally, all cells at any hexagonal ring are numbered with 𝑚 = 1 at the first cell of the first side, with a maximum equal to 6𝑛. These definitions can be more clearly seen in Fig. 2. The size of each hexagonal cell is determined by its side length 𝑠 or its apothem 𝑎, which are related by: √ 3 𝑎= 𝑠 (1) 2 We define an auxiliary parameter 𝑘 representing the side number for the hexagonal ring, where 𝑘 = 1 for the first side at the right and in the upper part of the pupil. It can be shown that given a pair of values 𝑛 and 𝑚, the value 𝑚 begins at the 𝑥 axis, increasing its value in an counter clockwise direction. The value of 𝑘 is given by: [ ] 𝑚−1 𝑘 = 𝑖𝑛𝑡 +1 (2) 𝑛−1 where int is the non-rounded integer value. It is now convenient to express the location of a hexagonal cell in a ring 𝑛, with a number 𝑚′𝑘 instead of the number 𝑚. The difference is that the beginning for the number 𝑚 is at the first hexagonal cell of the whole hexagonal ring, while the origin for number 𝑚′𝑘 is at the first cell 62

F.J. Gantes-Nuñez et al.

Optics Communications 427 (2018) 61–69

Fig. 4. A triangle in which one side is part of the hexagonal ring and a vertex at the pupil center.

from which we can obtain the value of 𝜌 as: (√ ) [ ( ′ )2 ( ′ )] 2 𝜌= 3 (𝑛 − 1) + 𝑚𝑘 − 1 − (𝑛 − 1) 𝑚𝑘 − 1 𝑠

Fig. 2. Coordinate numbers for hexagonal cells in hexagonal array.

(7)

Now, applying the trigonometric sine law to the same triangle we can see that the angle 𝜃𝑘′ is given by: ( ) 3 𝑚′𝑘 − 1 𝑠 (8) sin 𝜃𝑘′ = 2𝜌 and it can also be shown that the angle 𝜃 in radians is: 𝜋 (9) (𝑘 − 1) 3 Summarizing, with these equations, if we have the pair of numbers 𝑛 and 𝑚 defining the location of a cell of the array of hexagonal cells, we can find the polar coordinates 𝜌 and 𝜃 for this cell. 𝜃 = 𝜃𝑘′ +

3. Hexagonal cells and vertices density in a circular pupil Let us consider a hexagonal array of hexagonal cells, where there is a central cell rounded with rings of hexagonal cells. The first ring around the central cell is labeled ring number one (𝑛 = 1). We have seen before that each ring has 𝑛 hexagonal cells on each side, so that the total number of cells in the ring 𝑛 is 6n. Then, by adding up the number of cells in each ring, in an array with N rings, plus one at the center, we have a total of 𝑀𝑐 cells, as given by:

Fig. 3. Illustration of the meaning of the values of 𝑘 and 𝑚′𝑘 , and the angles 𝜃 and 𝜃𝑘′ .

of the side 𝑘 of the ring. In an analogous manner, the angles 𝜃 and 𝜃𝑘′ are defined, as illustrated in Fig. 3. The triangle formed by the first cell in a side 𝑘, a cell with position 𝑚′𝑘 in the ring and the center of the pupil, is in Fig. 4, where the angles are labeled. From the center of the pupil to the cell at the beginning of the line 𝑘 is 𝜌0 and from the center of the pupil to the cell being considered is 𝜌. The distance from the center of any polygon to a vertex is called a circumradius. In the case of a hexagon it is equal to its side. For the hexagonal ring it has a value 𝜌0 be given by: 𝜌0 = 2(𝑛 − 1)𝑎 =

√ 3(𝑛 − 1)𝑠

𝑀𝑐 = 1 + 6 (1 + 2 + 3 + 4 + ⋯ + 𝑁) = 3 (𝑁 + 1) 𝑁 + 1

It is also important to determine the total number of vertices 𝑀𝑣 in the circular pupil, with N rings of hexagonal cells around a central cell. If N is not larger than six, it is equal to the number of sampling points, as in Fig. 5. It is given by: 𝑀𝑣 = 1 + 6 (1 + 3 + 5 + 7 + ⋯ + (2𝑁 + 1)) = 6(𝑁 + 1)2

On the other hand,

𝑚′𝑘

(3)

(4)

and 𝑚 are related by:

𝑚′𝑘 = 𝑚 − (𝑘 − 1) (𝑛 − 1)

Thus, if D is the diameter of the pupil: ) [ ]1 𝐷 = 3(2𝑁 + 1)2 + 1 2 + 1 (14) 𝑠 If we detect M spots (sampling points) in the Shack–Hartmann or Hartmann plate, in the corresponding screen there should also be M (

(5)

From Fig. 4 using the trigonometric cosine law we can find: ( )2 ( ) ( ) 𝜌2 = 3(𝑛 − 1)2 𝑠2 + 3 𝑚′𝑘 − 1 𝑠2 − 6 (𝑛 − 1) 𝑚′𝑘 − 1 𝑠2 cos 60◦

(11)

If we consider R as the radius (semi-diameter) of the pupil, we can establish a relation: ( ) ( )2 𝑠 2 𝑠 𝑅− = [(2𝑁 + 1) 𝑎]2 + (12) 2 2 Assuming that the circles in the Hartmann screen can have s as the maximum diameter. Thus, using (1) the radius of the circumscribed circle becomes: ( )( ) ( )[ ]1 [ ]1 𝑠 𝑠 𝑠 𝑅= 3(2𝑁 + 1)2 + 1 2 + = 3(2𝑁 + 1)2 + 1 2 + 1 (13) 2 2 2

where s is the side and a is the apothem of the cells. The distance from the beginning of the line 𝑘 for a hexagonal ring 𝑛 to the cell 𝑚′𝑘 is: √ ( ( ) ) 2 𝑚′𝑘 − 1 𝑎 = 3 𝑚′𝑘 − 1 𝑠

(10)

(6) 63

F.J. Gantes-Nuñez et al.

Optics Communications 427 (2018) 61–69

Fig. 5. Hexagonal arrays in a circular pupil.

astigmatism terms 𝐴4 and 𝐴5 , even the coma terms 𝐴6 and 𝐴7 , and the mentioned triangular astigmatisms terms 𝐴8 and 𝐴9 . To obtain the values of the coefficients terms, we apply least square fitting and following the procedure described in our previous papers [4,8], the final equations obtained with (16), substituting the measurements transverse aberrations along the x and y coordinates, 𝑇 𝐴′𝑥 and 𝑇 𝐴′𝑦 , are: (We have used the primes to indicate that they are measure data and not variables) √ √ 1 𝐴1 = − [− 3𝑇 𝐴′𝑦 + 3𝑇 𝐴′𝑥 + 3𝑇 𝐴′𝑦 1 2 3 6𝑟𝑤 √ √ ′ ′ ′ − 3𝑇 𝐴𝑦 + 3𝑇 𝐴𝑥 + 3𝑇 𝐴𝑦 ] (17)

active lenslets or holes. Using (11) we see that these lenslets or holes form the array of hexagons with N rings of hexagons, as follows: √ 𝑀 𝑁= −1 (15) 6 If we substitute this value of N in (14) we find the ratio D/s. This value allows us to reconstruct the Hartmann screen geometry, which is one of those in Fig. 5. Table 1 shows some hexagonal arrays with the number of rings, of hexagonal cells, sampling points and the ratios D/s. As we have mentioned, using the ratio D/s we can retrieve the Hartmann screen configuration. Then, with it, we can generate the transverse aberrations produced by this ideal Hartmann screen with just defocusing. Thus, the transverse aberrations are measured, with respect to the Hartmann spots produced by these reference transverse aberrations, producing a wavefront retrieval with respect to a close reference sphere, and not necessarily with respect to an osculating sphere with center of curvature at the paraxial focus.

4

√ √ 1 [− 3𝑇 𝐴′𝑥 + 2𝑇 𝐴′𝑦 − 𝑇 𝐴′𝑦 + 3𝑇 𝐴′𝑥 + 2𝑇 𝐴′𝑦 1 3 1 3 2 6𝑟𝑤 √ √ ′ ′ ′ ′ ′ − 3𝑇 𝐴𝑥 + 2𝑇 𝐴𝑦 − 𝑇 𝐴𝑦 + 3𝑇 𝐴𝑥 + 2𝑇 𝐴𝑦 ]

(18)

√ √ 1 [ 3𝑇 𝐴′𝑥 + 𝑇 𝐴′𝑦 + 2𝑇 𝐴′𝑦 − 3𝑇 𝐴′𝑥 − 𝑇 𝐴′𝑦 1 3 1 2 3 24𝜌𝑟𝑤 √ √ ′ ′ ′ ′ ′ − 3𝑇 𝐴𝑥 − 𝑇 𝐴𝑦 − 2𝑇 𝐴𝑦 + 3𝑇 𝐴𝑥 − 𝑇 𝐴𝑦 ]

(19)

√ √ 1 [ 3𝑇 𝐴′𝑥 − 𝑇 𝐴′𝑦 − 2𝑇 𝐴′𝑦 − 3𝑇 𝐴′𝑥 − 𝑇 𝐴′𝑦 1 1 2 3 3 24𝜌𝑟𝑤 √ √ ′ ′ ′ ′ ′ − 3𝑇 𝐴𝑥 + 𝑇 𝐴𝑦 + 2𝑇 𝐴𝑦 + 3𝑇 𝐴𝑥 + 𝑇 𝐴𝑦 ]

(20)

√ √ 1 [𝑇 𝐴′𝑥 + 3𝑇 𝐴′𝑦 + 2𝑇 𝐴′𝑥 + 𝑇 𝐴′𝑥 − 3𝑇 𝐴′𝑦 1 1 2 3 3 24𝜌𝑟𝑤 √ √ ′ ′ ′ ′ ′ − 𝑇 𝐴𝑥 − 3𝑇 𝐴𝑦 − 2𝑇 𝐴𝑥 − 𝑇 𝐴𝑥 + 3𝑇 𝐴𝑦 ]

(21)

√ √ 1 [𝑇 𝐴′𝑥 + 3𝑇 𝐴′𝑦 − 2𝑇 𝐴′𝑥 + 𝑇 𝐴′𝑥 − 3𝑇 𝐴′𝑦 1 1 2 3 3 12𝜌2 𝑟𝑤 √ √ ′ ′ ′ ′ ′ + 𝑇 𝐴𝑥 + 3𝑇 𝐴𝑦 − 2𝑇 𝐴𝑥 + 𝑇 𝐴𝑥 − 3𝑇 𝐴𝑦 ]

(22)

√ √ 1 [ 3𝑇 𝐴′𝑥 − 𝑇 𝐴′𝑦 + 2𝑇 𝐴′𝑦 − 3𝑇 𝐴′𝑥 − 𝑇 𝐴′𝑦 2 1 1 2 3 3 12𝜌 𝑟𝑤 √ √ ′ ′ ′ ′ ′ + 3𝑇 𝐴𝑥 − 𝑇 𝐴𝑦 + 2𝑇 𝐴𝑥 − 3𝑇 𝐴𝑥 − 𝑇 𝐴𝑦 ]

(23)

𝐴2 = −

4

4. Wavefront retrieval in a hexagonal cell

4

6

5

6

𝐴3 = −

The wavefront deformations measured at the six vertices of a hexagonal cell, can be represented by nine aberrations terms as follows [4]:

4

4

6

5

6

𝐴4 = −

𝑊 (𝜌, 𝜃) = 𝐴1 𝜌 cos 𝜃 + 𝐴2 𝜌 sin 𝜃 + 𝐴3 𝜌2 + 𝐴4 𝜌2 cos 2𝜃 + 𝐴5 𝜌2 sin 2𝜃 + 𝐴6 𝜌3 cos 𝜃 + 𝐴7 𝜌3 sin 𝜃 + 𝐴8 𝜌3 cos 3𝜃 + 𝐴9 𝜌3 sin 3𝜃

6

5

(16)

4

where the piston term has been lost, since the transverse aberrations come from the first derivative and as the piston term is a constant. Consequently, this is not obtained.

4

6

5

6

𝐴5 = −

4

4

4.1. Calculation of the aberration coefficients Once the circular pupil of the system was covered by an array of hexagonal cells, we have to found a polynomial that can retrieve the local region of the wavefront. As described in a previous paper [8], for the case of six sampling points it is possible to determine the third harmonic component, i.e., the triangular astigmatisms terms 𝐴8 and 𝐴9 . This is because with six sampling points we have twelve measured slopes, so, there is more information that can be used to compute the wavefront tilt coefficients 𝐴1 and 𝐴2 , the defocus term 𝐴3 , the

5

6

6

𝐴6 = −

4

4

5

6

6

𝐴7 = −

4

64

4

5

6

6

F.J. Gantes-Nuñez et al.

Optics Communications 427 (2018) 61–69 Table 1 Number of hexagonal cells, sampling points and the ratio 𝐷∕𝑠 as function of number of rings 𝑁, as in Fig. 4. Number of rings (𝑁)

Hexagonal cells (𝑀𝑐 )

Sampling points (𝑀𝑣 )

𝐷∕𝑠

1 2 3 4 5 6 7

7 19 37 61 91 127 169+3=172

24 54 96 150 216 294 284+18=302

6.2915 9.7178 13.1655 16.6205 20.0788 23.5389 27

Fig. 7. Distance of two points inside of a hexagonal cell, and relation between the apothem length.

Then, using the value of 𝜌𝑖 and varying the angle 𝜃 from 0◦ to 360◦ , in increments of 60◦ , we can obtain the (𝑥𝑖 , 𝑦𝑖 ) coordinates from the well-known coordinate conversion expressions:

Fig. 6. Pupil covered with the hexagonal cells and the interpolated spots.

√ √ − 3𝑇 𝐴′𝑦 − 2𝑇 𝐴′𝑥 + 𝑇 𝐴′𝑥 + 3𝑇 𝐴′𝑦

1 [𝑇 𝐴′𝑥 1 1 2 3 36𝜌2 𝑟𝑤 √ √ ′ ′ ′ ′ + 𝑇 𝐴𝑥 − 3𝑇 𝐴𝑦 − 2𝑇 𝐴𝑥 + 𝑇 𝐴𝑥 + 3𝑇 𝐴′𝑦 ]

𝐴8 = −

4

4

5

3

6

6

√ √ 1 [ 3𝑇 𝐴′𝑥 + 𝑇 𝐴′𝑦 − 2𝑇 𝐴′𝑦 − 3𝑇 𝐴′𝑥 + 𝑇 𝐴′𝑦 1 3 1 3 2 36𝜌2 𝑟𝑤 √ √ ′ ′ ′ ′ ′ + 3𝑇 𝐴𝑥 + 𝑇 𝐴𝑦 − 2𝑇 𝐴𝑦 − 3𝑇 𝐴𝑥 + 𝑇 𝐴𝑦 ]

(24)

4

5

6

6

(25)

The obtained equations were generated from the fact that the six sampling points are related to the center of the hexagonal cell. Because the error function has to be derivated with respect to each aberration coefficient, the piston term is lost, but then in the text we obtain the piston term for each hexagonal cell.

After the aberration coefficients obtained, the wavefront retrieval is the next step. Thus, as the values of vertices from the hexagonal cells were obtained by the Shack–Hartmann test, new values inside of the cells can be used to find the wavefront deformations 𝑤𝑖 (𝑥, 𝑦), and drawn as shown in Fig. 6. The new values were calculated from the relation between the apothem and the side of the hexagonal cell, (1), and Fig. 7, as follow: 3 𝜌 2 𝑖

√ 3 3 𝑠 𝑠 = 𝜌𝑖 → 𝜌𝑖 = √ 2 2 3

𝑦𝑖 = 𝑦𝑐 + 𝜌𝑖 sin 𝜃

(29)

( ) 𝑤𝑖 (𝑥, 𝑦) = 𝐴1 (𝑥, 𝑦)𝑥 + 𝐴2 (𝑥, 𝑦) 𝑦 + 𝐴3 (𝑥, 𝑦) 𝑥2 + 𝑦2 ( 2 ) + 2𝐴4 (𝑥, 𝑦) 𝑥𝑦 + 𝐴5 (𝑥, 𝑦) 𝑥 − 𝑦2 ( ) ( ) + 𝐴6 (𝑥, 𝑦) 𝑥 𝑥2 + 𝑦2 + 𝐴7 (𝑥, 𝑦) 𝑦 𝑥2 + 𝑦2 ( 2 ) ( ) + 𝐴8 (𝑥, 𝑦) 𝑥 𝑦 − 𝑥2 + 𝐴9 (𝑥, 𝑦) 𝑦 𝑦2 − 𝑥2

4.2. Calculation of the aberration values within the cells

2𝑎 = 3𝜌𝑖 → 𝑎 =

(28)

where 𝑥𝑐 and 𝑦𝑐 are the coordinates of the center of each hexagonal cell, and 𝑥𝑖 and 𝑦𝑖 are the coordinates of the new values inside. Fig. 7 illustrates that the inside values and the vertices values of a hexagonal cell, are equidistant, such that, the wavefront retrieval is uniform. Distribution of the new values calculated inside have also the shape of a hexagon, although rotated by 30◦ with respect of the hexagonal cell. Evaluation of the wavefront deformations 𝑊 (𝑥, 𝑦) over the whole pupil is the final aim. With the inside values calculated, the next step is evaluating them with the expression:

𝐴9 = −

4

𝑥𝑖 = 𝑥𝑐 + 𝜌𝑖 cos 𝜃

(30)

In this equation we have used lower case w instead of capital case W to indicate that is variable represents the wavefront deformations in only one cell and not in the whole pupil. For simplicity, the subscripts in the coordinates x and y had been omitted. As (30) illustrate, the piston term 𝐴0 (𝑥, 𝑦) is absent, and the reason is that the origin of coordinates are the centers of each hexagonal cells. Finally, into the wavefront 𝑤𝑖 (𝑥, 𝑦) on each hexagonal cell it is possible to retrieve tilts, spherical curvature, astigmatism in two orientations, coma in both directions and triangular astigmatism in two directions.

(26)

(27) 5. Joining the wavefronts for contiguous cells

The distance between points, was obtained in such a way that their separation within the hexagonal cell is a constant and uniformly distributed.

Piston term should be found comparing the values of wavefront in the spots that two, three or four hexagonal cells share. As mentioned 65

F.J. Gantes-Nuñez et al.

Optics Communications 427 (2018) 61–69

Fig. 8. Hexagonal cells before the piston term (a) and after the piston term added (b).

Now, at this point, once the value of the piston term has been calculated, it is necessary to add it to each one of the spots in the cell, from the first to 13st spot. This is because, as Fig. 9 illustrate, in some cases the piston term should be calculated comparing with a cell in the same ring, but with 𝑚 − 1 index. So, after the piston term was found, the value is added to the wavefront value as follows: 𝑊𝐴01 (𝑛, 1, 𝑙) = 𝑊 (𝑛, 1, 𝑙) + 𝐴01

(32)

where the value of 𝑙 is from 1 to 13. The next case, case 2, is when 1 < 𝑚 < 𝑛: ∙ Case 2.- if 1 < 𝑚 < 𝑛 𝐴02 =

Fig. 9. Positions and cases to calculate the piston term for each cell.

1 {[𝑊 (𝑛, 𝑚, 3) − 𝑊 (𝑛 − 1, 𝑚, 1)] + [𝑊 (𝑛, 𝑚, 6) − 𝑊 (𝑛, 𝑚 − 1, 2)]} 4 { [ ]} 𝑊 (𝑛 − 1, 𝑚, 6) + 𝑊 (𝑛 − 1, 𝑚 − 1, 2) 1 𝑊 (𝑛, 𝑚, 4) − + 4 2 { [ ]} 𝑊 (𝑛 − 1, 𝑚 − 1, 1) + 𝑊 (𝑛, 𝑚 − 1, 3) 1 + 𝑊 (𝑛, 𝑚, 5) − (33) 4 2

and, as in the case 1, the value of piston term has to be added to the wavefront values for each spot: in our previous work [4,8], the slopes at the vertices between the adjacent cells are the same, the value in the common vertices has to be equal. After optimizing the piston term of two contiguous cells, the slopes of the two cells at the common vertices are the same, since the sampling points are common and have the same transversal aberration. However, they might have a curvature discontinuity. In other words, at the common vertices the heights and the slopes are continuous but the second derivative might not be. Thus, the profile of two hexagonal cells should be as in Fig. 8(b), after the piston term was added. The geometry of the hexagonal array, allows us to consider the central cell as the reference to compute the piston term for the others cells. Otherwise, the configuration of rings made piston calculation process in twelve steps, because the vertices that correspond are not the same in all the cases. Furthermore, the sequence of adding the piston term is realized in ring order, i.e., the cells at the first ring are the initial one to be leveled, then, the cells from the second ring and so the rest. Fig. 9 illustrates the twelve cases that have to be considered in the process of piston term adding. We use two coordinates to identify the cell (𝑛, 𝑚) and vertices l to be leveled. As in Fig. 9 can be observed, the common vertices are between the cells of an previous ring 𝑛−1 and the same ring 𝑛, but the coordinate 𝑚 changes. Because the value of 𝑚 is changing, the vertices are not the same in all the cases, so, this is the reason why there are twelve cases. To level the rings, the procedure starts with the cell (𝑛, 1), which is the first case that correspond to the condition when 𝑚 = 1, and the value of piston term is given by:

𝑊𝐴02 (𝑛, 𝑚, 𝑙) = 𝑊 (𝑛, 𝑚, 𝑙) + 𝐴02

Then, as can be inferred, the next steps to calculate the piston term are follows by the adding of this value to the wavefront values. The equations to each one of remaining cases are: ∙ Case 3.- If 𝑚 = 𝑛: 𝐴03 =

1 {[𝑊 (𝑛, 𝑚, 4) − 𝑊 (𝑛 − 1, 𝑚 − 1, 2)] + [𝑊 (𝑛, 𝑚, 6) − 𝑊 (𝑛, 𝑚 − 1, 2)]} 3 { [ ]} 𝑊 (𝑛 − 1, 𝑚 − 1, 1) + 𝑊 (𝑛, 𝑚 − 1, 3) 1 + 𝑊 (𝑛, 𝑚, 5) − (35) 3 2

𝑊𝐴03 (𝑛, 𝑚, 𝑙) = 𝑊 (𝑛, 𝑚, 𝑙) + 𝐴03

(36)

∙ Case 4.- If 𝑛 < 𝑚 < 2𝑛 − 1: 𝐴04 =

1 {[𝑊 (𝑛, 𝑚, 4) − 𝑊 (𝑛 − 1, 𝑚 − 1, 2)] + [𝑊 (𝑛, 𝑚, 1) − 𝑊 (𝑛, 𝑚 − 1, 3)]} 4 { [ ]} 𝑊 (𝑛 − 1, 𝑚 − 1, 1) + 𝑊 (𝑛 − 1, 𝑚 − 2, 3) 1 + 𝑊 (𝑛, 𝑚, 5) − 4 2 { [ ]} 𝑊 (𝑛 − 1, 𝑚 − 2, 3) + 𝑊 (𝑛, 𝑚 − 1, 4) 1 + 𝑊 (𝑛, 𝑚, 6) − (37) 4 2

𝑊𝐴03 (𝑛, 𝑚, 𝑙) = 𝑊 (𝑛, 𝑚, 𝑙) + 𝐴03

(38)

∙ Case 5.- If 𝑚 = 2𝑛 − 1:

∙ Case 1.- if 𝑚 = 1 𝐴01

(34)

𝐴05 =

[𝑊 (𝑛, 1, 3) − 𝑊 (𝑛 − 1, 1, 1)] + [𝑊 (𝑛, 1, 4) − 𝑊 (𝑛 − 1, 1, 6)] = 2 (31)

where the third coordinate correspond to the vertices that should have the same value of wavefront.

1 {[𝑊 (𝑛, 𝑚, 5) − 𝑊 (𝑛 − 1, 𝑚 − 2, 3)] + [𝑊 (𝑛, 𝑚, 1) − 𝑊 (𝑛, 𝑚 − 1, 3)]} 3 { [ ]} 𝑊 (𝑛 − 1, 𝑚 − 2, 2) + 𝑊 (𝑛, 𝑚 − 1, 4) 1 + 𝑊 (𝑛, 𝑚, 6) − (39) 3 2

𝑊𝐴05 (𝑛, 𝑚, 𝑙) = 𝑊 (𝑛, 𝑚, 𝑙) + 𝐴05 66

(40)

F.J. Gantes-Nuñez et al.

Optics Communications 427 (2018) 61–69

∙ Case 6.- If 2𝑛 − 1 < 𝑚 < 3𝑛 − 2: 𝐴06 =

1 {[𝑊 (𝑛, 𝑚, 5) − 𝑊 (𝑛 − 1, 𝑚 − 2, 3)] + [𝑊 (𝑛, 𝑚, 2) − 𝑊 (𝑛, 𝑚 − 1, 4)]} 4 { [ ]} 𝑊 (𝑛 − 1, 𝑚 − 2, 2) + 𝑊 (𝑛 − 1, 𝑚 − 3, 4) 1 𝑊 (𝑛, 𝑚, 6) − + 4 2 { [ ]} 𝑊 (𝑛 − 1, 𝑚 − 3, 3) + 𝑊 (𝑛, 𝑚 − 1, 5) 1 𝑊 (𝑛, 𝑚, 1) − (41) + 4 2

𝑊𝐴06 (𝑛, 𝑚, 𝑙) = 𝑊 (𝑛, 𝑚, 𝑙) + 𝐴06

(42)

∙ Case 7.- If 𝑚 = 3𝑛 − 2: 𝐴07 =

1 {[𝑊 (𝑛, 𝑚, 6) − 𝑊 (𝑛 − 1, 𝑚 − 3, 4)] + [𝑊 (𝑛, 𝑚, 2) − 𝑊 (𝑛, 𝑚 − 1, 4)]} 3 { [ ]} 𝑊 (𝑛 − 1, 𝑚 − 3, 3) + 𝑊 (𝑛, 𝑚 − 1, 5) 1 + 𝑊 (𝑛, 𝑚, 1) − (43) 3 2

𝑊𝐴07 (𝑛, 𝑚, 𝑙) = 𝑊 (𝑛, 𝑚, 𝑙) + 𝐴07

Fig. 10. Simulated Hartmann patterns sampling, (a) hexagonal distribution with 96 sampling points and (b) square distribution with 120 sampling points.

(44)

∙ Case 8.- If 3𝑛 − 2 < 𝑚 < 4𝑛 − 3: 𝐴84 =

1 {[𝑊 (𝑛, 𝑚, 6) − 𝑊 (𝑛 − 1, 𝑚 − 3, 4)] + [𝑊 (𝑛, 𝑚, 3) − 𝑊 (𝑛, 𝑚 − 1, 5)]} 4 { [ ]} 𝑊 (𝑛 − 1, 𝑚 − 3, 3) + 𝑊 (𝑛 − 1, 𝑚 − 4, 5) 1 + 𝑊 (𝑛, 𝑚, 1) − 4 2 { [ ]} 𝑊 (𝑛 − 1, 𝑚 − 4, 4) + 𝑊 (𝑛, 𝑚 − 1, 5) 1 + 𝑊 (𝑛, 𝑚, 2) − (45) 4 2

𝑊𝐴08 (𝑛, 𝑚, 𝑙) = 𝑊 (𝑛, 𝑚, 𝑙) + 𝐴08

(46)

∙ Case 9.- If 𝑚 = 4𝑛 − 3: 𝐴09 =

1 {[𝑊 (𝑛, 𝑚, 1) − 𝑊 (𝑛 − 1, 𝑚 − 4, 5)] + [𝑊 (𝑛, 𝑚, 3) − 𝑊 (𝑛, 𝑚 − 1, 5)]} 3 { [ ]} 𝑊 (𝑛 − 1, 𝑚 − 4, 4) + 𝑊 (𝑛, 𝑚 − 1, 6) 1 + 𝑊 (𝑛, 𝑚, 2) − (47) 3 2

𝑊𝐴09 (𝑛, 𝑚, 𝑙) = 𝑊 (𝑛, 𝑚, 𝑙) + 𝐴09

Fig. 11. Simulated wavefront to be sampled and retrieved.

It is clear that due to the configuration of the hexagonal array, the piston term calculation is not simple, or can be obtained by only one equation. This is the reason why it has to be generated from twelve cases, and then adding the piston term to the cell.

(48)

∙ Case 10.- If 4𝑛 − 3 < 𝑚 < 5𝑛 − 4: 𝐴10 =

1 {[𝑊 (𝑛, 𝑚, 1) − 𝑊 (𝑛 − 1, 𝑚 − 4, 5)] + [𝑊 (𝑛, 𝑚, 4) − 𝑊 (𝑛, 𝑚 − 1, 6)]} 4 { [ ]} 𝑊 (𝑛 − 1, 𝑚 − 4, 4) + 𝑊 (𝑛 − 1, 𝑚 − 5, 6) 1 𝑊 (𝑛, 𝑚, 2) − + 4 2 { [ ]} 𝑊 (𝑛 − 1, 𝑚 − 5, 5) + 𝑊 (𝑛, 𝑚 − 1, 1) 1 𝑊 (𝑛, 𝑚, 3) − (49) + 4 2

𝑊𝐴10 (𝑛, 𝑚, 𝑙) = 𝑊 (𝑛, 𝑚, 𝑙) + 𝐴10

6. Some results, additional comments and conclusions In order to evaluate our method we produced a Hartmann pattern of a synthetic wavefront with relatively high spacial frequencies by using a polynomial with a high degree (power of 5). We use a synthetic wavefront in order to have a good knowledge of the wavefront deformations and to compare with the results of our integration method. From the geometry of hexagonal and square arrays was not possible to establish the same number of the sampling points in both cases (see Fig. 10). The described method shows a better wavefront retrieval than the well-known trapezoidal integration and the square cells integration, as illustrated in Figs. 12 and 13. In Fig. 11 a wavefront is represented, that was simulated with the data of Table 2. This wavefront has local deformations with a high spatial frequency, but low enough that it can be detected with the hexagonal cells. The Fig. 14 shows the wavefront retrieved using our method with hexagonal cells. As it can be seen, the reconstruction is smoother and continuous than that obtained from the trapezoidal or Newton integration or with the square cells reconstruction. Is worth noticing that in this figure we plotted the points inside the hexagonal cells and the reference mesh was eliminated to make the figure clearer. As a comparison in the preceding three figures the mesh is present because the sampling points are not in hexagonal cells since simpler wavefront retrieval algorithms were used. In order to prove that our proposed method is better than the common trapezoidal and the square cell integration methods, we evaluated the Peak-to-Valley values (difference between the maximum and

(50)

∙ Case 11.- If 𝑚 = 5𝑛 − 4: 𝐴11 =

1 {[𝑊 (𝑛, 𝑚, 2) − 𝑊 (𝑛 − 1, 𝑚 − 5, 6)] + [𝑊 (𝑛, 𝑚, 4) − 𝑊 (𝑛, 𝑚 − 1, 6)]} 3 { [ ]} 𝑊 (𝑛 − 1, 𝑚 − 5, 5) + 𝑊 (𝑛, 𝑚 − 1, 1) 1 + 𝑊 (𝑛, 𝑚, 3) − (51) 3 2

𝑊𝐴11 (𝑛, 𝑚, 𝑙) = 𝑊 (𝑛, 𝑚, 𝑙) + 𝐴11

(52)

∙ Case 12.- If 5𝑛 − 4 < 𝑚 < 6𝑛 − 6: 𝐴12 =

1 {[𝑊 (𝑛, 𝑚, 2) − 𝑊 (𝑛 − 1, 𝑚, 6)] + [𝑊 (𝑛, 𝑚, 5) − 𝑊 (𝑛, 𝑚 − 1, 1)]} 4 { [ ]} 𝑊 (𝑛 − 1, 1, 5) + 𝑊 (𝑛 − 1, 𝑚 − 6, 1) 1 + 𝑊 (𝑛, 𝑚, 3) − 4 2 { [ ]} 𝑊 (𝑛 − 1, 𝑚 − 6, 6) + 𝑊 (𝑛, 𝑚 − 1, 2) 1 + 𝑊 (𝑛, 𝑚, 4) − (53) 4 2

𝑊𝐴12 (𝑛, 𝑚, 𝑙) = 𝑊 (𝑛, 𝑚, 𝑙) + 𝐴12

(54)

By using this procedure, the hexagonal cells have been leveled at the whole pupil, so, the profile of wavefront is completed. 67

F.J. Gantes-Nuñez et al.

Optics Communications 427 (2018) 61–69 Table 2 Orthonormal Zernike circle polynomials 𝑍𝑗 (𝜌, 𝜃) terms used for the simulated wavefront illustrated in Fig. 11. Aberration Name

𝑗

𝑛

𝑚

Defocus

4

2

0

Coma along 𝑥 axis

7

3

0

Primary Spherical Aberration

11

4

0

Quadrangular Astigmatism at 0◦

14

4

4

Secondary Coma along 𝑥 axis

16

5

1

Pentagonal Astigmatism, with peaks at 𝑠(72◦ ) + 18◦

33

7

5

𝑍𝑗 (𝜌, 𝜃) √ 3(2𝜌2 − 1) √ 8(3𝜌3 − 2𝜌) cos 𝜃 √ 5(6𝜌4 − 6𝜌2 + 1) √ 10𝜌4 cos 4𝜃 √ 12(10𝜌5 − 12𝜌3 + 3𝜌) cos 𝜃 √ 12𝜌5 sin 5𝜃

Value (×10−3 ) 0.050 0.080 0.10 0.050 0.030 −0.050

Table 3 Peak-to-Valley values obtained with three different integration procedures. The defocus coefficients are adjusted so that they are the same in the original as well as in the retrieved wavefronts. Figure

Wavefront

Value

10 11 12 13

Simulated Trapezoidal integration Square integration Hexagonal cell integration

1.030227 0.8164 0.874807 1.000288

center of the pupil. These values are shown in Table 3. A perfect integration procedure would produce a retrieved wavefront, identical to the simulated initial wavefront, with identical peak-to-valley values. The best result is obtained with the hexagonal cell integration and the less accurate is obtained from the trapezoidal integration. The density of sampling points was about the same in the three methods. In this paper, a method to retrieve the wavefront using a zonal method, from the slope measurements at the corners of an array of hexagonal cells, covering the entrance pupil of an optical system, was obtained. The sampling is more uniform than that of using square cells. The wavefront over each hexagonal cell is represented by a different polynomial, which contain tilts, curvature, astigmatism, comas and triangular astigmatism terms that satisfy the boundary conditions given by the measured slope values. With this kind of reconstruction, it is possible to identify local small errors that cannot be detected with a polynomial fitting to the whole aperture like the modal methods do. As we can see, with our method, using an array of hexagonal cells to sample the wavefront slopes (transverse aberrations), the retrieved wavefront is quite smooth and it is a good representation of the original simulated wavefront. The accuracy is greater than from other methods of wavefront retrieval. In this method we assume a point source produced from a laser. If the light source is not a point source, we need a way to deconvolve its size/shape, which is not simple. Another interesting point is that instead of measuring the slopes at the sampling points, we could measure the slopes inside of the cells using the Fried geometry [18].

Fig. 12. Retrieved simulated wavefront after a common trapezoidal integration.

Fig. 13. Retrieved wavefront after a square cell integration.

Acknowledgment This work was supported by Consejo Nacional de Ciencia y Tecnología under grant no. 280438. References [1] J. Hartmann, Bemerkungen über den bau und die justirung von spektrograpen, Zt. Instrumentenkd 20 (1900) 47–58. [2] B.C. Platt, R.V. Shack, Lenticular Hartmann screen, Opt. Sci. Newsl. 5 (1971) 15–16. [3] I. Ghozeil, J.E. Simmons, Screen test for large mirrors, Appl. Opt. 13 (1974) 1773– 1777. [4] F.J. Gantes-Nunez, Z. Malacara-Hernández, D. Malacara-Doblado, D. MalacaraHernández, Zonal processing of Hartmann or Shack-Hartmann patterns, Appl. Opt. 58 (2017) 1898–1907. [5] D.G. Smith, J.E. Greivenkamp, Generalized method for sorting Shack-Hartmann spot patterns using local similarity, Appl. Opt. 47 (2008) 4548–4554. [6] W. Zhou, T.W. Raasch, A.Y. Yi, Design, fabrication, and testing of a Shack-Hartmann sensor with an automatic registration feature, Appl. Opt. 55 (2016) 7892–7899. [7] O. Soloviev, G. Vdovin, Hartmann-Shack test with random masks for modal wavefront reconstruction, Opt. Express 13 (2005) 9570–9584.

Fig. 14. Retrieved simulated wavefront after hexagonal cell integration. Each spot in this plot corresponds to each calculated sampling point in the pupil, as in Fig. 6.

the minimum values of the wavefront at zones where the derivatives in x and y are equal to zero). The defocus coefficients are adjusted so that they are the same in the original as well as in the retrieved wavefronts. In other words, the local curvatures are the same at the 68

F.J. Gantes-Nuñez et al.

Optics Communications 427 (2018) 61–69 [13] R. Henselmans, L.A. Cacace, G.F.Y. Kramer, P.C.J.N. Rosielle, M. Steinbuch, The NANOMEFOS non-contact measurement machine for freeform optics, Precis. Eng. 35 (2011) 607–624. [14] L.B. Kong, C.F. Cheung, Design, fabrication and measurement of ultra-precision micro-structured freeform surfaces, Comput. Ind. Eng. 61 (2011) 216–225. [15] B. Pathak, B.R. Boruah, Improved wavefront reconstruction algorithm for ShackHartmann type wavefront sensors, J. Opt. 16 (2014) 055403. [16] M. Viegers, E. Brunner, O. Soloviev, C.C. de Visser, M. Verhaegen, Nonlinear spline wavefront reconstruction through moment-based Shack-Hartmann sensor measurements, Opt. Express 27 (2017) 11514–11529. [17] L. Huang, J. Xue, B. Gao, C. Zuo, M. Idir, Spline based least squares integration for two-dimensional shape or wavefront reconstruction, Opt. Laser Eng. 91 (2017) 221–226. [18] D.L. Fried, Least-square fitting a wave-front distortion estimate to an array of phasedifference measurements, J. Opt. Soc. Amer 67 (1977) 370–375.

[8] Z. Malacara-Hernández, D. Malacara-Doblado, D. Malacara-Hernández, Leastsquares fitting of Shack-Hartmann data with a circular array of sampling points, Appl. Opt. 54 (2015) E113–E122. [9] G. Hernández-Gómez, D. Malacara-Doblado, Z. Malacara-Hernández, D. MalacaraHernández, Modal processing of Hartmann and Shack-Hartmann patterns by means of a least squares fitting of the transverse aberrations, Appl. Opt. 53 (2014) 7422– 7434. [10] M. Lombardo, G. Lombardo, New methods and techniques for sensing the wave aberrations of human eyes, Clin. Exp. Optom. 92 (2009) 176–186. [11] T. Liu, L. Thibos, G. Marin, M. Hernandez, Evaluation of a global algorithm for wavefront reconstruction for Shack-Hartmann wave-front sensors and thick fundus reflectors, Ophthalmic Physiol. Opt. 34 (2013) 63–72. [12] K. Garrard, T. Bruegge, J. Hoffman, T. Dow, A. Sohn, Design tools for freeform optics, Proc. SPIE 5874 (2005) 95–105.

69