Focus position and full width at half maximum (FWHM) focus size versus X-ray photon energy. The error ranges for the defocus amount and the in-plane shift were calculated based on the +-Rayleigh range and +- FWHM focus size, respectively. The knife-edge scanning and ptychography methods both reveal that the increased photon energy condensed soft X-rays into a smaller focus spot.