Time and Location
Building a Python/C++ Package: Vision, Transformation, Documentation, Scale, Portability, and Tools
This is a story about an ongoing, unfunded personal post-retirement project.
Leonard Mosescu, in his talk last August ("Python Bindings for C++"), ably covered the core technology for persuading Python and C++ to play nicely together. I will address some of the same issues, but treat this project as a concrete case study, with messy issues beyond (and including) the binding tools (I’m using SWIG).
My starting point is SST, a monolithic C++ computer program that generates simulated underwater sound. I built SST over a 40-year career, with episodic help from a sequence of team members with various skill sets. The front end is my own parser, interpreting an incomplete "data description" language of my own invention. The underlying C++ classes are mostly well designed, mostly documented using Doxygen, but they bear the marks of a long and twisted evolution, and some mistakes. SST is reasonably well documented, and in use by a small community of very sophisticated users. It is useful but kinda hard to use.
My desired end point is a C++ library with a Python binding (a set of Python modules) designed to be integrated into multiple simulations focusing on specific applications of underwater sound. It should look familiar to my existing users, plus offer enough extra power and flexibility to wean them off of my language and onto Python, with tools to help on that journey. The project is far from finished — at best it’s a proof of concept.
Why did I take on this project, what should the end product look like to my users, and how can I get from here to there? I hope to both enlighten and enlist my audience, to help them think about these issues and to help me make the right decisions to move the project forward.
Robert Goddard Principal Physicist, Retired (but still active) University of Washington, Seattle
Robert Goddard is a physicist and software developer. He retired (sort of) in 2017 after 37 years at the UW Applied Physics Laboratory, working mainly on computer modeling of underwater sound. He is still the architect and team leader for the Sonar Simulation Toolset (SST), which produces simulated underwater sound, suitable as input to sophisticated signal processing systems (including human ears and brains), based on user-specified descriptions of the undersea environment, the listening system, and the sound sources and reflectors placed in this simulated ocean. He has also developed systems for data acquisition and analysis, visualization, modeling of quantum mechanical scattering, and using data to infer model parameters
A Word From Our Sponsor
Sorry no sponsor this month.