Fix some docstring
Use same variable names in calc_bg() and recompute_bg_lim_ph_p()
Round nperiods to be the same for all the ch and discard periods < 0.1s
Plots: simplify the hist_S function