Phase-only liquid-crystal spatial light modulators provide a powerful means of wavefront control. With high resolution and diffractive (modulo 2pi) operation, they can accurately represent large-dynamic-range phase maps. As a result, they provide an excellent means of producing electrically controllable, dynamic, and repeatable aberrations. However, proper calibration is critical to achieving accurate phase maps. Several calibration methods from previous literature were considered. With simplicity and accuracy in mind, we selected one method for each type of necessary calibration. We augmented one of the selected methods with a new step that improves its accuracy. After calibrating our spatial light modulator with our preferred methods, we evaluated its ability to produce aberrations in the laboratory. We studied Zernike polynomial aberrations using interferometry and Fourier-transform-plane images, and atmospheric aberrations using a Shack-Hartmann wavefront sensor. These measurements show the closest agreement with theoretical expectations that we have seen to date.