Add tree experiment script
Converting script from shell to python, work in progress