Improvements on a localized, automatic shimming method described by Gruetter and Boesch (J. Magn. Reson. 96, 323-334 (1992)) and Gruetter (Magn. Reson. Med. 29, 804-811 (1993)) are presented. A spin-echo sequence employing a double sech refocusing scheme is used to acquire a field map along linear projections that improves the signal-to-noise ratio by at least a factor of two over the stimulated echo sequence previously used. To further improve the reliability of shim adjustments, a variance-weighted polynomial regression analysis is performed. This also extends the scope of application of this technique to global shimming. Localized 1H spectra of human brain shimmed by this method are presented.