Improved computation of the adaptation coefficient in the CIE system of mesopic photometry.

New values of parameters a and b are proposed for the CIE system of mesopic photometry MES2 [CIE Publication 191:2010], because from the original values this model may have no solution or multi-solutions. From the new values of parameters a and b it is shown that the CIE MES2 system has a unique solution. The difference however, between the original and the new values of parameters a and b is very small and the changes do not affect previous conclusions based on the MES2 model. To compute such a solution, we propose a Bisection-Newton method which exhibits fast convergence (8 iterations in the worst case), and improves the fixed-point method recommended by the CIE MES2 system, which has convergence problems for high values of the photopic luminance and very high values of the scotopic/photopic ratio. Comparative results for the fixed-point method, the Bisection method, the Newton method, and the Bisection-Newton method, in terms of the number of iterations necessary for convergence and the computation time used, are reported.


Mesopic vision is defined as vision intermediate between photopic and scotopic vision
. In mesopic vision, both the cones and rods are active; photopic vision, on the other hand, is dominated by cone activity and, in scotopic vision only the rods are active. Mesopic lighting applications are those for which our visual system is operating in a mesopic state, i.e. where both rods and cones contribute to visual functions. However, it is not straightforward to determine whether and how this condition is satisfied in any given practical situation [2]. For example, one important application of mesopic vision is road and street lighting for drivers, motorcyclists, cyclists and pedestrians, since the visual environment in night-time traffic conditions falls largely in the mesopic region. The current CIE system for mesopic photometry, the CIE MES2 system [3], was first published in 2010. It is in fact an intermediate solution between the USP system published by Rea et al. [4] in 2004 and the MOVE system published by Goodman et al. [5] in 2007. The CIE MES2 system defines the spectral luminous efficiency function for mesopic photometry, In addition, the CIE MES2 system [3] provides the following relationship between the mesopic luminance, mes L , and the coefficient of adaptation m : where ε is a very small fixed tolerance, the iteration is stopped, and 1 n m + is accepted as a solution for m . In computations in the current paper we will use 5 10 . increases with an increase of the ratio / S P , which agrees with experimental results [8]. However, we think that some questions related to the CIE MES2 system have not yet been addressed. For example: 1) Do Eqs. (5)-(7) determine a unique solution for m when Eq. (10) is satisfied? 2) Does the fixed-point iteration method in Eqs. (11)-(13) converge when Eqs. (5)-(7) determine a unique solution for m ? The current paper investigates these two questions. From our results, a new Bisection-Newton method is proposed to predict the value of the coefficient of adaptation, m , and the mesopic luminance, mes L . Numerical results show that the Bisection-Newton method always converges, and provides a better solution than the fixed-point iteration method currently recommended by the CIE MES2 system [3].
However, when using a computer, the two conditions (10) and (17)

Theorem of existence of an unique solution for F(m) = 0 within the mesopic range
The examples in subsection 2.1 do show that the parameters a and b as defined by CIE in Eq. (7) have problems. In order to redefine these parameters, we note that, if ( ) 0 Although a and b as defined by Eq. (21) are not much different from a and b as defined by Eq. (7), the examples in subsection 2.1 and the discussion below show that it is better to use the set defined by Eq. (21). Therefore, from now on, we will assume the MES2 model with a and b as defined by Eq. (21). The difference however, between the original and the new values of the parameters a and b is very small and it was found that it does not affect the main conclusions previously published in the literature. To prove that there is only one solution for ( ) 0 F m = , we consider the derivative of ( ) In Eq. (22)  For the alternative case, / 1 s p L L < , we need to consider the second order derivative of ( ) F m , which is given by     (11) and (12) Eq. (13)]. Though how large the ratio / S P can be is debatable, this example shows that, at least from a theoretical point of view, the fixed-point iteration method may converge very slowly or may not converge at all. To find the root of the function ( ) F m , other numerical methods [7], for example, the Bisection and Newton methods, can be also considered. The Bisection method always converges, but it has a low convergence rate in general. The Newton method, when it converges, has a very fast convergence rate. However, the Newton method may not converge if the initial guess is far away from the true solution. Hence, we have designed a hybrid method, named the Bisection-Newton method, because it is based on the Bisection and the Newton methods, and we propose it for optimal solution of ( ) 0 F m = . The Bisection-Newton method not only always converges (similar to the Bisection method) to the unique solution for any initial guess between 0 and 1, but also converges very fast (similar to the Newton method). For completeness, the next subsections detail the algorithms corresponding to the Bisection, Newton, and Bisection-Newton methods, respectively [7].

The Bisection method
Initial step:

