Attenuation is one of the main factors responsible for limiting resolution of the seismic method. It selectively damps the higher frequency components of the signal more strongly, causing the earth to work as a low-pass filter. This loss of high-frequency energy may be partially compensated by application of inverse filtering routines. However, such routines often increase the noise level of the data, thereby restricting their use. These filters also require a quality factor profile as an input parameter, which is rarely available. In recent years, alternative methods for stable inverse filtering have been presented in the literature, which makes it possible to correct the attenuation without introducing so much noise. In addition, new methods have been proposed to estimate the quality factor from seismic reflection data. We have developed a three-stage workflow oriented for attenuation correction in stacked sections. In the first stage, a trace-by-trace estimate of the quality factor is performed along the section. The second stage consists of preparing the data for attenuation compensation, which is performed via a special filtering strategy for efficient noise removal to avoid high-frequency noise bursts. The last stage is the application of a stable inverse filtering. As an example, we applied the proposed flow in a seismic section to compensate for the attenuation caused by shallow gas accumulation. Careful data preparation proved to be a key factor in achieving successful attenuation compensation.