If data for which the contours are to be plotted contains very high and
sharp peaks (or other sharp transitions), ringing artifacts appear from
interpolating with splines of order 2 or higher. The ringing might even
yield negative values for purely positive data. This commit avoids these
effects by limiting the z-values to a maximum of twice the largest value
in the levels array and thus effectively cutting off high peaks.
Coverage increased (+0.003%) to 90.658% when pulling 948aa137aceca1f3bc129a37689458faa434e3bb on peterstangl:avoid_interpolation_artifacts into 5fc6496fc7a910f3fd7aea6be6ca91377fde7627 on flav-io:master.
Coverage increased (+0.003%) to 90.658% when pulling e30fa49001ed7a462a11438802d091039eb1c723 on peterstangl:avoid_interpolation_artifacts into 5fc6496fc7a910f3fd7aea6be6ca91377fde7627 on flav-io:master.
If data for which the contours are to be plotted contains very high and sharp peaks (or other sharp transitions), ringing artifacts appear from interpolating with splines of order 2 or higher. The ringing might even yield negative values for purely positive data. This commit avoids these effects by limiting the z-values to a maximum of twice the largest value in the levels array and thus effectively cutting off high peaks.