I have some data I need to do a bit of analysis on but I am having trouble getting it in the correct form. I have attached a fig for your viewing pleasure.
As you can see I have two set of data, one is beautiful (relatively smooth and continuous in red) the other is all over the place. The spikes you see are do to gap fills and I am not sure why it behaves this way but it seems that these "gap-fills" are interpolated data but scaled up. I need to connect the higher "gap-fills" with the lower values but I am not sure how to go about it. I have tried a few things but nothing is working as well as I'd like. First I got rid of the spikes and replaced them with NaN's then interpolated those gaps but it was not what I needed. Any help is appreciated! Thanks!