Skip to content

Commit

Permalink
Merge assignpotevalincfullorbits
Browse files Browse the repository at this point in the history
  • Loading branch information
jobovy committed Jul 26, 2018
2 parents eb2df9d + 29f6d8a commit 63cfa21
Show file tree
Hide file tree
Showing 36 changed files with 1,141 additions and 1,007 deletions.
41 changes: 41 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
build: off

environment:
PYTHON_VERSION: 3.6
MINICONDA: C:\\Miniconda36-x64

matrix:
- TEST_FILES: "tests\\ --ignore=tests\\test_actionAngleTorus.py --ignore=tests\\test_snapshotpotential.py --ignore=tests\\test_qdf.py --ignore=tests\\test_pv2qdf.py --ignore=tests\\test_diskdf.py --ignore=tests\\test_orbit.py --ignore=tests\\test_streamdf.py --ignore=tests\\test_streamgapdf.py --ignore=tests\\test_evolveddiskdf.py --ignore=tests\\test_quantity.py --ignore=tests\\test_nemo.py --ignore=tests\\test_coords.py"
ADDL_CONDA_PKGS:

- TEST_FILES: tests\test_orbit.py
ADDL_CONDA_PKGS: astropy

- TEST_FILES: tests\test_quantity.py tests\test_coords.py
ADDL_CONDA_PKGS: astropy

platform:
- x64

install:
- cmd: call %MINICONDA%\Scripts\activate.bat
- cmd: conda.exe update --yes --quiet conda
- "set PATH=%MINICONDA%;%MINICONDA%\\Scripts;%PATH%"
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- "conda create -q -n test-environment python=%PYTHON_VERSION% numpy scipy matplotlib setuptools pip cython>=0.20 pytest gsl %ADDL_CONDA_PKGS%"
- activate test-environment
- pip install coverage
- pip install pytest-cov

# Environment variables for GSL linking
- set INCLUDE=%CONDA_PREFIX%\Library\include;%INCLUDE%
- set LIB=%CONDA_PREFIX%\Library\lib;%LIB%
- set LIBPATH=%CONDA_PREFIX%\Library\lib;%LIBPATH%

- python setup.py build_ext --single_ext --inplace --no-openmp
- python setup.py develop --single_ext

