Code used for analysis of TwoPhoton data