Detector discrimination in ion microscopic images: characterization and correction