astro bits

Warwick CSC stuff

Basics

• 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 https://github.com/someone/repo_link.git”

Machine choice

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

When logging in to CSC machines, run this in a terminal to get access to python and some necessary modules. If you then type “module save”, you can restore the configuration next time with “module restore”.

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

Python

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”.

Installing galario

• Import modules, need at least GCCcore/6.4.0, OpenMPI/2.1.1, FFTW/3.3.6, CMake/3.9.5
• Follow instructions here, including python binding
• Find python site-packages, create galario directory, and copy contents of galario/build/python/galario (single, double, __init__.py) into it.

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

Conversions

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.

astro-ph

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.

\documentclass[usenatbib,letterpaper]{mn2e}
\usepackage[totalwidth=480pt,totalheight=680pt,layoutvoffset=0.5cm]{geometry}

Codes

Mercury

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).

Swift

Watch out if you change the swift.inc file in the standard download of swift, say for the number of test particles. The programs point to two different swift.inc 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.