updated flatfield to remove gain.