test_script:
- pytest -v %TEST_FILES% --cov galpy --cov-config .coveragerc_travis --disable-pytest-warnings
23 changes: 13 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,26 @@ addons:
- libgsl0-dev
# - lcov # leave for when they approve its use
before_install:
# skip travis build if [skip travis] or [travis skip] in commit message
- if git show -s HEAD | grep -F -q "[skip travis]" ; then echo "skip travis" && exit 0 ; fi
- if git show -s HEAD | grep -F -q "[travis skip]" ; then echo "skip travis" && exit 0 ; fi
# Install lcov
- wget http://ftp.de.debian.org/debian/pool/main/l/lcov/lcov_1.11.orig.tar.gz
- tar xf lcov_1.11.orig.tar.gz
- mkdir $HOME/usr
- export PATH=$HOME/usr/bin:$PATH
- make -C lcov-1.11/ install PREFIX=$HOME
# Install GSLv2
- if [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then wget ftp://ftp.gnu.org/gnu/gsl/gsl-2.2.tar.gz; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then tar xf gsl-2.2.tar.gz; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then cd gsl-2.2; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then ./configure --prefix=$HOME/usr; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then make; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then make install; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then cd -; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then export CFLAGS=-I$HOME/usr/include; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then export LDFLAGS=-L$HOME/usr/lib; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.5 ]]; then export LD_LIBRARY_PATH=$HOME/usr/lib; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then wget ftp://ftp.gnu.org/gnu/gsl/gsl-2.4.tar.gz; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then tar xf gsl-2.4.tar.gz; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then cd gsl-2.4; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then ./configure --prefix=$HOME/usr; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then make; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then make install; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then cd -; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then export CFLAGS=-I$HOME/usr/include; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then export LDFLAGS=-L$HOME/usr/lib; fi
- if [[ $TRAVIS_PYTHON_VERSION == 3.6 ]]; then export LD_LIBRARY_PATH=$HOME/usr/lib; fi
#Setup conda for faster installs
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
Expand Down
8 changes: 7 additions & 1 deletion HISTORY.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
v1.3 (2017-XX-XX)
v1.4 (????)
==================

- Made the code fully compilable on Windows with MSVC and test Windows
builds automatically on appveyor (#333).

v1.3 (2018-02-06)
==================

- Added a fast and precise method for approximating an orbit's
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
include README.rst README.dev README.nemo LICENSE HISTORY.txt AUTHORS.txt
include gsl-config.bat
include galpy/df_src/data/*.sav
include galpy/actionAngle_src/actionAngle_c_ext/*.h
include galpy/actionAngle_src/actionAngleTorus_c_ext/*.h
Expand Down
6 changes: 6 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ galpy
.. image:: https://travis-ci.org/jobovy/galpy.svg?branch=master
:target: http://travis-ci.org/jobovy/galpy

.. image:: https://ci.appveyor.com/api/projects/status/wmgs1sq3i7tbtap2/branch/master?svg=true
:target: https://ci.appveyor.com/project/jobovy/galpy

.. image:: https://img.shields.io/coveralls/jobovy/galpy.svg
:target: https://coveralls.io/r/jobovy/galpy?branch=master

Expand All @@ -18,6 +21,9 @@ galpy
.. image:: http://img.shields.io/pypi/v/galpy.svg
:target: https://pypi.python.org/pypi/galpy/

.. image:: https://anaconda.org/conda-forge/galpy/badges/installer/conda.svg
:target: https://anaconda.org/conda-forge/galpy

.. image:: http://img.shields.io/badge/license-New%20BSD-brightgreen.svg
:target: https://github.com/jobovy/galpy/blob/master/LICENSE

Expand Down
8 changes: 7 additions & 1 deletion doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ If you use galpy in a publication, please cite the following paper
and link to ``http://github.com/jobovy/galpy``. Some of the code's
functionality is introduced in separate papers:

* ``galpy.actionAngle.EccZmaxRperiRap`` and ``galpy.orbit.Orbit`` methods with ``analytic=True``: Fast method for computing orbital parameters from :ref:`this section <fastchar>`: please cite `Mackereth & Bovy (2018) <https://www.overleaf.com/docs/fgxwxbkpwcjq/pdf>`__.
* ``galpy.actionAngle.EccZmaxRperiRap`` and ``galpy.orbit.Orbit`` methods with ``analytic=True``: Fast method for computing orbital parameters from :ref:`this section <fastchar>`: please cite `Mackereth & Bovy (2018) <https://arxiv.org/abs/1802.02592>`__.
* ``galpy.actionAngle.actionAngleAdiabatic``: please cite `Binney (2010) <http://adsabs.harvard.edu/abs/2010MNRAS.401.2318B>`__.
* ``galpy.actionAngle.actionAngleStaeckel``: please cite `Bovy & Rix (2013) <http://adsabs.harvard.edu/abs/2013ApJ...779..115B>`__ and `Binney (2012) <http://adsabs.harvard.edu/abs/2012MNRAS.426.1324B>`__.
* ``galpy.actionAngle.actionAngleIsochroneApprox``: please cite `Bovy (2014) <http://adsabs.harvard.edu/abs/2014ApJ...795...95B>`__.
Expand Down Expand Up @@ -256,6 +256,12 @@ The following is a list of publications using ``galpy``; please let me (bovy at
Employs ``galpy.orbit`` integration in ``MWPotential2014`` and the non-axisymmetric ``DehnenBarPotential`` and ``SteadyLogSpiralPotential`` to study the orbits of Milky-Way red-clump stars.
#. *The VMC survey XXVIII. Improved measurements of the proper motion of the Galactic globular cluster 47 Tucanae*, F. Niederhofer, M.-R. L. Cioni, S. Rubele, et al. (2018) *Astron. & Astrophys.*, in press (`arXiv/1801.07738 <http://arxiv.org/abs/1801.07738>`_):
Uses ``galpy.orbit`` integration in ``MWPotential2014`` to investigate the orbit of the cluster 47 Tuc from a newly measured proper motion, finding that the orbit has an eccentricity of about 0.2 and reaches up to 3.6 kpc above the Galactic midplane.
#. *Characterising Open Clusters in the solar neighbourhood with the Tycho-Gaia Astrometric Solution*, T. Cantat-Gaudin, A. Vallenari, R. Sordo, F. Pensabene, A. Krone-Martins, A. Moitinho, C. Jordi, L. Casamiquela, L. Balaguer-Núnez, C. Soubiran, N. Brouillet (2018) *Astron. & Astrophys.*, submitted (`arXiv/1801.10042 <http://arxiv.org/abs/1801.10042>`_):
Employs ``galpy.orbit`` integration in ``MWPotential2014`` to investigate the orbits of a sample of 128 open clusters with astrometry from the Tycho-*Gaia* Astrometric Solution.
#. *Fast estimation of orbital parameters in Milky-Way-like potentials*, J. Ted Mackereth & Jo Bovy (2018) *Mon. Not. Roy. Astron. Soc.*, submitted (`arXiv/1802.02592 <http://arxiv.org/abs/1802.02592>`_):
Introduces the ``galpy.actionAngle.EccZmaxRperiRap`` and related ``galpy.orbit.Orbit`` methods for the fast estimation of the orbital parameters (eccentricity, maximum vertical excursion, and peri/apocenter) in Milky-Way potentials. See :ref:`this section <fastchar>` of the documentation for more info.
#. *HI Kinematics Along The Minor Axis of M82*, Paul Martini, Adam K. Leroy, Jeffrey G. Mangum, Alberto Bolatto, Katie M. Keating, Karin Sandstrom, & Fabian Walter (2018) *Astrophys. J.*, in press (`arXiv/1802.04359 <http://arxiv.org/abs/1802.04359>`_):
Use ``galpy.potential`` components to create a mass model for M82 that consists of a ``HernquistPotential`` bulge, ``MN3ExponentialDiskPotential`` disk, and ``NFWPotential`` dark-matter halo by matching photometric and rotation-curve data.


Indices and tables
Expand Down
4 changes: 0 additions & 4 deletions doc/source/reference/coordspmrapmdectopmllpmbb.rst>

This file was deleted.

2 changes: 1 addition & 1 deletion doc/source/whatsnew.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ v1.3
* A fast and precise method for approximating an orbit's eccentricity,
peri- and apocenter radii, and maximum height above the midplane
using the Staeckel approximation (see `Mackereth & Bovy 2018
<https://www.overleaf.com/docs/fgxwxbkpwcjq/pdf>`__). Can determine
<https://arxiv.org/abs/1802.02592>`__). Can determine
these parameters to better than a few percent accuracy in as little
as 10 :math:`\mu\mathrm{s}` per object, more than 1,000 times faster
than through direct orbit integration. See :ref:`this section
Expand Down
2 changes: 1 addition & 1 deletion galpy/actionAngle_src/actionAngleAdiabatic_c.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
import sys
import sysconfig
import distutils.sysconfig as sysconfig
import warnings
import ctypes
import ctypes.util
Expand Down
2 changes: 1 addition & 1 deletion galpy/actionAngle_src/actionAngleStaeckel_c.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
import sys
import sysconfig
import distutils.sysconfig as sysconfig
import warnings
import ctypes
import ctypes.util
Expand Down
2 changes: 1 addition & 1 deletion galpy/actionAngle_src/actionAngleTorus_c.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import os
import sys
import sysconfig
import distutils.sysconfig as sysconfig
import warnings
import ctypes
import ctypes.util
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ extern "C"
Potential *Phi;
//Phi = new(std::nothrow) LogPotential(1.,0.8,0.,0.);
struct potentialArg * actionAngleArgs= (struct potentialArg *) malloc ( npot * sizeof (struct potentialArg) );
parse_actionAngleArgs(npot,actionAngleArgs,&pot_type,&pot_args,true);
parse_leapFuncArgs_Full(npot,actionAngleArgs,&pot_type,&pot_args);
Phi = new(std::nothrow) galpyPotential(npot,actionAngleArgs);

// Load actions and fit Torus
Expand Down Expand Up @@ -86,7 +86,7 @@ extern "C"
Potential *Phi;
//Phi = new(std::nothrow) LogPotential(1.,0.8,0.,0.);
struct potentialArg * actionAngleArgs= (struct potentialArg *) malloc ( npot * sizeof (struct potentialArg) );
parse_actionAngleArgs(npot,actionAngleArgs,&pot_type,&pot_args,true);
parse_leapFuncArgs_Full(npot,actionAngleArgs,&pot_type,&pot_args);
Phi = new(std::nothrow) galpyPotential(npot,actionAngleArgs);

// Load actions and fit Torus
Expand Down Expand Up @@ -149,7 +149,7 @@ extern "C"
Potential *Phi;
//Phi = new(std::nothrow) LogPotential(1.,0.8,0.,0.);
struct potentialArg * actionAngleArgs= (struct potentialArg *) malloc ( npot * sizeof (struct potentialArg) );
parse_actionAngleArgs(npot,actionAngleArgs,&pot_type,&pot_args,true);
parse_leapFuncArgs_Full(npot,actionAngleArgs,&pot_type,&pot_args);
Phi = new(std::nothrow) galpyPotential(npot,actionAngleArgs);

// Load actions and fit Torus
Expand Down Expand Up @@ -210,7 +210,7 @@ extern "C"
// set up potential
Potential *Phi;
struct potentialArg * actionAngleArgs= (struct potentialArg *) malloc ( npot * sizeof (struct potentialArg) );
parse_actionAngleArgs(npot,actionAngleArgs,&pot_type,&pot_args,true);
parse_leapFuncArgs_Full(npot,actionAngleArgs,&pot_type,&pot_args);
Phi = new(std::nothrow) galpyPotential(npot,actionAngleArgs);

// Load actions and fit Torus
Expand Down

0 comments on commit 63cfa21

Please sign in to comment.