made modifications to handle keeping the uncorrected (pixel phase) flux as well