# How to filter data with the appearance of a Sine wave to 'flattern' the peaks

Hi, please take a look at this image.

I have some data in a Sine wave-like curve (1). I'm looking for a way I can transform / filter the data to 'flatten' the peaks so it looks something closer to (2).

I only know High-School level maths, so if necessary I'd appreciate if the answer were as digestable as possible.

Extra side question:
I encounter many problems of this nature, i.e. I have data that appears as a curve, and I want to transform it's shape in some way. I'd love to teach myself how to tackle these problems but I don't know where to start. What field is this kind of maths, what would be a good starting point to read into?

Thanks a lot!

• Low bounty!

• What do you reckon should it be? I'm not trying to be stingy, I just don't know how hard of a problem it actually is to be honest :)

• To prepare a page or two response to explain details for you, it can take about an hour or so. So, a fair bounty is $20-$30.