If you have trouble viewing this, try the pdf of this post. You can download the code used to produce the figures in this post.

The NKQ detector introduced in my paper[1] is a generalization of the NQ where instead of just counting the photons we use pulse height analysis (PHA) to separate the photons into K bins depending on their energies and simultaneously measure their total energy. This gives performance similar to PHA with the number of bins plus one so it may be easier to implement. As with the NQ detector, the integrated energy Q can be used in regions where high count rate leads to excessive pulse pileup.

With no pulse pileup, the numbers of photons in the individual PHA bins, {*N*_{1}, *N*_{2}, …*N*_{K}}, are independent Poisson random variables with parameters *λ*_{k}, *k* = 1…*K*. The total number of photons, *N*, is the sum
*N* = ^{K}⎲⎳_{k = 1}*N*_{k}.

Since the sum of independent Poisson random variables is also a Poisson random variable with parameter equal to the sum of the parameters of the terms, *N* is Poisson with parameter
*λ* = ^{K}⎲⎳_{k = 1}*λ*_{k}.
The NKQ detector also measures the total energy *Q* of all the photons.

The mean value vector of the measurements is

⟨⎡⎢⎢⎢⎢⎢⎢⎢⎣
*N*_{1}
*N*_{2}
⋯
*N*_{K}
*Q*
⎤⎥⎥⎥⎥⎥⎥⎥⎦⟩ = ⎡⎢⎢⎢⎢⎢⎢⎢⎣
*λ*_{1}
*λ*_{2}
⋯
*λ*_{K}
*λ*⟨*E*⟩
⎤⎥⎥⎥⎥⎥⎥⎥⎦.

To derive the joint statistics, we only need to consider the two bin case and derive the results for *cov*(*N*_{1}, *Q*). These results can be immediately generalized to the *K* bin case because, from the point of view of the analysis, all the other measurements can be summed to a single Poisson random variable that is independent of *N*_{1},so is equivalent to the two bin case. Also, without loss of generality, the results for *N*_{1} are applicable to any of the other individual measurements. The covariance of *N*_{1} and *Q* is defined as
Expanding the product
Expanding the first term*E* random variables have same probability distribution so*E*⟩_{1} denotes the mean value of the instances of *E* in the first bin. Similarly

(3) ⟨*N*_{1}*Q*⟩ = ⟨⟨*N*_{1}*Q*⟩|_{N1 = n}⟩ = ^{∞}⎲⎳_{n2 = 0}^{∞}⎲⎳_{n1 = 0}*n*_{1}⟨^{n1}⎲⎳_{i = 1}*E*_{i} + ^{n2}⎲⎳_{i = 1}*E*_{i}⟩*Prob*{*N*_{1} = *n*_{1}}*Prob*{*N*_{2} = *n*_{2}}.

The
⟨^{n1}⎲⎳_{i = 1}*E*_{i}⟩ = *n*_{1}⟨*E*⟩_{1}

where ⟨
⟨^{n2}⎲⎳_{i = 1}*E*_{i}⟩ = *n*_{2}⟨*E*⟩_{2}.

Substituting in (3↑)
⟨*N*_{1}*Q*⟩ = ^{∞}⎲⎳_{n2 = 0}^{∞}⎲⎳_{n1 = 0} [*n*^{2}_{1}⟨*E*⟩_{1} + *n*_{1}*n*_{2}⟨*E*⟩_{2}]*Prob*{*N*_{1} = *n*_{1}}*Prob*{*N*_{2} = *n*_{2}}

⟨*N*_{1}*Q*⟩ = ⟨*N*^{2}_{1}⟩⟨*E*⟩_{1} + *λ*_{1}*λ*_{2}⟨*E*⟩_{2}

where the last step uses the fact that
⟨*N*^{2}_{1}⟩ = *λ*^{2}_{1} + *λ*_{1}.

The final result for the first term in (2↑) is

⟨*N*_{1}*Q*⟩ = (*λ*^{2}_{1} + *λ*_{1})⟨*E*⟩_{1} + *λ*_{1}*λ*_{2}⟨*E*⟩_{2}

In the second term in (2↑), < *N*_{1} > = *λ*_{1} and < *Q* > = (*λ*_{1} + *λ*_{2})⟨*E*⟩. The overall mean value ⟨*E*⟩ can be expressed in terms of the bin mean values as
*cov*(*N*_{1}, *Q*) = *λ*_{1}⟨*E*⟩_{1}.
By the argument stated above, this can be generalized to
*cov*(*N*_{k}, *Q*) = *λ*_{k}⟨*E*⟩_{k}.

