Added recalculation after Z flip

This was added to prevent the choice of BG vs SG channel being made on
data from the wrong surface if sample is Z flipped.