# Patent

## Title
Method for correcting the stacking phenomenon applied to X-ray spectrums acquired using a spectrometric sensor

## Abstract

A method correcting a measured spectrum of X radiation, according to a number of channels Nc, each channel i corresponding to an energy range between Ei and Ei+ΔEi, including: determining function δti,j(k) determining size of temporal deviation Δt interval separating two interactions with energy Ei and Ej, stacking of which leads to a detected energy value Ek; determining, from the function δti,j(k), probability function Pi,j(k) that an event counted in a channel k corresponds to a stack of two interactions, respectively of energies Ei and Ej; determining, from the probability function Pi,j(k), a stack spectrum as a part of the measured spectrum that corresponds only to the stacks alone; and calculating or estimating at least a first corrected spectrum, by the difference between the measured spectrum and the stack spectrum.

## Background
TECHNICAL FIELD AND BACKGROUND OF THE INVENTION
The invention concerns the field of high flow spectrometry using x-rays and gamma rays.
The applications of high flow spectrometry are varied.
Applications include the use of gamma probes in radiation protection, multi-energy imaging in the medical field (e.g. bi-energy scanners), in the field of non-destructive testing and in security applications (e.g. detection of explosive materials using multi-energy radiography).
One particular industrial application of the invention is the detection of explosives for examining baggage using moving radiographs. But other applications are possible, in particular during measurements of intense X and/or gamma photonic flows using spectrometry, for example in measuring waste or nuclear fuels.
Moreover, it is difficult to make the known techniques compatible with the current baggage inspection requirements: a method is needed that is fast, but also precise and compatible with security. In particular, the movement speed of the baggage requires that a measurement be done of the energy of the photons transmitted through the baggage, over a short time (several ms) with a high incident photon flow (several tens of Mphotons/mm2/s) to keep sufficient statistics.
The spectrometric sensors concerned by the invention are preferably direct conversion sensors, i.e. the incident X photons on the sensor interact with a polarized semiconductor material (CdTe for example), and create a cloud of electronic charges (typically 10000 electrons for an X photon of 60 keV).
These charges are then collected by electrodes and form a transient electrical signal called a pulse. If the collection is complete, the entire measured pulse is proportionate to the energy deposited by the incident particle.
An electronic circuit makes it possible to measure this integral.
After digitization, the pulses are classified in different channels depending on their amplitude, and an energy value is assigned to each channel. The distribution by channels of each interaction corresponds to the energy spectrum of the radiation having interacted with the irradiated object, or energy spectrum of the detected radiation. The radiation is preferably an X or gamma photon radiation.
In the case of baggage inspection, such a spectrum makes it possible to provide information on the density and nature of said object.
In spectrometry systems, comprising a sensor connected to electronic circuits for amplifying and processing the detected signal, the problem arises of correcting degradation effects related to the high flows of photons on the measured spectrums (as indicated above, high flows are indeed necessary during baggage inspections).
More specifically, it involves the poor separability, or stacking, phenomenon of interactions detected by the detector at very close moments. The more intense the incident photon flow at the detector, the higher the interaction rate (number of interactions occurring in the detector per unit of time). First, the counting rate measured by the detector, corresponding to the number of interactions detected per unit of time, increases with the interaction rate, and the probability of obtaining a stack also increases. Then, when the incident photon flow becomes too significant, the counting rate practically does not increase any more, and can even decrease, due to the saturation of the detector.
The notion of strong flow corresponds to typical flow values between 1×104 and 109 interactions per second and per pixel (or elementary detector). In the case of X ray with energy in the vicinity of 100 keV, the number of interactions per second is relatively close to the number of incident photons per second, in other words the incident photon flow, the probability of interaction of such photons being high.
One important parameter is the counting rate measured by the detector previously defined. When the flow of photons to which the detector is subjected is not too high, the interaction rate in the detector is substantially equal to the counting rate measured by the detector, the latter corresponding to the number of events (or number of counts) appearing in the spectrum per unit of time.
In the case of an intense flow of radiation, in general, beyond a given counting rate, a saturation of the detector and the signal processing electronics occurs.
The measured counting rate then no longer corresponds to the flow to which the detector is subjected.
One consequence of this saturation is a strong degradation of the energy resolution of the spectrum and the detection efficacy.
FIG. 9 is a spectrum measurement at two different flows, which illustrates the problems posed by the stacking phenomenon.
Curve I corresponds to an incident flow of 6,082×106 photons/s/detector while curve II corresponds to an incident flow of 4,752×104 photons/s/detector.
When the flow increases (number of incident X photons per unit of time per pixel), the supplied signal deteriorates due to the stacking phenomenon: if two events are detected with too short a time lapse separating them, the system is not able to tell them apart and provides an erroneous signal depending on the energies of the two photons and the time interval separating them.
In FIG. 9, two effects resulting from the stacking phenomenon can be seen on curves I and II:

    
    
        a decrease in the counting rate measured when the flow increases, visible at low energies (zone A in FIG. 9);
        an increase in the number of events counted at high energies with the flow due to the spectrum of stacks (zone B in FIG. 9).
    
    


This stacking phenomenon is well known. Different method classes exist making it possible to deal with the stacking phenomenon.
Empirical methods are known: one approach is based on calibrating the stacking phenomenon with radioactive sources having known activity.
The information resulting from the calibration is then used on the unknown signal, as described in American National Standard for Calibration and Use of Germanium Spectrometers for the Measurement of Gamma-Ray Emission Rates of Radionuclides, American National Standards Institute (ANSI) N42.14-1999, p. 7, 13, 15, 86, 89, 134.
The main drawback of this approach is the need to have γ-ray emitting sources with strong activity, which makes the calibration method complex and in particular poses radiation protection problems.
Also known are analog methods, which optimize the electronics to minimize the stacks. In particular the use of inhibitor circuits makes it possible not to take into account the new particles absorbed before the end of the processing of the current particle.
This type of approach makes it possible to obtain a non-paralyzable system, the drawback being that the dead time resulting from the processing decreases the counting rate performance of such a system.
Digital methods also exist, called live time correction methods, that make it possible to reject part of the stacks. But this method causes an increase in the time to acquire a spectrum.
According to other solutions, certain signal processing parameters are adjusted, in particular concerning the shaping of the impulses. But, aside from degradation of the resolution, these solutions are not very efficient: they only slightly push back the boundary of the interaction rate from which the measuring system is no longer exploitable.
Lastly, there are a posteriori correction methods, in particular that from document FR 2 870 603, or described in Trigano, T., Traitement du signal spectrométrique: <<Etude du désempilement de spectre en énergie pour la spectrométrie gamma>>, 2006.
This method is based on knowledge of the duration and energy of each pulse, which is a limitation on said method, in particular at high counting rates.
BRIEF DESCRIPTION OF THE INVENTION
A method according to the invention makes it possible to estimate, from a spectrum acquired using a spectrometric chain, a corrected spectrum of the degradation related to the stacks.
The invention concerns a method for correcting a measured spectrum of X radiation (Spmes), including:

    
    
        determining a stack spectrum (Emp), which is the part of the measured spectrum (Spmes), that corresponds only to the stacks alone,
        calculating or estimating at least a first corrected spectrum (Spcor), by the difference between the measured spectrum (Spmes) and the stack spectrum (Emp).
    
    