⟨*E*⟩ = (*λ*_{1}⟨*E*⟩_{1} + *λ*_{2}⟨*E*⟩_{2})/(*λ*_{1} + *λ*_{2})

so the second term is
< *N*_{1} > < *Q* > = *λ*^{2}_{1}⟨*E*⟩_{1} + *λ*_{1}*λ*_{2}⟨*E*⟩_{2}.

Combining the first and second terms gives the final result
As previously derived the variance of *Q* is *σ*^{2}_{Q} = *λ*⟨*E*^{2}⟩, so the covariance matrix is

(4) *Cov*({*N*_{k}, *k* = 1…*K*}, *Q*) = ⎡⎢⎢⎢⎢⎢⎢⎢⎣
*λ*_{1}
0
0
0
*λ*_{1}⟨*E*⟩_{1}
0
*λ*_{2}
0
0
*λ*_{2}⟨*E*⟩_{2}
0
0
⋯
⋯
⋯
0
0
⋯
*λ*_{K}
*λ*_{K}⟨*E*⟩_{K}
*λ*_{1}⟨*E*⟩_{1}
*λ*_{2}⟨*E*⟩_{2}
⋯
*λ*_{K}⟨*E*⟩_{K}
*λ*⟨*E*^{2}⟩
⎤⎥⎥⎥⎥⎥⎥⎥⎦.

The same arguments used in the previous section are also applicable to the logarithms of the measurements, so I will derive the covariance of *log*(*N*_{1}) and *log*(*Q*) for the two group case. Using the general result
*cov*[*log*(*N*_{1}), *log*(*Q*)] = ⟨log(*N*_{1})log(*Q*)⟩ − ⟨log(*N*_{1})⟩⟨log(*Q*)⟩.

As with the derivation for the *NQ* detector, the first term is

⟨log(*N*_{1})log(*Q*)⟩ ≈ log[⟨*N*⟩]log[⟨*Q*⟩] + (*cov*(*N*_{1}, *Q*))/(⟨*N*_{1}⟩⟨*Q*⟩).

Inserting the results from the previous section

(*cov*(*N*_{1}, *Q*))/(⟨*N*_{1}⟩⟨*Q*⟩) = (⟨*E*⟩_{1})/(⟨*Q*⟩).

Combining these
*cov*[*log*(*N*_{1}), *log*(*Q*)] = (⟨*E*⟩_{1})/(⟨*Q*⟩)

Using the result from the NQ detector for the variance of *log*(*Q*) and recalling that *F* = (⟨*E*^{2}⟩)/(⟨*E*⟩^{2}) and ⟨*Q*⟩ = *λ*⟨*E*⟩, the covariance matrix is
*Cov*({*log*(**N**_{k}), *k* = 1…*K*}, *log*(**Q**)) = (1)/(*λ*)⎡⎢⎢⎢⎢⎢⎢⎢⎣
*λ* ⁄ *λ*_{1}
0
⋯
0
(⟨*E*⟩_{1})/(⟨*E*⟩)
0
*λ* ⁄ *λ*_{2}
0
0
(⟨*E*⟩_{2})/(⟨*E*⟩)
0
0
⋯
0
⋮
0
0
0
*λ* ⁄ *λ*_{K}
(⟨*E*⟩_{K})/(⟨*E*⟩)
(⟨*E*⟩_{1})/(⟨*E*⟩)
(⟨*E*⟩_{2})/(⟨*E*⟩)
⋯
(⟨*E*⟩_{K})/(⟨*E*⟩)
*F*
⎤⎥⎥⎥⎥⎥⎥⎥⎦.

The code for this post shows how to generate Fig. 1↓, which compares the N2Q covariance and correlation with the theoretical results in Eq. 1↓. These quantities are plotted versus the inter-bin separation energy of the two bin PHA. Note that the correlation (and covariance) of the counts with *Q* increases for *N*_{1} but decreases for *N*_{2} as the threshold energy increases.

The theoretical formulas derived in this post fit the Monte Carlo simulation results. I was not able to derive simple analytical formulas for the NKQ SNR so future posts will compute it numerically and compare it to the optimal SNR with complete information and also to other types of detectors.

Last editedDec 06, 2012

© 2012 by Aprend Technology and Robert E. Alvarez

Linking is allowed but reposting or mirroring is expressly forbidden.

[1] : “Near optimal energy selective x-ray imaging system performance with simple detectors”, *Med. Phys.*, pp. 822—841, 2010.