flav-io / flavio

A Python package for flavour physics phenomenology in the Standard model and beyond
http://flav-io.github.io/
MIT License
71 stars 62 forks source link

avoid some interpolation artifacts in contour plots #37

Closed peterstangl closed 7 years ago

peterstangl commented 7 years ago

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.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.003%) to 90.658% when pulling 948aa137aceca1f3bc129a37689458faa434e3bb on peterstangl:avoid_interpolation_artifacts into 5fc6496fc7a910f3fd7aea6be6ca91377fde7627 on flav-io:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.003%) to 90.658% when pulling e30fa49001ed7a462a11438802d091039eb1c723 on peterstangl:avoid_interpolation_artifacts into 5fc6496fc7a910f3fd7aea6be6ca91377fde7627 on flav-io:master.

DavidMStraub commented 7 years ago

Very good. Can you please add a short comment to the source code explaining the reason for this "cutoff"?

DavidMStraub commented 7 years ago

Perfect.