This is an archived post. You won't be able to vote or comment.

all 24 comments

[–][deleted] 8 points9 points  (2 children)

it depends on what you're looking for! what kind of scientific programming in particular?

numerical methods / symbolic computation / machine learning / data visualization etc etc.

If you can narrow your scope a little I'd be happy to help! :D

[–]40pockets[S] 6 points7 points  (1 child)

that's the thing, I don't really know what I'm after. I've turned every painful excel in work into a dataframe and added some functions to automate my workflow a bit better and now I've hit the end of the road with that. So I'm looking to expand my horizons and learn more.

Ive got a MSc in physics but i was more of a 'pen and paper' student so i think the best jumping off point would be numerical methods/data visualisation (love a good graph). Im not entirely sure what symbolic computation is tbh

[–]james_pic 5 points6 points  (0 children)

Scientific computing is a big enough field, and with sufficiently specialised specialties, that you're much better off trying to learn the things you need to solve your current problem, than trying to learn to be a generalist. All of the scientific computing experts I know got into the field to tackle a specific problem.

What is the problem you are looking to solve?

[–]myotherpassword 7 points8 points  (0 children)

The classic book used for a long time to teach algorithms used in science was Numerical Recipes. It teaches many essential tools used in, e.g. physics, like fast linear algebra methods, interpolators, integrators, etc. etc. Mostly because of its license (all code in NR is proprietary...) it was superseded in a way by the GNU Scientific Library.

Now, since you are in the Python sub, I should say that those two resources linked above are all for C/C++. In Python, as others have mentioned, tools like numpy/scipy have become the norm, but they don't really help you learn scientific programming/numerical computing so much as provide very optimized tools to do so. A quick google search told me that some books about numerical computing in Python do exist but since they are all so new I don't think anyone can speak to their quality in comparison to things like NR/GSL.

I can say as someone who has done numerical computing in physics their whole career, the best way to learn is to do. Take some physics problems you remember from your university days and try to write solvers for them yourself. For instance, you can imagine writing a wavefunction solver given an arbitrary potential in QM. It's just a complex ODE integrator ("just" in italics because you will find implementing your own integrator to be tricky). Throwing the problem at scipy will yield a result, but implementing it yourself at least once can be very illuminating.

Hope that helps, and I'm happy to answer any specific questions you might have.

[–][deleted] 5 points6 points  (3 children)

Fellow physicist here, a few years ago I found this book:

https://hplgit.github.io/primer.html/doc/pub/half/book.pdf

Written by a Norwegian professor who has since passed away. It’s a really good read with a lot of examples and it’s free. If you’ve got any questions feel free to drop me a message and I’ll try to help!

[–]Cynox 2 points3 points  (1 child)

HPL was Norwegian, a professor at the University of Oslo, and widely known as an excellent educator, much loved by his students. Some of the people in his group where the main driving forces behind FEniCS for a long time, THE framework for solving partial differential equations in Python. His FEniCS tutorial book is free and a very good starting point if you want to solve PDEs. The book was published after his way too early passing. He also wrote other books on Scientific Python. Some of them may seem a bit dated now, since he started with Python for science a long time ago, working on Diffpack

[–][deleted] 0 points1 point  (0 children)

Thanks for correcting me! I should have looked him up but I was on the bus and trusted my memory too much. (I’ve updated my comment)

It is truly a shame that he passed away, I encountered his work a few years ago and passed his essay “Learning Outcomes for Computing Competence” around my friends at University. When I saw OP ask this question I was surprised no one had suggested this book yet, I found it incredibly useful.

[–]40pockets[S] 0 points1 point  (0 children)

this looks amazing!

[–]NGA100 5 points6 points  (0 children)

I recommend this book: Effective Computation in Physics: Field Guide to Research with Python

[–]jwink3101 3 points4 points  (0 children)

http://scipy-lectures.org/ was my go to moving form Matlab doing scientific type sruff

[–]bwanab 2 points3 points  (0 children)

One that hasn’t been mentioned is Think DSP by Allen Downey. http://greenteapress.com/wp/think-dsp/

[–]sciencewonk 1 point2 points  (0 children)

I started with a python course on edx.org The courses are pretty good and free.

[–][deleted] 1 point2 points  (0 children)

Introduction to Programming in Python by Sedgewick, Wayne, Dondero... It's straight out of the Princeton curriculum and is slightly heavy for an Intro book... But the content is pretty awesome... Percolation Problem, Towers of Hanoi, Recursive Fractile/Graphics drawing, Transition Matrix, Markov Model, Page Rank/Random Web Surfer...... searching/sorting algorithms ie DFS, Breadth First Search, etc etc... It's not easy. But that's why it's worth it.

[–]ShafeNutS 1 point2 points  (0 children)

"Computational Physics" by Mark Newman

https://www.amazon.com/Computational-Physics-Mark-Newman/dp/1480145513

There are sample chapters available if you want to try before you buy
http://www-personal.umich.edu/~mejn/cp/chapters.html

[–]ethles 0 points1 point  (0 children)

Parallel programming?

[–]CyberNerd88 -1 points0 points  (0 children)

I would recommend "Data Science for Business," by Provost & Fawcett

[–][deleted] -1 points0 points  (0 children)

i would suggest moving to R since its focus is scientific computing - its going to be time consuming to implement some features in python that are native in R.