As mentioned in the beginning, the purpose of this project was to eliminate discontinuities which arose from using the pairwise orthogonal transform. In the previous post we saw how we can have strong variations of the rotation parameter. One approach at solving the discontinuity problem would be to 'smoothen' this parameter. A simple way of doing this is with the formula tNew = 0.875 * tPrev + 0.125 * tCurrent. In this formula we see that the new value for the rotation parameter is biased mostly towards the previous value thus decreasing large variations.
Let's see some comparative images. First without any smoothening:
We've seen this before. The left-most image is the original, the middle image is after applying POT and BIFR (non optimal rate allocation) and the right-most is after applying POT and waterfill. The discontinuities are clearly visible.
Now we have a look at how things improve by using the previous formula:
It's somewhat better, but the discontinuities are still very much there. "VERT" comes from vertical, because the smoothening is vertical, that is the rotation parameters are smoothened according to previous values from the same band.
Notice the variation of the t parameter after smoothing:
In this case the images look like this:
Even better, but we still have discontinuities. And what about the t parameter?
There is still one thing to be fixed in this case and that is an anomaly which can be seen in the image, discontinuities which appear in the northern part. They seem to have appeared after adapting the formula to take into account t's periodicity.
Correcting this shouldn't be a problem.
What comes next is to incorporate the metrics computations into the POT software and adjust the smoothing method accordingly. For now, the formula is fixed/constant. In terms of implementation, the correction can be easily achieved by having a class which specifically handles this sort of things and passing along a references of an instance of this class to all other methods.