The invention concerns in particular a method for correcting a measured spectrum of X radiation (Spmes), according to a number of channels Nc, each channel i corresponding to an energy range between Ei and Ei+ΔEi, including:

    
    
        determining or calculating the function δti,j(k) determining the size of the temporal deviation Δt interval separating two interactions with energy Ei and Ej, the stacking of which leads to a detected energy value Ek,
        determining or calculating, from said function δti,j(k), the probability function Pi,j(k) that an event counted in a channel k corresponds to a stack of two interactions, respectively of energies Ei and Ej,
        determining, from said probability function Pi,j(k), a stack spectrum (Emp), which is the part of the measured spectrum (Spmes), that corresponds only to the stacks alone,
        calculating or estimating at least a first corrected spectrum (Spcor), by the difference between the measured spectrum (Spmes) and the stack spectrum (Emp).
    
    


The stack spectrum can itself be calculated from the measured spectrum (Spmes) and exposure time (Texpo) and dead time (Tdead) data of the system, which is the minimum duration separating two photons, below which only one of the two photons is detected due to a stacking of those two photons.
A method according to the invention therefore uses only the data for the measured spectrum and the exposure time and dead time data for the system.
The dead time (Tdead) can be determined by simulation or experimentally.
A method according to the invention can include the calculation of Nit (Nit≧1) corrected spectrums (Spcor(n)) from the corrected spectrum of order Spcor(n-1), or from the measured spectrum if there is no preceding corrected spectrum, by difference between the latter and the stack spectrum (Emp).
A method according to the invention can in particular be implemented iteratively.
Thus, according to one embodiment, starting from a measured spectrum of an incident radiation having interacted with a sensor, a corrected spectrum is determined according to an iterative method including:

    
    
        a step for calculating or estimating a stack spectrum Emp, representing part of the preceding corrected spectrum Spcor(n-1) (i.e. established during the preceding iteration) that corresponds to stacks;
        a step for correcting the preceding corrected spectrum, using the stack spectrum Emp calculated or estimated during the preceding step, to obtain a new corrected spectrum Spcor(n);
        replacing the preceding corrected spectrum Spcor(n-1) with the new corrected spectrum Spcor(n), potentially to restart an iteration with said new corrected spectrum.
    
    


According to one particular embodiment, a method according to the invention includes the following steps, iterated Nit times, with Nit≧1, with 1≦n≦Nit:

    
    
        the stacking probability is calculated, as a function of the preceding corrected spectrum Spcor(n-1), or of the measured spectrum if there is no preceding corrected spectrum, and exposure time (Texpo) and dead time (Tdead) data,
        a stack spectrum (Emp) is estimated, as a function of the preceding corrected spectrum, or of the measured spectrum if there is no preceding corrected spectrum, and exposure time (Texpo) and dead time (Tdead) data,
        a corrected spectrum is calculated, by the difference between the measured spectrum (Spmes) and the estimated stack spectrum (Emp).
    
    


The invention also concerns a device for correcting a measured X radiation spectrum, including:

    
    
        means for determining a stack spectrum (Emp), which is the part of the measured spectrum (Spmes) that corresponds only to the stacks,
        means for calculating at least a first corrected spectrum (Spcor), by the difference between the measured spectrum (Spmes) and the stack spectrum (Emp).
    
    


The invention concerns in particular a device for correcting a measured X radiation spectrum, comprising a number of channels Nc, each channel i corresponding to an energy range between Ei and Ei+ΔEi, including:

    
    
        means for determining or calculating a function δti,j(k) determining the size of the temporal deviation Δt interval separating two interactions with energy Ei and Ej, the stacking of which leads to a detected energy value Ek,
        means for determining or calculating, from said function δti,j(k), the probability function Pi,j(k) that an event counted in a channel k corresponds to a stack of two interactions, respectively of energies Ei and Ej,
        means for determining a stack spectrum (Emp), which is the part of the measured spectrum (Spmes) that corresponds only to the stacks alone,
        means for calculating at least a first corrected spectrum (Spcor), using the difference between the measured spectrum (Spmes) and the stack spectrum (Emp).
    
    


The stack spectrum can be calculated from the measured spectrum (Spmes) and exposure time (Texpo) and dead time (Tdead) data of the system, minimal duration, separating two photons, below which only one of the two photons is detected.
Such a device can include means for determining the dead time by simulation.
A device according to the invention preferably includes means for determining a corrected spectrum according to an iterative method including the steps already described above.
In a method or a device according to the invention, the stacking probability can advantageously be calculated using the formula:




  P
  =
  
    1
    -
    
      
        (
        
          1
          -
          
            2
            ×
            
              
                T
                dead
              
              
                T
                expo
              
            
          
        
        )
      
      
        
          
            ∑
            
              j
              =
              1
            
            
              N
              ⁢
              
                
              
              ⁢
              max
            
          
          ⁢
          
            
              Sp
              
                cor
                ⁡
                
                  (
                  
                    n
                    -
                    1
                  
                  )
                
              
            
            ⁡
            
              (
              j
              )
            
          
        
        -
        1
      
    
  




    
    
        or using the approximation formula
    
    






  P
  =
  
    1
    -
    
      
        (
        
          1
          -
          
            2
            ×
            
              
                T
                dead
              
              
                T
                expo
              
            
          
        
        )
      
      
        
          ∑
          
            j
            =
            1
          
          
            N
            ⁢
            
              
            
            ⁢
            max
          
        
        ⁢
        
          
            Sp
            
              cor
              ⁡
              
                (
                
                  n
                  -
                  1
                
                )
              
            
          
          ⁡
          
            (
            j
            )
          
        
      
    
  




where SPcor(n-1)(j) is the value, for the channel j, of the preceding corrected spectrum SPcor(n-1), or of the measured spectrum if there is no preceding corrected spectrum.
The stack spectrum can be calculated using the formula:




  
    Emp
    ⁡
    
      (
      k
      )
    
  
  =
  
    
      ∑
      
        i
        =
        1
      
      Nc
    
    ⁢
    
      
        ∑
        
          j
          =
          i
        
        Nc
      
      ⁢
      
        
          P
          
            i
            ,
            j
          
        
        ⁡
        
          (
          k
          )
        
      
    
  




In said formula, one can have:




  
    
      P
      
        i
        ,
        j
      
    
    ⁡
    
      (
      k
      )
    
  
  =
  
    1
    -
    
      
        [
        
          1
          -
          
            2
            ×
            δ
            ⁢
            
              
            
            ⁢
            
              
                
                  t
                  
                    i
                    ,
                    j
                  
                
                ⁡
                
                  (
                  k
                  )
                
              
              /
              
                T
                expo
              
            
          
        
        ]
      
      
        
          
            Sp
            
              cor
              
                (
                
                  n
                  -
                  1
                
                )
              
            
          
          ⁡
          
            (
            
              E
              i
            
            )
          
        
        ×
        
          
            Sp
            
              cor
              
                (
                
                  n
                  -
                  1
                
                )
              
            
          
          ⁡
          
            (
            
              E
              j
            
            )
          
        
      
    
  




Where δti,j(k) is determined from the inverse function of the stacking function F−1EiEj, the stacking function associating FEiEj, with a pair of photons with energies (Ei, Ej), the energy measured as a function of the shift Δt between the arrival moments of the two photons. The function δti,j(k) determines the size of the temporal deviation interval Δt separating two interactions of energy Ei and Ej, the stacking of which leads to a detected energy value Ek. The stacking function FEiEj can be obtained experimentally or by simulation, for example it is estimated by a decreasing affine function of the energy.
The invention also concerns a spectrometry device, including:

    
    
        a radiation sensor,
        electronic means for processing signals coming from the sensor and to form a spectrum of a radiation having interacted with the sensor,
        a device for correcting a measured X radiation spectrum according to the invention, as described above.
    
    


