%%timeit

calc_gamma(
    coords, dose_ref,
    coords, dose_eval,
    0.1, 0.03, lower_dose_cutoff=0.2, 
    maximum_test_distance=0.2, num_threads=1)

%%timeit

calc_gamma(
    coords, dose_ref,
    coords, dose_eval,
    0.1, 0.03, lower_dose_cutoff=0.2, 
    maximum_test_distance=0.2, num_threads=2)

%%timeit

calc_gamma(
    coords, dose_ref,
    coords, dose_eval,
    0.1, 0.03, lower_dose_cutoff=0.2, 
    maximum_test_distance=0.2, num_threads=3)

%%timeit

calc_gamma(
    coords, dose_ref,
    coords, dose_eval,
    0.1, 0.03, lower_dose_cutoff=0.2, 
    maximum_test_distance=0.2, num_threads=4)

"""
Explanation: On a 4 core computer using more threads improves calculation speed
End of explanation
"""


%%timeit

calc_gamma(
    coords, dose_ref,
    coords, dose_eval,
    0.1, 0.03, lower_dose_cutoff=0.2, 
    maximum_test_distance=0.2, num_threads=5)

%%timeit

calc_gamma(
    coords, dose_ref,
    coords, dose_eval,
    0.1, 0.03, lower_dose_cutoff=0.2, 
    maximum_test_distance=0.2, num_threads=10)

"""
Explanation: When more threads than is available is used the calculation time is longer
End of explanation
"""


