Added support for calculating the focus variance (and adding it to the header)