Work on calc_cape function, included mytools