First commit of fitting code in resonator.py and khalil.py