R/calculate_intensity.R: re-ordered the functions in a more logical order

Signed-off-by: Charles Joly Beauparlant <Charles.Joly-Beauparlant@crchul.ulaval.ca>