X-rays have a short wavelength and can cause ionization. They are used in medicine for diagnosis and treatment, but precautions must be taken when operating X-ray machines. Ultrasound uses high frequency sound waves above the human hearing range. The waves reflect off boundaries and the time of reflections can be used to determine distances between interfaces in different media. Lenses refract light to form images. A convex lens brings parallel rays to a focus at its principal focus, defined by the focal length. The nature of images depends on size, orientation, and whether real or virtual.