Rough EpR automatic fitting by template selection