Focus stacking comes in handy when we need to combat the DOF ( Depth Of Field ) . We take a series of photographs and merge them to make a complete image .
Select file , automate and choose photomerge then uptick all the boxes at the bottom .
Always crop the blurred edge when the photomerge has completed and also select all layers by cmd shift . Then auto align all the layers and then auto blend the layers . Tick stack images and click OK.