functions for halo masking moved to backgroundCorrection.cpp, makes more sense to have these functions there.