Current code runs in Notebook. Shift to use an organized set of functions in a package and clearly defined interfaces. 1. [x] Convert to basic Python script 2. [x] Refactor to functions 3. [x] Separate out calculation and plotting 4. [x] Write tests 5. [x] Ensure can be run from command-line or from other Python code with a analogous interface.