Skip to content
action, angle and frequency estimation using various methods
C++ C TeX Tcl Python Makefile Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
aa
doc
general
pot
test
.gitignore
.travis.yml
LICENSE.txt
Makefile.inc
README.md
makefile

README.md

tact

Build Status

Code for calculating actions, angles and frequencies in various ways

Author

Jason Sanders -- jls at ast dot cam dot ac dot uk

Please cite the accompanying paper Sanders & Binney (2016) if you find the code useful.

Requirements

  1. gsl

Installation

  • Make sure environment variable $(CXX) gives c++ compiler or specify compiler path in Makefile.inc (need a C++-11 compatible compiler, it compiles with clang 3.4 and g++ 4.8 or 4.9)
  • Specify path to gsl in Makefile.inc
  • Run make

This will install the basic package. To access all the features one should also install Torus and LAPACK:

  • Some code uses Torus. To use this install Torus (use 'make CPP="$CXX -fPIC"' to ensure libraries are compiled with fPIC flag) , add path to Torus to Makefile.inc and run 'make TORUS=1'. Currently there are problems compiling with Torus using clang. This appears to be due to different compiler flags in Torus and tact. If users wish to use clang then they should make sure the compiler flags are the same for both.
  • Some code uses LAPACK. To use this install LAPACK, add path to LAPACK to Makefile.inc and run 'make LAPACK=1'
  • To do both run 'make TORUS=1 LAPACK=1'

One can also compile the code into a python module. This requires the boost library and the paths in Makefile.inc to python and boost to be correctly set. With these set either run 'make python' or use the setup.py in /aa like 'TORUS=1 LAPACK=1 python setup.py install'.

There is also test code that runs using googletest. However, there is a quick test to run detailed below.

Methods

  1. Analytic potentials (Isochrone and Harmonic oscillator)
  2. General spherical potentials
  3. Cylindrical Adiabatic Approximation (CAA), Schoenrich & Binney (2012)
  4. Spheroidal Adiabatic Approximation (SAA) (unpublished, in my thesis)
  5. Stackel fitting, Sanders (2012)
  6. Axisymmetric Stackel fudge, Binney (2012)
  7. Interpolation using Axisymmetric Stackel fudge, Binney (2012)
  8. Triaxial Stackel fudge, Sanders & Binney (2015)
  9. Generating function from orbit (axisymmetric and triaxial, O2GF), Sanders & Binney (2014)
  10. Average generating function from orbit (AvGF), Bovy (2014), Fox (2014)
  11. Iterative Torus Machine (ItTC), Sanders & Binney (2015)

Docs

There is some documentation that can be produced by doxygen by running

make docs

The python library also contains doc strings.

Test case

After successful compilation the command

cd aa; ./mains/test_actions.exe 8. 1. 0.2 40. 200. 50. acts.dat

should integrate an orbit with initial conditions X=(8. 1. 0.2) kpc and V = (40. 200. 50.)km/s in the potential

Phi(x)=Vc^2/2 log(R^2+(z/q)^2)

with Vc=220km/s and q=0.9 (or in the Piffl 2014 potential if Torus is installed) and compute the actions for each point using a variety of methods. The results are output in acts.dat with two columns per method (JR and Jz).

Paper

The accompanying paper is Sanders & Binney (2016). action_comp_plots.py reproduces all but one of the plots in the paper. To produce the data for these plots the following scripts are available.

  1. Fig. 2 data is produced by the command
./orbits.sh
  1. Fig. 3, 4, 5, 6 data are produced by the command
./mains/./many_tori.exe many_tori_output.dat
  1. Fig. 7 data are produced by
./orbits_converg.sh
You can’t perform that action at this time.