  We develop a photon energy measurement scheme for single photon counting
Microwave Kinetic Inductance Detectors (MKIDs) that uses principal component
analysis (PCA) to measure the energy of an incident photon from the signal
("photon pulse") generated by the detector. PCA can be used to characterize a
photon pulse using an arbitrarily large number of features and therefore
PCA-based energy measurement does not rely on the assumption of an
energy-independent pulse shape that is made in standard filtering techniques. A
PCA-based method for energy measurement is especially useful in applications
where the detector is operating near its saturation energy and pulse shape
varies strongly with photon energy. It has been shown previously that PCA using
two principal components can be used as an energy-measurement scheme. We extend
upon these ideas and develop a method for measuring the energies of photons by
characterizing their pulse shapes using any number of principal components and
any number of calibration energies. Applying this technique with 50 principal
components, we show improvements to a previously-reported energy resolution for
Thermal Kinetic Inductance Detectors (TKIDs) from 75 eV to 43 eV at 5.9 keV. We
also apply this technique with 50 principal components to data from an optical
to near-IR MKID and achieve energy resolutions that are consistent with the
best results from existing analysis techniques.
