Lens magnification and focal length calculation