Separation and imaging of seismic diffractions using a localized rank-reduction method with adaptively selected ranks