On the spectroscopic determination of potential functions with a barrier for diatomic molecules