Some scripts and code that might help others

This page will contain the source code to some of my scripts and projects. These are all very simple but may be convenient for somebody else.

APLpy plotting functions

The APLpy python package produces publication grade images of fits file but setting up a plot may need a lot of lines of codes. There also is no option to plot channel maps like the one below in a simple way. Therefore, I wrote a python package of wrapper function for four often used tasks: plotting channel maps, grids of plots, pV diagrams and just a simple figure to get an impression of the dataset.

Source code and more information on Github: aplpy_plotting by GiantMolecularCloud

Easy APLpy

Easy APLpy is a plotting package to get plots of astronomical images in a quick and easy way but retain all the detailed customization options. It is basically a wrapper around the APLpy package. Based on the plotting functions above, easy APLpy was re-written from scratch.

Source code and more information on Github: easy APLpy by GiantMolecularCloud

Examples:

Generate a good looking figure of a single channel FITS image (e.g. a moment map) in just one line.

import easy_aplpy
easy_aplpy.plot.map('test_data/map.fits')
simple map

Make a channel map from a FITS data cube with 6 channels: 2×3 columns×rows and display channels 150, 200, ..., 400.

import easy_aplpy
easy_aplpy.plot.grid('cube.fits', [2,3], [150,200,250,300,350,400])
simple channel map

SSH Tunnel

SSH Tunnel icon

SSH Tunnel is a convenient MacOS Menu Bar tool to manage SSH tunnels. It allows to open multiple tunnels simultaneously (only meaningful for different ports) and displays them in the menu bar. Start or terminate tunnels with one click. Disconnect all open tunnels by a single click. New tunnels are configured through a simple MacOS property list (plist) file.
(Will be on Github when I find the time to clean up the code. Ask me about it if you are interested!)

VNC Connector

A little Apple script program that builds a ssh tunnel to connect via VNC, all in one click. Apparently, no available VNC viewer (like Chicken or TightVNC) can open ssh tunnels before trying to connect but both steps need to be done by hand. VNC Connector offer one-click tunneling and viewing (via the Apple Screen Sharing app) from a user-defined list of servers.
(Will be on Github when I find the time to clean up the code. Ask me about it if you are interested!)

sshfs_connect

Another Apple script to mount remote filesystems over ssh (using sshfs). Basically, it's just a GUI wrapper for a terminal two-liner but more convenient to run.
(Will be on Github when I find the time to clean up the code. Ask me about it if you are interested!)