Added raw to event data conversion and subtraction functions