Method for determining photon arrival times (t1, t2) from an electric output signal of a photon detector, the method comprising the steps of: a) Acquiring an analog electric output signal from a photon detector, wherein the electric output signal comprises signal fluctuations originating from photon detection events; b) Sampling the electric output signal, such that a plurality of discrete signal values is generated from the electric output signal (11, 15); c) Determining a number of photon detection events and a photon arrival time (t1, t2) for each photon detection event for a sequence (18a, 18b, 18c) of the discrete signal values by providing the sequence (18a, 18b, 18c) of the discrete signal values to a machine learning method that is configured to determine the number of photon detection events and their associated photon arrival times (t1, t2) from the sequence (18a, 18b, 18c) of the discrete signal values, d) wherein the machine learning method comprises a plurality of artificial neural networks (20a, 20b, 20c, 20d), with a classifier in form of a first artificial neural network that is configured to determine the number of photon detection events from the sequence (18a, 18b, 18c) of the discrete signal values, wherein the number of photon detection events is an integer non-negative number N, and with a plurality of photon arrival time estimators (20b, 20c, 20d) in form of artificial neural networks, wherein each photon arrival time estimator (20b, 20c, 20d) is configured and trained to determine a different number (N1, N2, N3) of photon arrival times (t1, t2, t3) from the sequence (18a, 18b, 18c) of the discrete signal values, wherein the photon arrival time estimator (20b, 20c, 20d) that is trained for the determination of N photon arrival times (t1, t2, t3) N being the number of photon detection events determined by the classifier, is provided with the sequence (18a, 18b, 18c) of the discrete signal values and determines N photon arrival times (t1, t2, t3) from the sequence (18a, 18b, 18c) of the discrete signal values. a) Acquiring an analog electric output signal from a photon detector, wherein the electric output signal comprises signal fluctuations originating from photon detection events; b) Sampling the electric output signal, such that a plurality of discrete signal values is generated from the electric output signal (11, 15); c) Determining a number of photon detection events and a photon arrival time (t1, t2) for each photon detection event for a sequence (18a, 18b, 18c) of the discrete signal values by providing the sequence (18a, 18b, 18c) of the discrete signal values to a machine learning method that is configured to determine the number of photon detection events and their associated photon arrival times (t1, t2) from the sequence (18a, 18b, 18c) of the discrete signal values, d) wherein the machine learning method comprises a plurality of artificial neural networks (20a, 20b, 20c, 20d), with a classifier in form of a first artificial neural network that is configured to determine the number of photon detection events from the sequence (18a, 18b, 18c) of the discrete signal values, wherein the number of photon detection events is an integer non-negative number N, and with a plurality of photon arrival time estimators (20b, 20c, 20d) in form of artificial neural networks, wherein each photon arrival time estimator (20b, 20c, 20d) is configured and trained to determine a different number (N1, N2, N3) of photon arrival times (t1, t2, t3) from the sequence (18a, 18b, 18c) of the discrete signal values, wherein the photon arrival time estimator (20b, 20c, 20d) that is trained for the determination of N photon arrival times (t1, t2, t3) N being the number of photon detection events determined by the classifier, is provided with the sequence (18a, 18b, 18c) of the discrete signal values and determines N photon arrival times (t1, t2, t3) from the sequence (18a, 18b, 18c) of the discrete signal values. with a classifier in form of a first artificial neural network that is configured to determine the number of photon detection events from the sequence (18a, 18b, 18c) of the discrete signal values, wherein the number of photon detection events is an integer non-negative number N, and with a plurality of photon arrival time estimators (20b, 20c, 20d) in form of artificial neural networks, wherein each photon arrival time estimator (20b, 20c, 20d) is configured and trained to determine a different number (N1, N2, N3) of photon arrival times (t1, t2, t3) from the sequence (18a, 18b, 18c) of the discrete signal values, wherein the photon arrival time estimator (20b, 20c, 20d) that is trained for the determination of N photon arrival times (t1, t2, t3) N being the number of photon detection events determined by the classifier, is provided with the sequence (18a, 18b, 18c) of the discrete signal values and determines N photon arrival times (t1, t2, t3) from the sequence (18a, 18b, 18c) of the discrete signal values.