Computing in physics¶
Despite needing to some particular tasks with an astonishing degree of regularity, it can often be the case that one forgets how exactly to do something. Whilst this is an excellent example of why one would want to have excellent documentation, it is also a delightful utility to have a collection of high-utility snippets of code laid out in a navigable manner, which is precisely the goal of this page.
Introduction¶
The content here is specifically for tasks to be performed in python
. Details of what exactly is python
can be found elsewhere, this page is dedicated to making it go. It is hoped that the content will run the full gamut, from "my first python code" to tasks that are common in fully hardcore programs. All code snippets as they appear here can be found in a more usable forms, both as interactive notebooks as executed on our cloud server Jove and Github repository for your viewing pleasure.
Content under development
The content on this page is under active development, so caution should be taken accordingly. In the long term, it is envisaged that useful functions might be packed up and distributed as a library for physics; however, this is a long way off. At the moment, the page is little more than a list of things people requested help doing in the past.
First steps¶
Common tasks¶
- Peak finding
- Peak fitting
- Resampling with pandas (see pico usage note)
- Weighted least squares fitting
- Numerical integration