Added Pcal analysis to the main process