Aberration correction by maximizing generalized sharpness metrics | Synapse