The ternary semiconductor alloy Al0.25Ga0.75N has been analyzed by means of correlated photoluminescence spectroscopy and atom probe tomography (APT). We find that the composition measured by APT is strongly dependent on the surface electric field, leading to erroneous measurements of the alloy composition at high field, due to the different evaporation behaviors of Al and Ga atoms. After showing how a biased measurement of the alloy content leads to inaccurate predictions on the optical properties of the material, we develop a correction procedure which yields consistent transition and localization energies for the alloy photoluminescence. (C) 2016 AIP Publishing LLC.