Scripts, Tips & Tricks

Navigate this page

Here we present a collection of Athena++ analysis scripts and helpful tips/tricks for using Athena++ by the workshop attendees.

Scripts

Inspecting and summarizing restart files

restart_inspect.py

Contributed by Chris White (UCSB)

Purpose:
This script parses the binary metadata of a restart file and prints the values. It also reports the exact byte lengths of the different data segments. The script assumes the restart file was made on a little-endian machine, with padding bytes inserted as common compilers probably would.

Instructions: ./restart_inspect example.00000.rst (tested on Python 2.7)

Make movies out of 3-D data (time,x,y)

cubemovie (github)

Contributed by Alwin Mao (Princeton)

Purpose:
Python code for transmuting numpy arrays into reasonable mp4 movies using matplotlib and ffmpeg.

Instructions: See github README

Alwin's Athena++ Tools

athena_tools (github)

Contributed by Alwin Mao (Princeton)

Purpose:
A misc collection of analysis scripts

Instructions: See github README

Merge 1D tab outputs of parallel runs

join_tabs (github)

Contributed by Tim waters (LANL)

Purpose:
Merge scripts for Athena++ tab dumps, analogous to join_vtk++ included in vis folder of public Athena++ repo.

Instructions: See github README

Tips

Calculate vorticity in spherical coordinates

Contributed by Tim Waters (LANL)

Tricks