add mcmc code that save results in fits formats.