Counting‐loss correction for X‐ray spectroscopy using unit impulse pulse shaping. (19th February 2018)