According to the invention, the stacks are not limited by a modification of the processing circuit of the signal, but by a processing of the measured energy spectrum.
According to one embodiment, δtij(k) is independent of k, and is equal, regardless of k, to




  
    δ
    ⁢
    
      
    
    ⁢
    
      
        t
        
          i
          ,
          j
        
      
      ⁡
      
        (
        k
        )
      
    
  
  =
  
    
      ∂
      
        t
        ij
      
    
    =
    
      
        
          E
          
            k
            +
            1
          
        
        -
        
          E
          k
        
      
      
        
          (
          
            
              E
              i
            
            +
            
              E
              j
            
            -
            
              max
              ⁡
              
                (
                
                  
                    E
                    i
                  
                  ,
                  
                    E
                    j
                  
                
                )
              
            
          
          )
        
        /
        
          T
          dead
        
      
    
  







BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 shows a spectrometry device according to the invention,
FIG. 2 shows measurements done on an experimental spectrometry system,
FIG. 3 shows a model of a stacking function with two photons,
FIG. 4 shows a dead time measurement by adjusting the formula for the counting rate, for a paralyzable system, to experimental data,
FIG. 5 shows the performance of an iterative method according to the invention,
FIG. 6 shows simulated stacking probability curves for a dead time of 62 ns,
FIG. 7 shows a ratio curve of the stacking probability of two photons over the total stacking probability, for a dead time of 62 ns,
FIGS. 8A and 8B are spectrum measurements at different flows, before and after correction according to the invention, respectively,
FIG. 9 is a spectrum measurement at two different flows, which illustrates the problems posed by the stacking phenomenon,
FIG. 10 presents a spectrometry device, with delay line.



DETAILED DESCRIPTION OF THE INVENTION
One example of an embodiment of a device according to the invention will be given, in connection with FIG. 1.
This device, a spectrometry chain 1, includes the following elements:

    
    
        a radiation source 1,
        a sensor 2, for example made from CdTe; this sensor is for example provided with two electrodes, at the terminals of which a signal results from an interaction of a radiation or a photon with the material of the sensor,
        a charge preamplifier 4,
        an amplifier 6,
        an Analog/Digital converter 8,
        a means 10 for performing processing of the signal that has been shaped and digitized by the means 4, 6, 8, and to form a spectrum of a radiation according to a number of channels Nc, each channel i corresponding to an energy range between Ei and Ei+ΔEi, ΔEi (ΔEi≠0) then corresponding to the energy width of the channel i. ΔEi can be identical for each channel, such that for any channel i, ΔEi=ΔE, ΔE then being a constant.
        a means 12 for performing processing of the spectrums following a method according to the invention.
    
    


Other processing means, for example based on delay line circuits, in particular making it possible to shape the signal, can be provided upstream of the analog digital converter.
During a use of the device, a sample of material 100 is arranged between the source and the detector in order to be characterized.
The means 12 in particular includes a computer or a microcomputer or a calculator programmed to store and process spectrum data and data to implement a method according to the invention, for example the data Texpo and Tdead.
More precisely, a central processing unit 16 is programmed to carry out a processing method according to the invention, by calculating a stack spectrum, for example using an iterative method as described below in relation to FIG. 5, and by calculating or estimating a corrected spectrum (Spcor) using the difference between stored measured spectrum data (Spmes) and stored stack spectrum data (Emp). It should be noted that all or part of the processing method according to the invention could be implemented by the means 10, this means being able to be a FPGA (Field Programmable Gate Array) or an ASIC (Application Specific Integrated Circuit).
This means 12 can make it possible to control the X radiation source 1, to trigger a radiation emission and perform one or several measurements using the detector 2. This electronic means 12 can make it possible to perform a synchronous control of the triggering of the radiation source(s) and the detector(s).
This means 12 can also make it possible to conduct an estimate of the dead time Tdead and the stacking function FEiEj, or from its inverse F−1, experimentally or by modeling, as explained below.
Using the means 12, an operator can select one or several parameters to carry out these operations. The operator can in particular select a number of iterations Nit to carry out an iterative process according to the invention, or order the stop of the iterations. The iterations can also stop automatically according to a convergence criterion.
On the monitor or the display means 17, it is possible to display a measured spectrum Spmes as well as a corrected spectrum Spcor according to the present invention, and possibly a stack spectrum Emp.
An operator can choose, for example using a pull-down menu, a number of iterations to be performed for processing according to the invention.
Such a device can also implement a delay line making it possible to shape the pulses in a trapezium, for example as described in EP 2071722. This device, illustrated in FIG. 10, primarily includes:

    
    
        a charge preamplification circuit 20 of the integrator type, able to be connected to the semiconductor detector 2 (the resistor 14 designates a polarization resistance associated with the detector 2),
        a delay line circuit 22 for measuring energy (including a delay line 32, a first gain 34, a subtractor 36 and a second gain 38), connected at the outlet of the preamplification circuit, and
        a sampler connected at the outlet of the energy measurement circuit.
    
    


It also includes a synchronization circuit 52 comprising:

    
    
        a current pulse measuring circuit 56, connected at the outlet of the preamplification circuit 20 and making the difference between the output and a derivative of the output signal of the preamplification circuit, and
        a discrimination circuit 66 forming a binary signal as a function of the output signal of the pulse measuring circuit 22, said logic signal controlling the sampling moments of the sampler.
    
    


Means such as the means 12 described above can be combined with this circuit to produce a device implementing a method according to the invention.
Other aspects of this circuit are described in document EP 2071722.
In other words, the signal is shaped, then digitized by an analog digital converter (ADC), then classified in the form of a spectrum by a programmable electronic circuit of the FPGA type. The passage of the shaped signal (so-called trapezium, or temporal, signal) and digitized via the ADC to the spectrum is done in the FPGA.
From an incident X radiation 20 with a spectrum Sp0, a spectrum Spmes is measured using the sensor 2 and a processing means 4-12. Let Texpo be the exposure time, i.e. the time used or measuring time, or acquisition time, during which the energy spectrum is produced from the incident flow at the detector.
Spmes is for example one of the spectrums that were commented on above in relation to FIG. 9.
As already explained above, such a spectrum includes perturbations that come from photon stacking phenomena.
Sp0(E) designates the number of photons of the incident radiation 20 at a certain energy E.
Let Pmean be the probability for each photon of stacking with at least one other photon. The measured spectrum Spmes at energy E can then be deduced from the incident spectrum Sp0 by the following equality:
Spmes(E)=Sp0(E)×(1−Pmean)+Emp(E)
The factor (1−Pmean)×Sp0(E) represents the group of photons that have not undergone stacking.
The term Emp(E) is the contribution to the measurement, at energy E, of all of the photons of the spectrum Sp0 that are stacked (this is the “stack spectrum”). Emp(E) depends on the incident spectrum Sp0 and the behavior of the system formed by the sensor 2 and by the electronic means 4-10 with regard to the photons detected at very close times, i.e. in a stacking situation.
The dead time Tdead is defined: it is the minimum duration, separating two interactions (two events), below which only one out of two events is detected.
For two incident photons on the sensor, during the duration Texpo, there is stacking if the interaction moment t1 of a photon in the sensor 2 is separated, temporally, from the interaction moment t2 of the other photon, in the sensor 2, by a duration shorter than Tdead r in other words if |t2−t1|≦Tdead.
When arrival of the photons in the detector 2 is assumed to be equiprobable during the duration Texpo, the stacking probability of those two incident photons is:

P0=2×Tdead/Texpo 

Conversely:

    
    
        the probability for an incident photon of not stacking with another photon is 1−P0;
        the probability for that same incident photon of not stacking with any photon is equal to the product of the probabilities of the different events, because they are independent events.
    
    


The stacking probability P of an incident photon with at least one other photon is therefore equal to:

Pmean=1−(1−P0)N-1 

Where N represents the number of photons in the incident spectrum:




  N
  =
  
    
      ∑
      E
      
        
      
    
    ⁢
    
      
        
          Sp
          0
        
        ⁡
        
          (
          E
          )
        
      
      .
    
  




