Preparing position map for fixing SAM.