"coarse-fine" function did not work when start the script from a terminal. It seems fine starting from Spyder.