From page 13.
Eq. (11) becomes
\(P_D=\frac{1}{\sqrt{\pi}} \int_{-\infty}^{\infty} \: d\tau \: e^{-\tau^2} \: P_F \: ^{\frac{1}{1 \, + \, CNR_s \, e^{2\sigma(\tau\sqrt{2}-\sigma)}}}\)
\((21)\)
Eq. (21) has a form suitable for Gaussian-Hermite quadrature. A 16-point quadrature provided sufficient accuracy for \(\sigma^2 \leq 0.2\). For larger \(\sigma^2\) values the number of quadrature points was increased to 32.
From APPENDIX, page 87.
PROGRAMMABLE HAND CALCULATOR PROGRAMS
Evaluation of the speckle target detection probability Eq. (21 ) is straightforward and yields excellent accuracy for quadratures with a relatively small number of points. This, coupled with the fact that most objects exhibit a significant diffuse reflection component at optical and infrared wavelengths, has prompted us to develop a program suitable for evaluation on a programmable hand calculator. In Table 21 we detail a program usable with either a Hewlett-Packard HP-67 or HP-97 calculator. This program calculates \(P_D(CUR_s;P_F,\sigma^2)\) for \(P_F\) stored in register A, \(\sigma^2\) stored in register B, and \(CNR_s\) entered as \(x\) using an 18-point Gaussian-Hermite quadrature. The quadrature points and weighing coefficients are entered via a data card. Computation time of this program is roughly 60 seconds and the relative accuracy in \(P_D\) is better than about 0.3%, for \(\sigma^2 = 2.0\) and improves rapidly as \(\sigma^2\) decreases.
…
The preceding programs were also modified for use with a Hewlett-Packard HP-29C calculator. The modified programs are detailed in Table 22. Because of the larger number of storage registers available, a 24—point Gaussian-Hermite quadrature was used. Computation time of this program is roughly 75 seconds and the relative accuracy in \(P_D\) is approximately 0.03% for \(\sigma^2 = 2.0\) and improves rapidly as \(\sigma^2\) decreases.
Nodes and Weights
These tables were calculated with the
Nodes and Weights of Gauss-Hermite Calculator.
n = 18
Code:
1 0.2582677505190967592581 0.4834956947254555528764
2 0.7766829192674116613167 0.284807285669979578596
3 1.300920858389617365666 0.0973017476413154293309
4 1.835531604261628892254 0.01864004238754465192193
5 2.386299089166686000265 0.00188852263026841789438
6 2.961377505531606844779 9.18112686792940352915E-5
7 3.573769068486266079501 1.810654481093430409597E-6
8 4.248117873568126463023 1.046720579579208244436E-8
9 5.048364008874466768372 7.8281997721158910293E-12
n = 24
Code:
1 0.2244145474725155851511 0.4269311638686992496532
2 0.6741711070372122360003 0.2861795353464430179019
3 1.126760817611245072133 0.1277396217845591606473
4 1.584250010961694148506 0.03744547050323074601333
5 2.04900357366169891179 0.00704835581007267097
6 2.523881017011426974199 8.23692482688417457918E-4
7 3.012546137565564825655 5.68869163640437976904E-5
8 3.52000681303452471129 2.15824570490233363224E-6
9 4.053664402448149503948 4.01897117494142968454E-8
10 4.625662756423787265049 3.04625426998756390389E-10
11 5.259382927668044367431 6.58462024307817006456E-13
12 6.01592556142573971735 1.66436849648910887377E-16
It's interesting to note that these values were arranged differently in the registers of the
HP-67 and the
HP-29.
In case of the
HP-67 the primary and secondary banks were swapped using the
P<>S command.
But since these registers were only addressed indirectly the same approach as for the
HP-29 could have been used.
Efficiency
Both program could be improved, though I consider the 2nd one for the
HP-29 slightly better.
At least they knew that they could swap \(x\) and \(y\):
HP-67
Code:
050 STO D
051 RCL A
052 RCL D
053 h yˣ
HP-29
Code:
047 RCL 3
048 x↔y
049 f yˣ
It appears they were not aware of the
LAST X command.
Both programs use:
Code:
RCL B
√x
-
RCL B
√x
×
The register
B contains the parameter \(\sigma^2\) which is constant during the calculation.
They could have stored \(\sigma\) instead of calculating the square root twice in the loop again and again.
Cheers
Thomas