Characterization and training of a 19-element piezoelectric deformable mirror for lensing