2) and 2.3) in
Step 2. Thirdly, the above method mainly uses the Newton iteration (see 2.1) and 2.2) in Step 2). However, when the Newton iteration does not generate a good estimation (see 2.2) in Step 2), the method switches to the Bisection method (see 2.3) in Step 2), which is the reason the method is called the Bisection-Newton method. Finally, the Bisection-Newton iteration generates the sequence k m and the interval end point sequences k a and k b . As discussed above, we know ( ) Thus, these three sequences satisfy the condition that k m is always inside the interval In addition, the length of the interval [ ] , k k a b is decreasing in the Bisection-Newton method. Thus, it is expected that the Bisection-Newton method will converge, which is the merit of Bisection method [7], and when it converges, it will converge quadratically, which is the merit of the Newton method [7]. In summary, the Bisection-Newton method is better than the original Newton method, since the latter may not converge for certain initial guesses, and is also better than the Bisection method, since the Bisection method has a low convergence rate. The performance of the Bisection-Newton method together with the fixed-point method (i.e. the method which has been recommended by CIE in [3]), the Bisection method, and the Newton method will be discussed in the next section. However, we have to note that the Bisection method is simpler than the Newton and the Bisection-Newton methods since it only needs to compute the function ( ) k F m once per iteration. The fixed-point iteration method, needs to compute the function ( ) g m defined by Eqs. (24) and (5) once per iteration.

Comparative performance of different computational methods
In CIE Publication 191:2010 [3], performance examples were given in terms of the photopic luminance, p L , and the ratio of scotopic to photopic luminance, / S P . The combination of [11] considered the theoretical spectral radiance of a light source as a vector with 81 components sampled from 380 nm to 780 nm at 5 nm intervals, and then investigated the maximum luminous efficiency of radiation for a certain level of color rendering index and fixed correlated color temperature. Using a similar theoretical strategy, we considered how large the ratio / S P can be, and we found that it can be greater than 50. So we decided to choose values of the ratio up to 50 as a theoretical limit although we recognize that, for currently available light sources, / S P values higher than 5.15 do not exist. Therefore, we have decided to sample the ratio / S P starting from 0.1 to 2 in steps of 0.05, and then from 3 to 49 in steps of 2. Thus, altogether we selected 63 values for the ratio / S P . Hence, in overall, from all selected values of p L and / S P , we have a total of 1575 (25 x 63) points. A fixed convergence tolerance 5 10 ε − = was chosen to compare the performance of our four tested methods (fixed-point, Bisection, Newton, and Bisection-Newton) for these 1575 points. For a particular method, the lower the number of iterations it takes for convergence, the better the method performs. The maximum number of iterations was set as 200; that is, all methods are automatically stopped after 200 iterations, though the convergence rule is not satisfied, and in this case, they are considered as divergent.  Figure 3 shows the performances of the four methods in terms of the number of iterations used for each of the 1575 combinations of the photopic luminance p L and ratio / S P . A decimal logarithmic scale was employed in the charts in Fig. 3 for / S P , to show more detail of the performance for the usual values for current light sources ( / S P below 0.75 log units) without discarding potential higher theoretical values. The numbers in the vertical colour bars on the right of each of the four charts in Fig. 3 indicate the number of iterations needed for convergence, and it is important to note that they are different for each one of the four charts. Using the fixed-point iteration method [3] [ Fig. 3(a)] it can be seen that for small values of the ratio / S P the method converges fast for all photopic luminances p L , and also it converges fast for small values of photopic luminance p L and moderate-high / S P ratios.
However, when the ratio / S P and photopic luminance p L both become large, the number of iterations for convergence in the fixed-point iteration method considerably increases, and for the highest values the method does not converge after 200 iterations. The Bisection method [ Fig. 3(b)] always converges, and it takes approximately 17 iterations for all combinations of values of photopic luminance p L and ratio / S P . In general, the Newton method [ Fig. 3(c)] converges very fast, except for very small values of the ratio / S P and moderate-large p L values, where this method may not converge after 200 iterations. Finally, as expected, we can see that the Bisection-Newton method [ Fig. 3(d)] always converges, like the Bisection method, and it converges very fast (8 iterations in the worst case), like the Newton method. However, we have to note that the Bisection-Newton methods takes more CPU time per iteration than that used by the Bisection method per iteration (see Table 1 below). Figure 4 shows another comparison of the relative efficiency (i.e. number of iterations to achieve convergence using a tolerance 5 10 ε − = ) of the four tested methods, assuming a specific value for the photopic luminance, 2.1 p L = . Figure 4 plots the number of iterations needed for convergence in each method as a function of the ratio / S P . It can be seen that the fixed-point method (black curve) takes the lowest number of iterations among the four tested methods for values of the / S P ratio smaller than 3. However, when the ratio / S P is greater than 12, it takes the highest number of iterations among the four methods and gradually, it does not converge after 50 iterations when the ratio / S P is greater than 25. Thus, the fixedpoint method must not be underestimated because the values of 12 or 25 for the / S P ratio only make sense from a theoretical point of view (currently available light sources have / S P ratios below approximately 5 [10]). For the Bisection method (red curve), about 17 iterations are necessary for convergence for nearly all values of the ratio / S P . The performance of the Newton (green curve) and Bisection-Newton (blue curve) methods is almost identical when the ratio / S P is greater than 5. However, when the ratio / S P is smaller than 5, these two methods perform differently: Specifically, the Newton method took 51 iterations when the ratio / S P was equal to 0.5, and it didn't converge after 200 iterations when the ratio / S P was below 0.35. The proposed Bisection-Newton method (blue curve) took not more than 6 iterations for all values of the ratio / S P . Similarly, assuming a ratio / 1.8 S P = , Fig. 5 plots the number of iterations needed for convergence in each method, as a function of the photopic luminance, p L . Now, we can see that the four methods converge, the Bisection and fixed-point methods taking the highest and lowest number of iterations for convergence, respectively. The Newton and Bisection-Newton methods perform similarly for p L values smaller than 0.6, but the Bisection-Newton method is better for larger p L values. Note that we deliberately selected this small ratio / 1.8 S P = , which may be typically found in currently available light sources, in order to show that the fixed-point method [3] is still the best for some small / S P ratios. While Figs. 4 and 5 only illustrate examples that allow for easy comparison of the relative performance of the four methods shown in previous Fig. 3, it can be added that convergence must be the main goal of any method, and also that the number of iterations considered in Figs. 3-5 is not the only criterion we may consider to evaluate the merit of these methods. For example, the simplicity of a method, partly related to the time spent in the computation, is also a further criterion which may be considered.
As an example, which may be also useful to readers interested in checking the four methods described in section 3, for each of the these methods Table 1 shows the results found for m and mes L , as well as the number of iterations necessary for convergence with 5 ε 10 − = , and the computational time using a typical desktop computer, for a common light source with 2.1 ; / 1.8 p L S P = = . It can be seen in Table 1 that the values of m and mes L from the four methods are very similar, and the fixed-point method provided the best results from the point of view of the number of iterations and the computation time in seconds (CPU (s)), closely followed by the Bisection-Newton method. This result confirms that, in more practical situations (i.e. low / S P values) we cannot underestimate the fixed-point method currently recommended by CIE [3]. In any case, we can retain our recommendation of the Bisection-Newton method, bearing in mind that it guarantees a fast convergence for a wide range of input values, while the fixed-point method may not converge for high (currently unpractical) values of the / S P ratio. Table 1 also lists, in the last column, the CPU time used per iteration for each method. It can be seen that, for each iteration, the fixed-point method took the most CPU time compared with other methods and the Bisection method took the least. The Bisection-Newton method took twice that used by the Bisection method per iteration. Furthermore, we note that each of the four methods converges very fast for the example shown in Table 1 but, on repeating the calculations, the CPU time varies. To overcome this we repeated the calculations 1000 times and we quote the average CPU time in Table 1.