Hereinafter, the energies being discretized, Ei denotes the energy range of the photons detected in the absence of stacks in the ith channel of the spectrometric sensor.
In order to estimate the stack spectrum, one starts from the approximation according to which all of the stacks concern exactly two photons.
The boundaries of this approximation are studied and discussed later.
When two photons are absorbed by the sensor in a stacking situation, only one event is counted.
To understand this aspect well, FIG. 2 shows measurements done on an experimental spectrometry system, more precisely it temporally illustrates the pulses generated by two particles after shaping by the electronic circuit.
For a small temporal shift (the interaction moment t1 of the first photon and the interaction moment t2 of the other photon verify the inequality |t2−t1|≦Tdead), only one interaction is detected, whereas for a temporal shift greater than about Tdead, two interactions are counted.
Moreover, when a single interaction is counted, the energy detected does not correspond to the energy deposited by one or the other of those photons, but rather to a different energy. The stack spectrum Emp(E) corresponds to an estimation of the portion of the measured spectrum Spmes(E) resulting from stacks. It is obtained by quantifying the energy at which a single event, corresponding to two interactions in a stacking situation, is measured.
The estimation of this stack spectrum is done in two steps:

    
    
        the stacking functions with two interactions corresponding to two photons are first modeled,
        these functions are added up over all possible energy pairs Ei, Ej with 1≦i≦Nc, and i≦j≦Nc (or 1≦j≦Nc), Nc being the number of channels, to estimate the stack spectrum.
    
    


To first estimate the stacking functions corresponding to the interactions of two photons, consider a pair of photons with energies (Ei, Ej).
A stacking function is the function that associates this pair with the energy measured as a function of the shift Δt between the arrival moments of the two photons:

FEi,Ej:ΔtE 

[0,Tdead]→[max(Ei,Ej),Ei+Ej]

In other words, the stacking function FEi,Ej establishes a relationship between the temporal shift of two stacked interactions of energies Ei and Ej and the energy attributed to that stack.
Later, an example of modeling of this function will be provided, this being a decreasing function of the shift Δt.
For Δt=0, this function reaches its maximum value Ei+Ej.
It then involves a coincidence detection: the two photons having interacted are therefore indissociable and their energies add up.
The minimum value of this function is max (Ei,Ej). Indeed, the measured energy always remains greater than or equal to the maximum energy deposited by one of the two photons.
This is illustrated in FIG. 3, where the top figure illustrates the energy measured for the higher energy photon max(E1, E2), and the bottom figure illustrates the energy measured for the lower energy photon min(E1, E2).
For a zero temporal shift (case of coincidence detection), the measurement is distorted because an event is measured at an energy equal to the sum of the energies of the photons (or E1+E2=max(E1, E2)+min(E1, E2)).
For a shift greater than or equal to the dead time, each of the two photons is indeed measured at its own energy (the higher energy one at Max(E1, E2) and the lower energy one at min(E1, E2)).
For an intermediate temporal shift, an event is measured at a variable energy between E1+E2.
It is clear that this involves a continuous and decreasing function over the interval [0, Tdead].
This function of the energy measured as a function of the temporal shift is therefore reversible. Its inverse, noted F−1, makes it possible to associate, with an energy, between the maximum value Ei+Ej and the minimum value max (Ei,Ej), a time interval:

F−1Ei,Ej:EΔt 

[max(Ei,Ej),Ei+Ej]→[0,Tdead]

The energy range being discretized, this inverse function F−1EiEj(Ek) is determined as follows:

    
    
        for Ek included in the interval [max(Ei, Ej), Ei+Ej], F−1EiEj(Ek) is the time shift Δt between two interactions with energies Ei and Ej, this shift resulting in a stacking at energy Ek,
        for Ek outside the interval [max(Ei, Ej), Ei+Ej]: F−1EiEj(Ek)=0; no temporal shift can provide such an energy, since it is outside the possible values.
    
    


For example: i≠j and/or i≠k and/or j≠k.
Given the meaning of the function F, given above, this inverse function F−1EiEj(Ek) represents the temporal shift Δt between two interactions of respective energies Ei and Ej such that these interactions are considered a single interaction with energy Ek.
This function F−1EiEj can be chosen to be linear.
We can now proceed to calculate the elementary stack spectrum.
Let us calculate the spectrum generated by the stacks between the photons having deposited the energy Ei and those having deposited the energy Ej.
For this, the energy interval [max(Ei,Ej),Ei+Ej] is discretized into energy channels Ek each having the width of a channel of the spectrometric sensor, we therefore have




  
    
      E
      i
    
    +
    
      E
      j
    
    -
    
      max
      ⁡
      
        (
        
          
            E
            i
          
          ,
          
            E
            j
          
        
        )
      
    
  
  
    Δ
    ⁢
    
      
    
    ⁢
    E
  




channels, ΔE corresponding to the energy range corresponding to each channel, this range here being assumed to be identical for each of the Nc channels.

For each value of k, the time interval δti,j(k) associated with the channel with energy Ek is given by the equation:

δti,j(k)=FEiEj−1(Ek+1)−FEiEj−1(Ek)

Among the group of energy photons Ej, noted Sp0(Ej), the probability can be estimated that at least one of them is in the time interval between F−1EiEj(Ek) and F−1EiEj(Ek+1) in relation to a photon with energy i:

Pi,j(k)=1−[1−2×δti,j(k)/Texpo]Sp0(Ei)×Sp0(Ej) 

Pi,j(k) is the contribution, at energy Ek of the stacking function, of the photons with energy Ei stacked with those of energy Ej. In other words, Pi,j(k) represents, for each channel (k) corresponding to the energy Ek, the probability that an event counted in that channel corresponds to a stack of two interactions, separated in time by a duration shorter than Tdead, with respective energies Ei and Ej. Pi,j will be called stacking probability and there will be as many stacking probabilities Pi,j as there are pairs (i,j), with 1≦i≦Nc and i≦j≦Nc
The stack spectrum Emp is then estimated by adding up, for each channel k, stacking probabilities previously defined for each pair i and j. This can be done iteratively by a loop over all of the pairs (Ei, Ej).
If Nc denotes the number of energy channels of the spectrometric sensor, the resulting spectrum is the sum of Nc2/2+Nc/2 elementary stack spectrums:




  
    Emp
    ⁡
    
      (
      k
      )
    
  
  =
  
    
      ∑
      
        i
        =
        1
      
      Nc
    
    ⁢
    
      
        ∑
        
          j
          =
          i
        
        Nc
      
      ⁢
      
        
          P
          
            i
            ,
            j
          
        
        ⁡
        
          (
          k
          )
        
      
    
  




In practice we are seeking to estimate the dead time Tdead and the stacking function for two photons. For both of these, there are various ways to proceed.
The dead time Tdead can first be obtained by:

    
    
        simulating the pulse forms, at the outlet of the analog electronics, after absorption of a particle by the semiconductor 2, then filtering and processing of the signal emitted by the analog electronics,
        then estimating the minimum duration separating two photons making it possible to separate them.
    
    


According to this first method, the influence of the digital processing of the pulses on the dead time is neglected.
Alternatively, we proceed experimentally, by analyzing the signal of the pulses.
According to a first experimental method:

    
    
        one first reads the output signal from the means 4, 6 (analog electronics), before digitization and construction of the spectrums,
        then one estimates the minimum duration separating two photons that makes it possible to separate them.
    
    


