astro bits

Warwick CSC stuff


  • Log into my machine (not the gateway machine godzilla) using x2go, instructions on CSC wiki here (use your CSC user/password).
  • Basic information on how to use the Linux OS here. Most important is how to use a terminal (i.e. the “Linux command line”).
  • To get stuff from github, copy the clone link and then do “git clone”

Machine choice

Don’t run stuff on godzilla (the machine you first connect to with x2go). If you’re working with me use; ssh to it in a terminal with “ssh -X”.

Loading CSC modules

When logging in to CSC machines, run the command below in a terminal to get access to python and some necessary modules. This will allow you to run a jupyter notebook too.

module load GCC/8.3.0  OpenMPI/3.1.4 Python/3.7.4 IPython/7.9.0-Python-3.7.4 matplotlib astropy

module load GCC/6.4.0-2.28 OpenMPI/2.1.1 Python/3.6.3 IPython/6.2.1-Python-3.6.3 matplotlib astropy

If you then type “module save”, you can restore the configuration next time with “module restore” (rather than pasting the whole command in each time).


If you need python modules that don’t exist in CSC, you can install these with something like “pip install –user kplr”. This puts them in a hidden folder in your home space.

Having loaded the modules, open a jupyter notebook by typing “jupyter notebook”. This will open a browser window with the jupyter file browser, use this to find and then run your notebook.

Installing galario

  • Import modules, e.g. module load GCC/8.3.0  OpenMPI/3.1.4 Python/3.7.4 FFTW/3.3.8 CMake/3.15.3 IPython/7.9.0-Python-3.7.4
  • Follow instructions here, including python binding
  • Find python site-packages, create galario directory, and copy contents of galario/build/python/galario (single, double, into it.
module load GCC/8.3.0  OpenMPI/3.1.4 Python/3.7.4 FFTW/3.3.8 CMake/3.15.3 IPython/7.9.0-Python-3.7.4
git clone
cd galario
mkdir build
cd build
cmake -DPython_ADDITIONAL_VERSIONS=3.7 ..
cp -r python/galario/* ~/.local/lib/python3.7/site-packages/galario/

These instructions seem to work on a Mac too, though I needed to remove the galario folder and start from scratch when upgrading the python version.

To use galario with emcee, set the number of galario threads to 1 with galario.double.threads(num=1). It won’t work otherwise.


Convert Gaussian \sigma to FWHM with FWHM = 2.35482 \, \sigma

The sky is 41252.961 square degrees, that’s 5.34638 \times 10^{11} square arcseconds or 2.35 \times 10^{-11} steradian per sq arcsecond.


When submitting a MNRAS paper to astro-ph, to make it look nice on US letter paper (rather than A4) you should use these at the top of your TeX file.




John Chambers’ web page with Mercury doesn’t work any more, but the code seems easy enough to find. There is a binary star version around too. If you get it make sure you implement the bug fix, I found that the binary star version wouldn’t work sensibly until I added it (would die when anything was ejected).


Watch out if you change the file in the standard download of swift, say for the number of test particles. The programs point to two different files, one in the root dir and one in the main dir (and another in the tools dir). You could change them both, I removed the one in the main dir and made a symbolic link.

If you try swift you’d be silly not to check out SwiftVis, very clever but make sure you allocate lots of memory with -Xmx2000M or something.