Skip to content

Commit 111c907

Browse files
action to compile the paper
1 parent 4fe342a commit 111c907

4 files changed

Lines changed: 296 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Compile aper draft
2+
on:
3+
push:
4+
paths:
5+
- paper/**
6+
- .github/workflows/compile_paper.yml
7+
8+
jobs:
9+
paper:
10+
runs-on: ubuntu-latest
11+
name: Paper Draft
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
- name: Build draft PDF
16+
uses: openjournals/openjournals-draft-action@master
17+
with:
18+
journal: joss
19+
# This should be the path to the paper within your repo.
20+
paper-path: paper.md
21+
- name: Upload
22+
uses: actions/upload-artifact@v4
23+
with:
24+
name: paper
25+
# This is the output path where Pandoc will write the compiled
26+
# PDF. Note, this should be the same directory as the input
27+
# paper.md
28+
path: paper.pdf

paper/my_paper.md

Whitespace-only changes.

paper/paper.bib

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
@article{Pearson:2017,
2+
url = {http://adsabs.harvard.edu/abs/2017arXiv170304627P},
3+
Archiveprefix = {arXiv},
4+
Author = {{Pearson}, S. and {Price-Whelan}, A.~M. and {Johnston}, K.~V.},
5+
Eprint = {1703.04627},
6+
Journal = {ArXiv e-prints},
7+
Keywords = {Astrophysics - Astrophysics of Galaxies},
8+
Month = mar,
9+
Title = {{Gaps in Globular Cluster Streams: Pal 5 and the Galactic Bar}},
10+
Year = 2017
11+
}
12+
13+
@book{Binney:2008,
14+
url = {http://adsabs.harvard.edu/abs/2008gady.book.....B},
15+
Author = {{Binney}, J. and {Tremaine}, S.},
16+
Booktitle = {Galactic Dynamics: Second Edition, by James Binney and Scott Tremaine.~ISBN 978-0-691-13026-2 (HB).~Published by Princeton University Press, Princeton, NJ USA, 2008.},
17+
Publisher = {Princeton University Press},
18+
Title = {{Galactic Dynamics: Second Edition}},
19+
Year = 2008
20+
}
21+
22+
@article{gaia,
23+
author = {{Gaia Collaboration}},
24+
title = "{The Gaia mission}",
25+
journal = {Astronomy and Astrophysics},
26+
archivePrefix = "arXiv",
27+
eprint = {1609.04153},
28+
primaryClass = "astro-ph.IM",
29+
keywords = {space vehicles: instruments, Galaxy: structure, astrometry, parallaxes, proper motions, telescopes},
30+
year = 2016,
31+
month = nov,
32+
volume = 595,
33+
doi = {10.1051/0004-6361/201629272},
34+
url = {http://adsabs.harvard.edu/abs/2016A%26A...595A...1G},
35+
}
36+
37+
@article{astropy,
38+
author = {{Astropy Collaboration}},
39+
title = "{Astropy: A community Python package for astronomy}",
40+
journal = {Astronomy and Astrophysics},
41+
archivePrefix = "arXiv",
42+
eprint = {1307.6212},
43+
primaryClass = "astro-ph.IM",
44+
keywords = {methods: data analysis, methods: miscellaneous, virtual observatory tools},
45+
year = 2013,
46+
month = oct,
47+
volume = 558,
48+
doi = {10.1051/0004-6361/201322068},
49+
url = {http://adsabs.harvard.edu/abs/2013A%26A...558A..33A}
50+
}
51+
52+
@article{Hunt:2025,
53+
author = {{Hunt}, Jason A.~S. and {Vasiliev}, Eugene},
54+
title = {Milky Way dynamics in light of Gaia},
55+
journal = {New Astronomy Reviews},
56+
year = 2025,
57+
volume = 98,
58+
doi = {10.1016/j.newar.2024.101721},
59+
url = {https://www.sciencedirect.com/science/article/pii/S1387647324000289}
60+
}
61+
62+
@misc{fidgit,
63+
author = {A. M. Smith and K. Thaney and M. Hahnel},
64+
title = {Fidgit: An ungodly union of GitHub and Figshare},
65+
year = {2020},
66+
publisher = {GitHub},
67+
journal = {GitHub repository},
68+
url = {https://github.com/arfon/fidgit}
69+
}

paper/paper.md

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
1+
---
2+
title: 'Gala: A Python package for galactic dynamics'
3+
tags:
4+
- Python
5+
- astronomy
6+
- dynamics
7+
- galactic dynamics
8+
- milky way
9+
authors:
10+
- name: Adrian M. Price-Whelan
11+
orcid: 0000-0000-0000-0000
12+
equal-contrib: true
13+
affiliation: "1, 2" # (Multiple affiliations must be quoted)
14+
- name: Author Without ORCID
15+
equal-contrib: true # (This is how you can denote equal contributions between multiple authors)
16+
affiliation: 2
17+
- name: Author with no affiliation
18+
corresponding: true # (This is how to denote the corresponding author)
19+
affiliation: 3
20+
- given-names: Ludwig
21+
dropping-particle: van
22+
surname: Beethoven
23+
affiliation: 3
24+
affiliations:
25+
- name: Lyman Spitzer, Jr. Fellow, Princeton University, United States
26+
index: 1
27+
ror: 00hx57361
28+
- name: Institution Name, Country
29+
index: 2
30+
- name: Independent Researcher, Country
31+
index: 3
32+
date: 13 August 2017
33+
bibliography: paper.bib
34+
35+
# Optional fields if submitting to a AAS journal too, see this blog post:
36+
# https://blog.joss.theoj.org/2018/12/a-new-collaboration-with-aas-publishing
37+
aas-doi: 10.3847/xxxxx <- update this with the DOI from AAS once you know it.
38+
aas-journal: Astrophysical Journal <- The name of the AAS journal.
39+
---
40+
41+
# Summary
42+
43+
The forces on stars, galaxies, and dark matter under external gravitational
44+
fields lead to the dynamical evolution of structures in the universe. The orbits
45+
of these bodies are therefore key to understanding the formation, history, and
46+
future state of galaxies. The field of "galactic dynamics," which aims to model
47+
the gravitating components of galaxies to study their structure and evolution,
48+
is now well-established, commonly taught, and frequently used in astronomy.
49+
Aside from toy problems and demonstrations, the majority of problems require
50+
efficient numerical tools, many of which require the same base code (e.g., for
51+
performing numerical orbit integration).
52+
53+
# Statement of need
54+
55+
`Gala` is an Astropy-affiliated Python package for galactic dynamics. Python
56+
enables wrapping low-level languages (e.g., C) for speed without losing
57+
flexibility or ease-of-use in the user-interface. The API for `Gala` was
58+
designed to provide a class-based and user-friendly interface to fast (C or
59+
Cython-optimized) implementations of common operations such as gravitational
60+
potential and force evaluation, orbit integration, dynamical transformations,
61+
and chaos indicators for nonlinear dynamics. `Gala` also relies heavily on and
62+
interfaces well with the implementations of physical units and astronomical
63+
coordinate systems in the `Astropy` package [@astropy] (`astropy.units` and
64+
`astropy.coordinates`).
65+
66+
`Gala` was designed to be used by both astronomical researchers and by
67+
students in courses on gravitational dynamics or astronomy. It has already been
68+
used in a number of scientific publications [@Pearson:2017] and has also been
69+
used in graduate courses on Galactic dynamics to, e.g., provide interactive
70+
visualizations of textbook material [@Binney:2008]. The combination of speed,
71+
design, and support for Astropy functionality in `Gala` will enable exciting
72+
scientific explorations of forthcoming data releases from the *Gaia* mission
73+
[@gaia] by students and experts alike.
74+
75+
# State of the field
76+
77+
Several tools exist for galactic dynamics computations:
78+
`galpy` [@Bovy:2015] is a Python package with similar goals,
79+
providing orbit integration and potential classes for galactic dynamics.
80+
`NEMO` [@Teuben:1995] is a well-established, comprehensive stellar dynamics
81+
toolbox written primarily in C, offering extensive functionality but with a
82+
steeper learning curve and less integration with modern Python workflows.
83+
Other tools like `GalPot` provide specific Milky Way potential models but lack
84+
the broader dynamical analysis capabilities.
85+
86+
`Gala` was built rather than contributing to existing projects for several
87+
reasons. First, `Gala` was designed from the ground up to integrate seamlessly
88+
with the Astropy ecosystem, using `astropy.units` and `astropy.coordinates`
89+
as core dependencies rather than optional features. This tight integration
90+
enables natural workflows for astronomers already using Astropy. Second,
91+
`Gala`'s object-oriented API with consistent interfaces across subpackages
92+
(potentials, integrators, dynamics) provides a more modular and extensible
93+
design than alternatives available at the time. Third, `Gala` fills a specific
94+
niche between simple demonstration codes and full N-body simulation packages
95+
like `Gadget` [@Springel:2005] – it focuses on the common tasks in galactic
96+
dynamics research (orbit integration, potential evaluation, coordinate
97+
transformations) while maintaining both performance through C implementations
98+
and usability through its Python interface.
99+
100+
# Software design
101+
102+
`Gala`'s design philosophy is based on three core principles: (1) to provide a
103+
user-friendly, modular, object-oriented API, (2) to use community tools and
104+
standards (e.g., Astropy for coordinates and units handling), and (3) to use
105+
low-level code (C/C++/Cython) for performance while keeping the user interface
106+
in Python. Within each of the main subpackages in `gala` (`gala.potential`,
107+
`gala.dynamics`, `gala.integrate`, etc.), we try to maintain a consistent API
108+
for classes and functions. For example, all potential classes share a common
109+
base class and implement methods for computing the potential, forces, density,
110+
and other derived quantities at given positions. This also works for
111+
compositions of potentials (i.e., multi-component potential models), which
112+
share the potential base class but also act as a dictionary-like container for
113+
different potential components. As another example, all integrators implement a
114+
common interface for numerically integrating orbits. The integrators and core
115+
potential functions are all implemented in C without support for units, but the
116+
Python layer handles unit conversions and prepares data to dispatch to the C
117+
layer appropriately.Within the coordinates subpackage, we extend Astropy's
118+
coordinate classes to add more specialized coordinate frames and
119+
transformations that are relevant for Galactic dynamics and Milky Way research.
120+
121+
# Research impact statement
122+
123+
`Gala` has demonstrated significant research impact and grown both its user base
124+
and contributor community since its initial release. The package has evolved
125+
through contributions from over 18 developers beyond the original core developer
126+
(@adrn), with community members adding new features, reporting bugs, and
127+
suggesting new features.
128+
129+
While `Gala` started as a tool primarily to support the core developer's
130+
research, it has expanded organically to support a range of applications across
131+
domains in astrophysics related to Milky Way and galactic dynamics. The package
132+
has been used in over 400 publications (according to Google Scholar) spanning
133+
topics in galactic dynamics such as modeling stellar streams [@Pearson:2017],
134+
Milky Way mass modeling, and interpreting kinematic and stellar population
135+
trends in the Galaxy. `Gala` is integrated within the Astropy ecosystem as an
136+
affiliated package and has built functionality that extends the widely-used
137+
`astropy.units` and `astropy.coordinates` subpackages. `Gala`'s impact extends
138+
beyond citations in research: Because of its focus on usability and user
139+
interface design, `Gala` has also been incorporated into graduate-level galactic
140+
dynamics curricula at multiple institutions.
141+
142+
`Gala` has been downloaded over 100,000 times from PyPI and conda-forge yearly
143+
(or ~2,000 downloads per week) over the past few years, demonstrating a broad
144+
and active user community. Users span career stages from graduate students to
145+
faculty and other established researchers and represent institutions around the
146+
world. This broad adoption and active participation validate `Gala`'s role as
147+
core community infrastructure for galactic dynamics research.
148+
149+
# Mathematics
150+
151+
Single dollars ($) are required for inline mathematics e.g. $f(x) = e^{\pi/x}$
152+
153+
Double dollars make self-standing equations:
154+
155+
$$\Theta(x) = \left\{\begin{array}{l}
156+
0\textrm{ if } x < 0\cr
157+
1\textrm{ else}
158+
\end{array}\right.$$
159+
160+
You can also use plain \LaTeX for equations
161+
\begin{equation}\label{eq:fourier}
162+
\hat f(\omega) = \int_{-\infty}^{\infty} f(x) e^{i\omega x} dx
163+
\end{equation}
164+
and refer to \autoref{eq:fourier} from text.
165+
166+
# Citations
167+
168+
Citations to entries in paper.bib should be in
169+
[rMarkdown](http://rmarkdown.rstudio.com/authoring_bibliographies_and_citations.html)
170+
format.
171+
172+
If you want to cite a software repository URL (e.g. something on GitHub without a preferred
173+
citation) then you can do it with the example BibTeX entry below for @fidgit.
174+
175+
For a quick reference, the following citation commands can be used:
176+
- `@author:2001` -> "Author et al. (2001)"
177+
- `[@author:2001]` -> "(Author et al., 2001)"
178+
- `[@author1:2001; @author2:2001]` -> "(Author1 et al., 2001; Author2 et al., 2002)"
179+
180+
# Figures
181+
182+
Figures can be included like this:
183+
![Caption for example figure.\label{fig:example}](figure.png)
184+
and referenced from text using \autoref{fig:example}.
185+
186+
Figure sizes can be customized by adding an optional second parameter:
187+
![Caption for example figure.](figure.png){ width=20% }
188+
189+
# AI usage disclosure
190+
191+
No generative AI tools were used in the development of this software, the writing
192+
of this manuscript, or the preparation of supporting materials.
193+
194+
# Acknowledgements
195+
196+
We acknowledge contributions from Brigitta Sipocz, Syrtis Major, and Semyeong
197+
Oh, and support from Kathryn Johnston during the genesis of this project.
198+
199+
# References

0 commit comments

Comments
 (0)