Corrected pixel map function