A novel algorithm, based on a proper orthogonal decomposition and incorporating inequality constraints, is proposed to map out the different phases of a heterogenous material and simultaneously yield missing diffraction spectral information. An experimental case study of a three-phase NiTi shape-memory alloy under tensile loading illustrates the presented methodology.