Measuring chromatic aberrations in imaging