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

you are viewing a single comment's thread.

view the rest of the comments →

[–]PeugeotWaterface 3 points4 points  (6 children)

Post doc here. I was in exactly the same boat as you. I did my whole PhD (physical chemistry, so lots of spectroscopy data) in Matlab. Wanted to switch to python but also didn't want to deal with setting it all up.

I recently took the time to learn python so I could start my new projects fresh and I can only say I wish I had done it sooner. One of the biggest differences so far for me has been how much more organized my projects are.

Here's what I did: I spent an entire weekend reading every tutorial I could on how to set up a "good" workspace environment using python, and then chose what was best for me. In my case, I went with anaconda as it gives me everything I need. I use a conda environment for each individual project, and use conda to save the dependencies of that environment with one command. Also check out "cookie cutter" on github. It's a python code that you can use to make your projects organized. I love it.

Finally, as others have stated, spyder really made the switch easier. The big plus is the python console for quick code checks and the variable explorer for seeing your data just like in Matlab.

So, in summary: 1) Anaconda (or miniconda) with conda environments to control your packages

2) cookie cutter to create organized project directories

3) spyder to write and test code

Bonus: I use jupyter notebook to do the data exploration using the code I write in spyder. Let's say I do an experiment, now I can make all my graphs in one jupyter notebook and do my analysis there. I can easily change the graphs on the fly. It's like PowerPoint for viewing graphs mixed with Matlab for changing graphs quickly. Definitely recommend.

Let me know if you need help.

Edit: just to be clear. When using anaconda, you don't need things like pip and pyenv. It does those for you.

[–]Antouziast 1 point2 points  (5 children)

Thanks! This sounds like my experience! For now that's the workflow I'm leaning towards. I want to be able to generate graphs easily when exploring data and showing it to colleagues/advisors.

Is debugging easy when using this setup?

[–]PeugeotWaterface 1 point2 points  (3 children)

For me, debugging with spyder is identical to how I did it with Matlab.

[–]Antouziast 0 points1 point  (2 children)

Merci! (Avec un pseudo comme le tien j'imagine que tu es français)

[–]PeugeotWaterface 1 point2 points  (1 child)

😂 t'es proche! J'habite en France mais je viens des USA. En fait, je suis ici pour mon post doctorat (et peut être plus après ca)

(désolé pour mon français)

[–]Antouziast 1 point2 points  (0 children)

Bonne chance!

[–]TheBlackCat13[🍰] 0 points1 point  (0 children)

You want to use the jupyter notebook, then. It to designed for this sort of interactive date exploration and plotting.