Coding resources

One of the first personal computers. Photo from the Wikimedia Commons.


This page lists scientific coding resources, covering text editors, version control, Mac package managers, Python and Jupyter notebooks, bash(/shell) scripting, and X-ray data analysis. Please let me know if any links are outdated or if your favourite resource isn’t on here!

Text Editors

The Top 5 Text Editors, according to Lifehacker
Free text editor roundup from How-To Geek
Comparison of text editors on Wikipedia
vi (the most basic/simple)
Vim (VI iMproved)
Emacs (warning: the inventor of emacs has serious carpal tunnel syndrome, and the emacs key bindings are partly to blame)
Aquamacs (emacs-based, Mac only)
TextWrangler (my favourite, Mac only; allows for vertical selection of columns by holding down the alt key)
pyCharm (specifically for Python, but has other language plugins)

Git: Version Control Software

About Version Control and Git on AstroBetter
GitHub is one of the very popular implementations of the git version control system:
GitHub homepage
A Beginner’s Guide to GitHub
My GitHub page!

Package Managers

**Note: Only use one of these!!**
Homebrew (most recommend)
MacPorts (second recommended)
Fink (also an option)

Python

Anaconda distribution and packages
Note that Anaconda python does *not* play well with PyXspec.
Anaconda QuickStart Guide (downloadable pdf)

Learning

*You should start learning Python 3 if you’re new.*
Learn Python the Hard Way
Stack Overflow for Q&A/search
AstroBetter python posts

Documentation

Python 4 Astronomers
NumPy and SciPy
AstroPy
Astroquery, for querying astronomical databases

Jupyter and iPython notebooks

Anaconda comes with iPython installed!
iPython Homepage and about interactive computing in Python
Project Jupyter blog, an evolution of iPython for interactive computing in different languages
Tutorial from OpenTechSchool
Tutorial from Safari Books Online (Note: start at “Using the Notebook” — iPython comes as part of Anaconda, so you’ve already got it!)
Notebook viewer — can view Jupyter and iPython notebooks from GitHub, e.g., but GitHub now has notebook viewing integrated in it (as of July 2015)

Bash Scripting

It’s a good idea to use bash, the bourne-again shell, rather than c-shell, tc-shell, or any of the others. It seems to have the most support and is the most widely-used.
Command Line Absolute Basics from Lifehacker
Command Line Crash Course (from Learn Python the Hard Way)
Bash Programming – Introduction HowTo
Bash Guide for Beginners
Bash Shell Scripting Wikibook
Advanced Bash Scripting Guide

X-ray Data Analysis

HEASOFT main page
HEASOFT Install Instructions (Note: Use the full source code, not a pre-compiled binary.)
FTOOLS Task Summary (don’t re-invent the wheel!)
Installing CALDB, the calibration database

RXTE

Getting Started Guide
The RXTE Cook Book: Recipes for Data Analysis and Reduction
Browse the RXTE Archives (or data from any NASA mission)

XMM-Newton

Scientific Analysis System (SAS) homepage: The SAS data analysis threads are very useful!
(I haven’t worked with XMM yet so I don’t have more resources to list right now)

XSPEC

Full XSPEC Manual
Tutorial: Fitting Models to Data
PyXspec: Quick Tutorial (Note: PyXspec doesn’t play well with the Anaconda distribution of python.)
The QDP/PLT User’s Guide (‘Introduction’ and ‘Basics’ are useful for new users)

Interactive Spectral Interpretation System (ISIS)

Installation instructions from the 2nd Black Hole school
Loving ISIS: Confessions of a Former XSPEC User by M. Nowak

Other

The AstroBetter wiki
Program and materials from 2nd Black Hole school
Program and materials from 1st Black Hole school
Presentations from Black Hole Variability 2010
OS X Astro Tricks: Tips and bug “fixes” for running astronomy-releated software on OS X
J. Foster’s Notes on installing python and astronomy-related software on macs.

Leave a Reply