Best Research Documentation Habit for Computational Physics Research I am currently doing research in a subset of the field of gravitational lensing called weak lensing. I am simulating blended galaxy profiles and creating an algorithm to extract the true parameters I created my image with. I am then assessing the accuracy of my algorithm. 
Since this is my first venture in creating code modules, specifically in python, I am wondering how other researchers have used resources to create the best kind of documentation for work that is fundamentally computational, not experimental. 
For example, do I put all my work in a Google logbook? Or do I use Ipython notebook to generate PDF's? I've had a tremendously hard time finding suitable materials.
 A: If you are using Python then I would recommend Sphinx and git.  Check your code into git so you have a history of your work and use Sphinx to generate the documentation off your code.  This is a common combination and should meet most of your documentation needs. 
A: I think this question is primarily opinion based.  Different people keep different systems, but I'll share my system.
To start, version control is absolutely essential.  I recommend git.  Here are some nice resources:


*

*Git for Scientists - an overview aimed at scientists

*Atlassian Git tutorials - a nice overview and discussion of different strategies for using git.

*Try Git - A browser based tutorial that actually has you issuing git commands, this has been useful for our new group members.


In general, I tend to believe git is used best if you commit early and often, and in particular if you branch early and often.
As for python resources in general, I can't help but recommend:


*

*Scientific Python Lectures - Nice overview of python for scientific audiences and the larger python ecosystem (numpy, scipy, matplotlib, etc)

*Scipy-lectures - an absolutely fabulous set of resources on the scipy ecosystem.  Very handy resource

*anaconda - a scientific python distribution that contains all of the useful packages in one install.  If you have an academic email, be sure to apply for the free academic license and the accelerate package which will give you scipy/numpy properly linked against intel mkl so that it is fast.

*enthought canopy - another scientific python distribution with academic licenses

*python(xy) - yet another scientific distribution


Back to the question at hand.  For the most part, when I am working on a project, I keep a directory tree that looks like:
project/
├── .git/ - I use git for version control
├── code/ - where my main code lives
├── data/ - where my data files live, this is not checked into version control
├── scripts/ - contains scripts to generate my outputs, figures
├── output/ - holds my generated figures and results
├── Makefile - used to build notes, and save parameter choices for scripts
└── notes/ - contains markdown notes

I use as a template for my .gitignore, the Python.gitignore in the gitignore repository, but I additionally ignore the data/ folder as I don't want to check in large files.  I instead aim to make my data reproducible from my scripts.  Not only does this keep my git repo small and fast by not checking in large data files, but it keeps me honest, ensuring that my results are themselves generated by scripts that are checked into the repository.
For notes/ I tend to use a mix of ipython notebooks with healthy markdown sections explaining things and demonstrating code, and plenty of MathJax equations.  Additionally I keep some small markdown files that contain derivations and notes on literature I read, with lots of LaTeX sprinkled in for equations.  I would just use LaTeX files themselves, but I found the start up associated with creating a new one a bit high, which meant didn't take as many notes as I'd like.  Markdown on the other hand is simple to write, which prevents any excuse for not taking notes.  I use pandoc to convert these markdown files to nice readable pdfs with equations or html pages.  I automate this in my Makefile, as well as rules for generating figures or certain results once I've figured something out.  For the notes bit, I have part of the Makefile look like this:
MDS := $(wildcard notes/*.md)
    NBS := $(wildcard notes/*.ipynb)
MDHTMLS := $(patsubst notes/%.md,notes/html/%.html,$(MDS))
NBHTMLS := $(patsubst notes/%.ipynb,notes/html/%.html,$(NBS))

notes: $(MDHTMLS) $(NBHTMLS)

.PHONY: serve cleannotes
serve:
        cd notes/html && python -m SimpleHTTPServer
cleannotes:
        rm -rf notes/html

notes/html/%.html: notes/%.md notes/html
        pandoc -s -c markdown.css --mathjax="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML" --standalone -o $@ $< 
notes/html/%.html: notes/%.ipynb notes/html
        ipython nbconvert --to html --output $(basename $@) $< 
notes/html:
        mkdir -p notes/html

This enables me to use make notes to build my notes, and make serve to serve them up at http://localhost:8000/
Additionally, to be explicit, I also add lines to by Makefile specifying particular arguments I give to my scripts or other scripts in order to generate or manipulate my data.  i.e.:
output/swirl.dat: scripts/simulation.py
    python $< -N 1000 -a 10 -v --otherparam 1.324 > $@

So that I can clearly see how I generated my outputs and automatically regenerate them if I make changes to the scripts.
Again, as I say, this is just my opinion, but it has worked well for me so far.