According to a second experimental method, one proceeds by spectrum analysis:

    
    
        one first estimates the measured counting rate as a function of the incident flow (number of photons/s): different spectrums are produced at different counting rates, by varying the intensity I of the radiation generator 20. The theoretical counting rate is calculated assuming that it is proportionate to I. The reference value is estimated for the lowest flow, for which one considers the stacking phenomenon to be negligible (typically a stacking probability for an incident photon less than 1%),
        one then chooses a model for the system, for example the paralyzable model

f(n)=ne−n×Tdead 

or the non-paralyzable model:

    
    






  
    f
    ⁡
    
      (
      n
      )
    
  
  =
  
    n
    
      1
      -
      
        n
        ×
        
          T
          dead
        
      
    
  




or any other function f(n) considered relevant by those skilled in the art.

Where n is the theoretical counting rate, i.e. the counting rate in the absence of stacks.
One can then proceed to calculate the dead time, by adjusting f(n) to the experimental counting rate data. Certain devices for processing pulses and forming a spectrum also make it possible to determine a dead time. This size may also be considered a dead time exploitable by the invention.
FIG. 4 illustrates this principle, the adjustment then being done according to a paralyzable model, preferred by the inventors.
A set of counting measurements (represented by the dots) is done for different incident flow values, adjusted via the current I of the tube X (in mA). The counting rate formula for a paralyzable system is then adjusted on the experimental data by varying the system's dead time Tdead.
The adjustment then yields a dead time of 58 ns.
Regarding the stacking function, one can proceed with an estimation, by simulation, of the output pulse shapes emitted by the semiconductor 2 during absorption of a particle and filtering of said signal by the processing electronics. The stacking function is then estimated by simulating the system's response when it is subjected to two pulses corresponding to Ei and Ej, and by varying the temporal deviation Δt between those two pulses. The stacking function FEiEj(Δt) is then estimated corresponding to the energy E coming from the stack of two energy pulses Ei and Ej as a function of the temporal deviation Δt separating those two interactions. The digital processing of the pulses can be neglected. In that case, this simulation makes it possible to estimate the shape of the analog signal, corresponding to the inlet of the block 8 of FIG. 1. Otherwise, one can proceed experimentally:

    
    
        by using a pulse generator at the inlet of the means 4 or 6 respectively constituting the preamplifier or the amplifier of the analog electronics;
        by measuring the energy Ek produced by two generated pulses, corresponding to the energies Ei and Ej, as a function of their temporal deviation Δt.
    
    


Lastly, another method is the so-called “affine model.” Indeed, the measured energy decreasing with the shift Δt between the detection moments of two interactions, the hypothesis can be made of a stacking function for two photons of the affine type, which linearly connects the measured energy and the temporal shift Δt.
The validity of this model was verified during an experimental study not described here

FEi,Ej: Δtmax(Ei,Ej)−Δt×(Ei+Ej−max(Ei,Ej))/Tdead 

[0,Tdead]→[max(Ei,Ej),Ei+Ej]

The inverse of the stacking function for two photons, making it possible to associate an energy with a time interval separating the two photons and noted FEi,Ej−1, is then deduced using the formula:




  
    
      F
      
        
          E
          i
        
        ,
        
          E
          j
        
      
      
        -
        1
      
    
    ⁢
    
      :
    
    ⁢
    
      
    
    ⁢
    E
  
  ↦
  
    
      E
      -
      
        max
        ⁡
        
          (
          
            
              E
              i
            
            ,
            
              E
              j
            
          
          )
        
      
    
    
      
        
          
            
              (
              
                
                  E
                  i
                
                +
                
                  E
                  j
                
                -
                
                  max
                  ⁡
                  
                    (
                    
                      
                        E
                        i
                      
                      ,
                      
                        E
                        j
                      
                    
                    )
                  
                
              
              )
            
            /
            
              T
              dead
            
          
        
      
      
        
          
            
              [
              
                
                  max
                  ⁡
                  
                    (
                    
                      
                        E
                        i
                      
                      ,
                      
                        E
                        j
                      
                    
                    )
                  
                
                ,
                
                  
                    E
                    i
                  
                  +
                  
                    E
                    j
                  
                
              
              ]
            
            →
            
              [
              
                0
                ,
                
                  T
                  dead
                
              
              ]
            
          
        
      
    
  




Thus, for E(k) such that max(Ei, Ej)≦E(k)≦Ei+Ej, F−1EiEj(Ek) corresponds to the temporal shift of the two interactions Ei and Ej.
For an energy E(k) such that E(k)<max (Ei, Ej) or E(k)>Ei+Ej, F−1EiEj is not defined.
Yet, we have seen, the time interval associated with the energy Ek channel is given by the equation:

δti,j(k)=FEiEj−1(Ek+1)−FEiEj−1(Ek)

According to the hypothesis of an affine function F:




  
    
      
        
          δ
          ⁢
          
            
          
          ⁢
          
            
              t
              
                i
                ,
                j
              
            
            ⁡
            
              (
              k
              )
            
          
        
        =
        
          
            
              E
              
                k
                +
                1
              
            
            -
            
              E
              k
            
          
          
            
              (
              
                
                  E
                  i
                
                +
                
                  E
                  j
                
                -
                
                  max
                  ⁡
                  
                    (
                    
                      
                        E
                        i
                      
                      ,
                      
                        E
                        j
                      
                    
                    )
                  
                
              
              )
            
            /
            
              T
              dead
            
          
        
      
    
    
      
        (
        1
        )
      
    
  




If the energy range ΔEk for each channel k is constant and equal to ΔE,




  
    δ
    ⁢
    
      
    
    ⁢
    
      
        t
        
          i
          ,
          j
        
      
      ⁡
      
        (
        k
        )
      
    
  
  =
  
    
      Δ
      ⁢
      
        
      
      ⁢
      E
    
    
      
        (
        
          
            E
            i
          
          +
          
            E
            j
          
          -
          
            max
            ⁡
            
              (
              
                
                  E
                  i
                
                ,
                
                  E
                  j
                
              
              )
            
          
        
        )
      
      /
      
        T
        dead
      
    
  




and is therefore a constant for given i and j: in other words, according to this hypothesis, regardless of the value of k, δtij(k) only depends on i and j.
The function δti,j(k) determines the size of the temporal deviation Δt interval separating two interactions with energy Ei and Ej, the stacking of which leads to a detected energy value Ek. When the temporal deviation Δt between these two interactions is such that:

F−1EiEj(k)≦Δt<F−1EiEj(k)+δti,j(k),

the stacking leading to a detected energy equal to Ek.
If the temporal deviation Δt is not included in the interval defined by the preceding equation, for example if:

F−1EiEj(k)+δti,j(k)≦Δt<F−1EiEj(k)+δti,j(k)+δti,j(k+1),

Which can be written:

F−1EiEj(k+1)≦Δt<F−1EiEj(k+1)+δti,j(k+1),

