Main program for calibrating with simulated data.