  Modern photon counting pixel detectors enabled a revolution in applications
at synchrotron light sources and beyond in the last decade. One of the
limitations of current detectors is reduced counting linearity or even
paralysis at high counting rates, due to dead-time which results in photon
pile-up. Existing dead-time and pile-up models fail to reproduce the complexity
of dead-time effects on photon counting, resulting in empirical calibrations
for particular detectors at best, imprecise linearization methods, or no
linearization. This problem will increase in the future as many synchrotron
light sources plan significant brilliance upgrades and free-electron lasers
plan moving to a quasi-continuous operation mode. We present here the first
models that use the actual behavior of the analog pre-amplifiers in
spectroscopic photon counting pixel detectors with constant current discharge
(e.g., Medipix family of detectors) to deduce more accurate analytical models
and optimal linearization methods. In particular, for detectors with at least
two counters per pixel, we completely eliminate the need of calibration, or
previous knowledge of the detector and beam parameters (dead-time, integration
time, large sets of synchrotron filling patterns). This is summarized in
several models with increasing complexity and accuracy. Finally, we present a
general empirical approach applicable to any particular cases where the
analytical approach is not sufficiently precise.
