Methods, systems, and computer-readable medium to perform operations including: generating a first time-frequency spectrum of a first seismic trace from an original seismic dataset; generating a second time-frequency spectrum of a second seismic trace from an enhanced seismic dataset, where the second seismic trace; calculating a difference between the first time-frequency spectrum and the second time-frequency spectrum to generate a noise estimate in the first seismic trace; constructing, based on (i) the noise estimate, (ii) the first time-frequency spectrum, and (iii) the second time-frequency spectrum, a time-frequency mask (TFM); and using the constructed TFM to generate a third time-frequency spectrum of an output trace that corresponds to the first and second seismic traces.