Conclusions
We first investigated the parameters a and b for the CIE MES2 model [3]. It was found that from a and b values defined in Eq. (7) , and the Bisection-Newton method, originally proposed by us, were used to solve the MES2 model, It was found that the Bisection method converges as long as the value of p L and the ratio / S P satisfy the condition in Eq. (10) and took approximately the same number of iterations for convergence for any ratio / S P and photopic luminance p L . For the fixedpoint method, it may converge very fast for small values of the ratio / S P , and it is better than all the other methods for ratios / S P smaller than about 3, which is the case for most light sources currently available, but it may diverge for large values of the ratio / S P . The Newton method may diverge for small values of the ratio / S P and it converges for larger values. When it converges, it converges faster than the Bisection method. Finally, the Bisection-Newton method always converges, like the Bisection method, and it converges very fast, like the Newton method.
While convergence can be considered as the most important property of all the test methods, simplicity of the algorithms (e.g. computational time) may be also considered as an added value. Thus, for currently available light sources with an / S P ratio less than 5, the fixed-point iteration method recommended by CIE [3] can still be used. However, for simplicity, the Bisection method can also be used since it is simpler and convergent in any case. In addition, we feel that the Bisection-Newton method should be used for the CIE MES2 model [3] since it converges for all cases, and it is the best method for larger / S P ratios and the second best method for smaller / S P ratios.