then the stacking leads to a detected energy equal to Ek+1.
One therefore sees that there is an interval, with width δti,j(k), defining the temporal deviations Δt, such that two interactions of energies Ei and Ej temporally separated by a difference Δt included in that interval, are stacked and then considered to be a single interaction with energy Ek. One could also designate δti,j(k) as the width of a window encompassing or including the temporal differences Δt, such that two interactions with energy Ei and Ej temporally spaced of such differences are considered to be stacked with energy Ek.
A correction method according to the invention, which uses the elements (Tdead, Emp, stacking function) will now be explained, in relation to FIG. 5.
This method makes it possible to deduce, from a spectrum measurement Spmes, degraded by the stacking phenomenon, a corrected spectrum Spcor.
But the incident spectrum Sp0 is generally unknown, and it is then impossible to estimate the stacking probability Pmean, the stacking probabilities Pi,j or the stack spectrum Emp according to the expressions previously described. Thus, correcting the stacks is based on an estimate of the mean stacking probability Pmean, stacking probabilities Pi,j and the stack spectrum Emp, for example according to the expressions:



  
    
      P
      mean
    
    =
    
      1
      -
      
        
          (
          
            1
            -
            
              P
              0
            
          
          )
        
        
          N
          -
          1
        
      
    
  




  
    
      With
      ⁢
      
        
      
      ⁢
      N
    
    =
    
      
        ∑
        E
        
          
        
      
      ⁢
      
        
          Sp
          cor
        
        ⁡
        
          (
          E
          )
        
      
    
  




  
    
      
        P
        
          i
          ,
          j
        
      
      ⁡
      
        (
        k
        )
      
    
    =
    
      1
      -
      
        
          [
          
            1
            -
            
              2
              ×
              δ
              ⁢
              
                
              
              ⁢
              
                
                  
                    t
                    
                      i
                      ,
                      j
                    
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
                /
                
                  T
                  expo
                
              
            
          
          ]
        
        
          
            
              Sp
              cor
            
            ⁡
            
              (
              
                E
                i
              
              )
            
          
          ×
          
            
              Sp
              cor
            
            ⁡
            
              (
              
                E
                j
              
              )
            
          
        
      
    
  




  
    
      And
      ⁢
      
        
      
      ⁢
      
        Emp
        ⁡
        
          (
          k
          )
        
      
    
    =
    
      
        ∑
        
          i
          =
          1
        
        Nc
      
      ⁢
      
        
          ∑
          
            j
            =
            1
          
          Nc
        
        ⁢
        
          
            P
            
              i
              ,
              j
            
          
          ⁡
          
            (
            k
            )
          
        
      
    
  



