bug fix: loading tif mask
bug fix: metric of residual in selfcalibration