Calculating beam extinction in a pulsed proton beam using FPGA-based peak detection | Synapse