If the correction method is iterative, Spcor will be considered as being established from the measured spectrum Spmes during the first iteration; but, during subsequent iterations, a corrected spectrum Spcor(n) will be established from the corrected spectrum Spcor(n-1) obtained during the preceding iteration (assuming 1≦n≦Nit, where Nit is the number of iterations). For example, the spectrum Spcor can be equal to the spectrum Spmes during the first iteration and, during successive iterations, Spcor can be equal to the corrected spectrum during the preceding iteration.
If there is only one iteration, Spcor is established from the measured spectrum Spmes, for example Spcor=Spmes.
This method includes 4 input variables:

    
    
        the spectrum to be corrected Spmes(j), which is in fact a column vector with dimension Number of channels (NC)×1:
    
    






  
     
    
      N
      C
    
  
  ⁢
  
    {
    
      [
      
        
          
            
              
            
          
        
        
          
            Spmes
          
        
        
          
            
              
            
          
        
      
      ]
    
  




A (digitized) spectrum was obtained by measuring, for example using the device of FIG. 1, and Spcor can result from said spectrum.

    
    
        The integration time Texpo. This is a real number given in ms, and it is a physical data of the system, as a function of the radiation source used.
        The dead time of the sensor−electronics system Tdead. This is a real number given in ms. It has been explained how it can be measured or estimated.
        The number of iterations to correct the stacks, therefore done iteratively, Nit. This number is for example chosen by an operator of the data processing system. It is possible for this number not to be predetermined. The method will then be stopped by the operator, or according to a convergence criterion, by comparing two spectrums corrected during two successive iterations.
    
    


In output, this method provides a corrected stack spectrum, Spcor(Nit), also a vector with dimension NC×1:




  
     
    
      N
      C
    
  
  ⁢
  
    {
    
      [
      
        
          
            
              
            
          
        
        
          
            
              Sp
              
                cor
                ⁡
                
                  (
                  Nit
                  )
                
              
            
          
        
        
          
            
              
            
          
        
      
      ]
    
  




This method first includes (step S1) an initialization of the corrected spectrum from the measured spectrum, for example Spcor(0)=Spmes. In other words, during the initialization, the measured spectrum is identified at the corrected spectrum.
According to one embodiment, an iterative correction is then done Nit times.
Upon each iteration, the following steps are carried out:

    
    
        calculation of the mean stacking probability (function f0) (step S2),
        estimate of the stack spectrum (function f1) (step S3),
        correction of the stacks (function f2) (step S4) to provide a corrected spectrum Spcor.
    
    


Step S2 makes it possible, from 3 input parameters: Spcor(n-1) (which is a vector, initialized as indicated above for n=1); Tdead (real number); Texpo (real number), to provide a real number Pmean, using a one-step calculation:




  
    P
    mean
  
  =
  
    1
    -
    
      
        (
        
          1
          -
          
            2
            ×
            
              
                T
                dead
              
              
                T
                expo
              
            
          
        
        )
      
      
        
          ∑
          
            j
            =
            1
          
          
            N
            C
          
        
        ⁢
        
          
            Sp
            
              cor
              ⁡
              
                (
                
                  n
                  -
                  1
                
                )
              
            
          
          ⁡
          
            (
            j
            )
          
        
      
    
  




Or, more rigorously,




  
    P
    mean
  
  =
  
    1
    -
    
      
        (
        
          1
          -
          
            2
            ×
            
              
                T
                dead
              
              
                T
                expo
              
            
          
        
        )
      
      
        
          
            ∑
            
              j
              =
              1
            
            
              N
              C
            
          
          ⁢
          
            
              Sp
              
                cor
                ⁡
                
                  (
                  
                    n
                    -
                    1
                  
                  )
                
              
            
            ⁡
            
              (
              j
              )
            
          
        
        -
        1
      
    
  




From the two parameters Spcor(n-1)(vector) and stacking function Pij, determined using the temporal differences interval width functions δtij previously defined, step S3 makes it possible to provide an output: Emp (which is a vector), by a calculation also done in one step:



  
    
      Emp
      ⁢
      
        (
        k
        )
      
    
    =
    
      
        ∑
        
          i
          =
          1
        
        Nc
      
      ⁢
      
        
          ∑
          
            j
            =
            i
          
          Nc
        
        ⁢
        
          
            P
            
              i
              ,
              j
            
          
          ⁡
          
            (
            k
            )
          
        
      
    
  




  
    With
    ⁢
    
      :
    
  




  
    
      
        P
        
          i
          ,
          j
        
      
      ⁡
      
        (
        k
        )
      
    
    =
    
      1
      -
      
        
          [
          
            1
            -
            
              2
              ×
              δ
              ⁢
              
                
              
              ⁢
              
                
                  
                    t
                    
                      i
                      ,
                      j
                    
                  
                  ⁡
                  
                    (
                    k
                    )
                  
                
                /
                
                  T
                  expo
                
              
            
          
          ]
        
        
          
            
              Spcor
              
                (
                
                  n
                  -
                  1
                
                )
              
            
            ⁡
            
              (
              
                E
                i
              
              )
            
          
          ×
          
            
              Spcor
              
                (
                
                  n
                  -
                  1
                
                )
              
            
            ⁡
            
              (
              
                E
                j
              
              )
            
          
        
      
    
  



Spcor(n-1) has already been defined above and δi,j(k) is the function that was previously presented, and which can be calculated according to one of the methods already explained, and preferably by equation (1).
The correction of the stacks (step S4) is done from the vector Spmes (or Spcor(n-1) if there has been more than one iteration) of the real number P and the vector Emp determined in S3. It results in an output Spcor(n). The calculation is done in one step:




  
    Sp
    
      cor
      ⁡
      
        (
        n
        )
      
    
  
  =
  
    
      
        Sp
        
          cor
          ⁡
          
            (
            
              n
              -
              1
            
            )
          
        
      
      -
      Emp
    
    
      1
      -
      
        P
        mean
      
    
  




Step S4 therefore makes it possible to subtract the stack spectrum from the measured spectrum.
It can include a division by a factor depending on the mean stacking probability Pmean of the corrected spectrum Spcor, this factor can be equal to 1−Pmean. If this division has not been done, the shape of the spectrum will be kept, but the integral will not be correct.
If Nit iterations have been done, the method stops and the last spectrum Spcor(Nit) obtained is considered to be the desired corrected spectrum. Otherwise, the process is restarted using the last obtained spectrum Spcor(n-1) as the starting point.
Upon each iteration, the calculations are done, in particular of Pi,j(k) and Emp(k), as a function of the corrected spectrum obtained during the preceding iteration (except the first iteration where Pi,j(k) and Emp(k) are calculated as a function of the measured spectrum, which is then considered the corrected spectrum).
The higher the number Nit, the more precise the result. According to the experimental results obtained, this number is between 1 and 100, preferably between 2 and 10.
The process of estimating the stacking function is based on the hypothesis that the stacks with two photons are mostly compared to the stacks with three or more photons.
This hypothesis is justified particularly for low flows (low stacking rate).
For an incident photon, the probability of stacking with one and only one photon can be written:

P2=P0×(1−P0)n×n 

Let us recall that the stacking probability can be written:

P=1−(1−P0)N-1 

Consider the example of a system coupling a photon sensor followed by processing electronics whereof the global dead time, i.e. the minimum time interval separating 2 photons absorbed in the sensor to measure them, is 62 ns.
FIG. 6 illustrates the variations of P and P2, defined above, as a function of the incident flow, expressed in number of photons per pixel and per second.
The probability of stacking with two photons (curve II) is an increasing function of the flow for the low values thereof.
It then reaches a maximum before tending towards 0 for very significant flows, greater than 5×107 photons/pixel/s. The stacking probability P (curve I) is, however, an increasing function of the flow.
In the high flow zone, this stacking probability tends toward 1 and the group of stacks, are stacks with more than two photons.
FIG. 7 shows the ratio of the probability of stacking with two photons over the total stacking probability.
This curve shows that the hypothesis is accurate to within 3% in the range [0−5×105 photons/pixel/s]. It remains true to within 7% for a flow of 1×106 photons/pixel/s.
One can see that the range of flows over which the two-photon stacking hypothesis is accurate is broader as the system dead time is lower.
FIGS. 8A-8B illustrate the performance of the method for correcting stacks according to the invention, in rapid spectrometry.
FIG. 8A shows the spectrums measured for different photon flows:

    
    
        curve I: 3.6×105 photons/s/pixel;
        curve II: 7.2×105 photons/s/pixel;
        curve III: 1.4×106 photons/s/pixel;
        curve IV: 2.0×106 photons/s/pixel;
        curve V: 5.8×106 photons/s/pixel;
    
    


FIG. 8B shows the same spectrums after correction (the spectrum I′ being the corrected spectrum of spectrum I, etc.) in 3 iterations.
These figures show good correction up to about 3×106 photons/s/pixel and a degradation of the corrected spectrum acquired with a flow of about 6×106 photons/s/pixel, although the result still remains acceptable.
The complete calibration is relatively simple.
It can be done through a series of full flow measurements for different intensities of the X-ray generator.
In the particular embodiment of the invention described above, the determination of the two-photon stacking functions does not require additional calibration; it can be based on a model based solely on knowledge of the dead time.
The invention therefore proposes a rapid correction method that has the interest of having as input only the data for the spectrum Spmes as well as the data for Texpo and Tdead.
This therefore makes it possible to reduce the amount of information to be transmitted to the means performing the data processing.

## Claims

1. A method for correcting a measured spectrum of X radiation according to a number of channels Nc, each channel i corresponding to an energy range between Ei and Ei+ΔEi, comprising:
determining, using processing circuitry, a function δti,j(k), which defines a size of a temporal deviation Δt interval, such that two interactions with energy Ei and Ej temporally separated by Δt are stacked and considered to have a detected energy value Ek;
determining, using the processing circuitry, from the function δti,j(k), a probability function Pi,j(k) that an event counted in a channel k corresponds to a stack of two interactions, respectively, of energies Ei and Ej;
calculating, using the processing circuitry, from the probability function Pi,j(k), a stack spectrum, which is a part of the measured spectrum that corresponds only to the stack; and
adjusting, using the processing circuitry, the measured spectrum based on a difference between the measured spectrum and the calculated stack spectrum thus forming at least a first corrected spectrum accounting for perturbations present in the measured spectrum due to a stacking phenomenon.

2. The method according to claim 1, the stack spectrum being calculated from the measured spectrum, exposure time, dead time data, and a minimum duration, separating two photons, below which there is stacking of the two photons and only one of the two photons is detected.

3. The method according to claim 2, the dead time being determined by simulation or experimentally.

4. The method according to claim 1, further comprising iteratively calculating Nit (Nit≧1) corrected spectrums, each iteration calculating a corrected spectrum of order (n) from a corrected spectrum of order (n−1) or from the measured spectrum if there is no preceding corrected spectrum of order (n−1), by calculating a difference between the corrected spectrum of order (n−1), or the measured spectrum, and the stack spectrum, wherein 1≦n≦Nit, n is an integer, and Nit corresponds to a number of iterations of said calculating.

5. The method according to claim 4, further comprising, iterated Nit times, with Nit≧1:
calculating, using processing circuitry, a mean stacking probability, as a function of a preceding corrected spectrum Spcor(n-1), or of the measured spectrum if there is no preceding corrected spectrum, and exposure time and dead time data;
estimating, using processing circuitry, the stack spectrum, as a function of the preceding corrected spectrum, or of the measured spectrum if there is no preceding corrected spectrum, and the exposure time; and
calculating, using processing circuitry, the corrected spectrum, using the difference between a preceding corrected spectrum or the measured spectrum, and the estimated stack spectrum.

6. The method according to claim 5, the mean stacking probability being calculated using formula:




  
    P
    mean
  
  =
  
    1
    -
    
      
        (
        
          1
          -
          
            2
            ×
            
              
                T
                dead
              
              
                T
                expo
              
            
          
        
        )
      
      
        
          ∑
          
            j
            =
            1
          
          
            N
            ⁢
            
              
            
            ⁢
            max
          
        
        ⁢
        
          
            Sp
            
              cor
              ⁡
              
                (
                
                  n
                  -
                  1
                
                )
              
            
          
          ⁡
          
            (
            j
            )
          
        
      
    
  



where Spcor(n-1)(j) is the value, for the channel j, of the preceding corrected spectrum SPcor(n-1), or of the measured spectrum if there is no preceding corrected spectrum.

7. The method according to claim 1, the stack spectrum being calculated using formula:




  
    Emp
    ⁢
    
      (
      k
      )
    
  
  =
  
    
      ∑
      
        i
        =
        1
      
      Nc
    
    ⁢
    
      
        ∑
        
          j
          =
          i
        
        Nc
      
      ⁢
      
        
          
            P
            
              i
              ,
              j
            
          
          ⁡
          
            (
            k
            )
          
        
        .

8. The method according to claim 7, wherein:




  
    
      P
      
        i
        ,
        j
      
    
    ⁡
    
      (
      k
      )
    
  
  =
  
    1
    -
    
      
        [
        
          1
          -
          
            2
            ×
            δ
            ⁢
            
              
            
            ⁢
            
              
                
                  t
                  
                    i
                    ,
                    j
                  
                
                ⁡
                
                  (
                  k
                  )
                
              
              /
              
                T
                expo
              
            
          
        
        ]
      
      
        
          
            Sp
            
              cor
              ⁡
              
                (
                
                  n
                  -
                  1
                
                )
              
            
          
          ⁡
          
            (
            
              E
              i
            
            )
          
        
        ×
        
          
            Sp
            
              cor
              
                (
                
                  n
                  -
                  1
                
                )
              
            
          
          ⁡
          
            (
            
              E
              j
            
            )
          
        
      
    
  



Spcor(n-1)(j) being the value, for the channel j, of the preceding corrected spectrum Spcor(n-1), or of the measured spectrum if there is no preceding corrected spectrum.

9. The method according to claim 1, δti,j(k) being determined from an inverse function of a stacking function FEi,Ej(Δt), the stacking function establishing a relationship between a temporal shift of two stacked interactions of energies Ei and Ej and the energy attributed to that stack.

10. The method according to claim 9, further comprising estimating the function FEi,Ej(Δt) by simulation or experimentally, or by a decreasing affine function of the energies Ei and Ej.

11. The method according to claim 1, the corrected spectrum being divided by a factor depending on a mean probability of the corrected spectrum, the mean probability being a stacking probability of an incident photon with at least one other photon.

12. A device for correcting a measured X radiation spectrum, comprising a number of channels Nc, each channel i corresponding to an energy range between Ei and Ei+ΔEi, comprising:
at least one processing circuit configured to:
determine a function δti,j(k), which defines a size of a temporal deviation Δt interval, such that two interactions with energy Ei and Ej temporally separated by Δt are stacked and considered to have a detected energy value Ek;
determine, from the function δti,j(k), a probability function Pi,j(k) that an event counted in a channel k corresponds to a stack of two interactions, respectively, of energies Ei and Ej;
calculate, from the probability function Pi,j(k), a stack spectrum, which is a part of the measured spectrum that corresponds only to the stack; and
adjust, using the processing circuitry, the measured spectrum based on a difference between the measured spectrum and the calculated stack spectrum thus forming at least a first corrected spectrum accounting for perturbations present in the measured spectrum due to a stacking phenomenon.

13. The device according to claim 12, the at least one processing circuit comprising at least one processor.

14. The device according to claim 12, the stack spectrum being calculated from the measured spectrum, exposure time, dead time data, and a minimum duration, separating two photons, below which there is stacking of the two photons and only one of the two photons is detected.

15. The device according to claim 14, wherein the at least one processing circuit is further configured to determine the dead time by simulation.

16. The device according to claim 12, wherein the at least one processing circuit is further configured to iteratively calculate Nit (Nit≧1) corrected spectrums, each iterative calculation being of a corrected spectrum of order (n) from a corrected spectrum of order (n−1) or from the measured spectrum if there is no preceding corrected spectrum of order (n−1), to use a calculated difference between the corrected spectrum of order (n−1), or the measured spectrum, and the stack spectrum, wherein 1≦n≦Nit, n is an integer, and Nit corresponds to a number of iterations of the calculation.

17. The device according to claim 16, wherein the at least one processing circuit is further configured to carry out the following steps, iterated Nit times, with Nit≧1:
calculate a mean stacking probability, as a function of a preceding corrected spectrum Spcor(n-1), or of the measured spectrum if there is no preceding corrected spectrum, and exposure time and dead time data;
estimate the stack spectrum, as a function of the preceding corrected spectrum, or of the measured spectrum if there is no preceding corrected spectrum, and the exposure time; and
calculate the corrected spectrum, using the difference between a preceding corrected spectrum or the measured spectrum, and the estimated stack spectrum.

18. The device according to claim 17, wherein the at least one processing circuit is further configured to calculate the mean stacking probability using formula:




  
    P
    mean
  
  =
  
    1
    -
    
      
        (
        
          1
          -
          
            2
            ×
            
              
                T
                dead
              
              
                T
                expo
              
            
          
        
        )
      
      
        
          ∑
          
            j
            =
            1
          
          
            N
            ⁢
            
              
            
            ⁢
            c
          
        
        ⁢
        
          
            Sp
            
              cor
              ⁡
              
                (
                
                  n
                  -
                  1
                
                )
              
            
          
          ⁡
          
            (
            j
            )
          
        
      
    
  



where SPcor(n-1)(j) is the value, for the channel j, of the preceding corrected spectrum SPcor(n-1), or of the measured spectrum if there is no preceding corrected spectrum.

19. The device according to claim 12, wherein the at least one processing circuit is further configured to calculate the stack spectrum using formula:




  
    Emp
    ⁢
    
      (
      k
      )
    
  
  =
  
    
      ∑
      
        i
        =
        1
      
      Nc
    
    ⁢
    
      
        ∑
        
          j
          =
          i
        
        Nc
      
      ⁢
      
        
          
            P
            
              i
              ,
              j
            
          
          ⁡
          
            (
            k
            )
          
        
        .

20. The device according to claim 19, wherein the at least one processing circuit is further configured to calculate the stack spectrum using the formula:




  
    Emp
    ⁢
    
      (
      k
      )
    
  
  =
  
    
      ∑
      
        i
        =
        1
      
      Nc
    
    ⁢
    
      
        ∑
        
          j
          =
          i
        
        Nc
      
      ⁢
      
        
          P
          
            i
            ,
            j
          
        
        ⁡
        
          (
          k
          )
        
      
    
  



with:





  
    
      P
      
        i
        ,
        j
      
    
    ⁡
    
      (
      k
      )
    
  
  =
  
    1
    -
    
      
        [
        
          1
          -
          
            2
            ×
            δ
            ⁢
            
              
            
            ⁢
            
              
                
                  t
                  
                    i
                    ,
                    j
                  
                
                ⁡
                
                  (
                  k
                  )
                
              
              /
              
                T
                expo
              
            
          
        
        ]
      
      
        
          
            Sp
            
              cor
              ⁡
              
                (
                
                  n
                  -
                  1
                
                )
              
            
          
          ⁡
          
            (
            
              E
              i
            
            )
          
        
        ×
        
          
            Sp
            
              cor
              
                (
                
                  n
                  -
                  1
                
                )
              
            
          
          ⁡
          
            (
            
              E
              j
            
            )
          
        
      
    
  



where Spcor(n-1)(j) is the value, for the channel j, of the preceding corrected spectrum SPcor(n-1), or of the measured spectrum if there is no preceding corrected spectrum.

21. The device according to claim 12, the function δti,j(k) being determined from an inverse function of a stacking function FEi,Ej(Δt), the stacking function associating a pair of photons with respective energies (Ei, Ej) with the energy measured as a function of a shift Δt between respective arrival moments of the pair of photons, such that:


δti,j(k)=FEiEj−1(Ek+1)−FEiEj−1(Ek).

22. The device according to claim 21, wherein the at least one processing circuit is further configured to estimate the function FEi,Ej(Δt) by simulation, the function FEi,Ej(Δt) being estimated by a decreasing affine function of the energies Ei and Ej.

23. A spectrometry device, comprising:
a radiation sensor;
an electronic processor configured to process signals coming from the sensor and to form a spectrum of a radiation having interacted with the sensor; and
a device for correcting a measured X radiation spectrum, comprising a number of channels Nc, each channel i corresponding to an energy range between Ei and Ei+ΔEi, comprising at least one processing circuit configured to:
determine a function δti,j(k), which defines a size of a temporal deviation Δt interval, such that two interactions with energy Ei and Ej temporally separated by Δt are stacked and considered to have a detected energy value Ek;
determine, from the function δti,j(k), a probability function Pi,j(k) that an event counted in a channel k corresponds to a stack of two interactions, respectively, of energies Ei and Ej;
calculate, from the probability function Pi,j(k), a stack spectrum, which is a part of the measured spectrum that corresponds only to the stack; and
adjust, using the processing circuitry, the measured spectrum based on a difference between the measured spectrum and the calculated stack spectrum thus forming at least a first corrected spectrum accounting for perturbations present in the measured spectrum due to a stacking phenomenon.