Developing Scientific Software

<p>In this article we will follow the tenets of TDD for developing Scientific Software as laid out in&nbsp;<a href="https://medium.com/@cdacostaf/developing-of-scientific-software-c8e89f6ade7" rel="noopener">the first installment of this series</a>&nbsp;to develop an edge detection filter known as the Sobel filter.</p> <p>In the first article, we talked about how important &mdash; and tricky &mdash; it can be to develop reliable testing methods for software which the complex problems often found in scientific software. We also saw how to overcome those issues by following a development cycle inspired by TDD, but adapted for scientific computing. I reproduce a shortened version of these instructions below.</p> <h2>Implementation cycle</h2> <ol> <li>Gather requirements</li> <li>Sketch the design</li> <li>Implement initial tests</li> <li>Implement your alpha version</li> <li>Build an oracle library</li> <li>Revisit tests</li> <li>Implement profiling</li> </ol> <h2>Optimization cycle</h2> <ol> <li>Optimize</li> <li>Reimplement</li> </ol> <h2>New method cycle</h2> <ol> <li>Implement new method</li> <li>Validate against previous curated oracles</li> </ol> <h1>Getting Started: The Sobel Filter</h1> <p>In this article, we will follow the above instructions to develop a function which applies the&nbsp;<a href="https://en.wikipedia.org/wiki/Sobel_operator" rel="noopener ugc nofollow" target="_blank">Sobel filter</a>. The Sobel filter is a commonly used computer vision tool to detect or enhance edges in images. Keep reading to see some examples!</p> <p><a href="https://towardsdatascience.com/developing-scientific-software-d023a96188a3">Website</a></p>