Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
94 changes: 94 additions & 0 deletions paper/paper.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
@misc{array-api,
author = {Array API Consortion},
title = {Array API Standard},
url = {https://data-apis.org/array-api/latest/index.html},
year = {2021}
}

@article{astropy:13,
adsnote = {Provided by the SAO/NASA Astrophysics Data System},
adsurl = {https://ui.adsabs.harvard.edu/abs/2013A&A...558A..33A},
archiveprefix = {arXiv},
author = {{Astropy Collaboration} and {Robitaille}, Thomas P. and {Tollerud}, Erik J. and {Greenfield}, Perry and {Droettboom}, Michael and {Bray}, Erik and {Aldcroft}, Tom and {Davis}, Matt and {Ginsburg}, Adam and {Price-Whelan}, Adrian M. and {Kerzendorf}, Wolfgang E. and {Conley}, Alexander and {Crighton}, Neil and {Barbary}, Kyle and {Muna}, Demitri and {Ferguson}, Henry and {Grollier}, Fr{\'e}d{\'e}ric and {Parikh}, Madhura M. and {Nair}, Prasanth H. and {Unther}, Hans M. and {Deil}, Christoph and {Woillez}, Julien and {Conseil}, Simon and {Kramer}, Roban and {Turner}, James E.~H. and {Singer}, Leo and {Fox}, Ryan and {Weaver}, Benjamin A. and {Zabalza}, Victor and {Edwards}, Zachary I. and {Azalee Bostroem}, K. and {Burke}, D.~J. and {Casey}, Andrew R. and {Crawford}, Steven M. and {Dencheva}, Nadia and {Ely}, Justin and {Jenness}, Tim and {Labrie}, Kathleen and {Lim}, Pey Lian and {Pierfederici}, Francesco and {Pontzen}, Andrew and {Ptak}, Andy and {Refsdal}, Brian and {Servillat}, Mathieu and {Streicher}, Ole},
doi = {10.1051/0004-6361/201322068},
eid = {A33},
eprint = {1307.6212},
journal = {\aap},
keywords = {methods: data analysis, methods: miscellaneous, virtual observatory tools, Astrophysics - Instrumentation and Methods for Astrophysics},
month = oct,
pages = {A33},
primaryclass = {astro-ph.IM},
title = {Astropy: A community {P}ython package for astronomy},
volume = {558},
year = 2013
}

@article{astropy:22,
adsnote = {Provided by the SAO/NASA Astrophysics Data System},
adsurl = {https://ui.adsabs.harvard.edu/abs/2022ApJ...935..167A},
archiveprefix = {arXiv},
author = {{Astropy Collaboration} and {Price-Whelan}, Adrian M. and {Lim}, Pey Lian and {Earl}, Nicholas and {Starkman}, Nathaniel and {Bradley}, Larry and {Shupe}, David L. and {Patil}, Aarya A. and {Corrales}, Lia and {Brasseur}, C.~E. and {N{\"o}the}, Maximilian and {Donath}, Axel and {Tollerud}, Erik and {Morris}, Brett M. and {Ginsburg}, Adam and {Vaher}, Eero and {Weaver}, Benjamin A. and {Tocknell}, James and {Jamieson}, William and {van Kerkwijk}, Marten H. and {Robitaille}, Thomas P. and {Merry}, Bruce and {Bachetti}, Matteo and {G{\"u}nther}, H. Moritz and {Aldcroft}, Thomas L. and {Alvarado-Montes}, Jaime A. and {Archibald}, Anne M. and {B{\'o}di}, Attila and {Bapat}, Shreyas and {Barentsen}, Geert and {Baz{\'a}n}, Juanjo and {Biswas}, Manish and {Boquien}, M{\'e}d{\'e}ric and {Burke}, D.~J. and {Cara}, Daria and {Cara}, Mihai and {Conroy}, Kyle E. and {Conseil}, Simon and {Craig}, Matthew W. and {Cross}, Robert M. and {Cruz}, Kelle L. and {D'Eugenio}, Francesco and {Dencheva}, Nadia and {Devillepoix}, Hadrien A.~R. and {Dietrich}, J{\"o}rg P. and {Eigenbrot}, Arthur Davis and {Erben}, Thomas and {Ferreira}, Leonardo and {Foreman-Mackey}, Daniel and {Fox}, Ryan and {Freij}, Nabil and {Garg}, Suyog and {Geda}, Robel and {Glattly}, Lauren and {Gondhalekar}, Yash and {Gordon}, Karl D. and {Grant}, David and {Greenfield}, Perry and {Groener}, Austen M. and {Guest}, Steve and {Gurovich}, Sebastian and {Handberg}, Rasmus and {Hart}, Akeem and {Hatfield-Dodds}, Zac and {Homeier}, Derek and {Hosseinzadeh}, Griffin and {Jenness}, Tim and {Jones}, Craig K. and {Joseph}, Prajwel and {Kalmbach}, J. Bryce and {Karamehmetoglu}, Emir and {Ka{\l}uszy{\'n}ski}, Miko{\l}aj and {Kelley}, Michael S.~P. and {Kern}, Nicholas and {Kerzendorf}, Wolfgang E. and {Koch}, Eric W. and {Kulumani}, Shankar and {Lee}, Antony and {Ly}, Chun and {Ma}, Zhiyuan and {MacBride}, Conor and {Maljaars}, Jakob M. and {Muna}, Demitri and {Murphy}, N.~A. and {Norman}, Henrik and {O'Steen}, Richard and {Oman}, Kyle A. and {Pacifici}, Camilla and {Pascual}, Sergio and {Pascual-Granado}, J. and {Patil}, Rohit R. and {Perren}, Gabriel I. and {Pickering}, Timothy E. and {Rastogi}, Tanuj and {Roulston}, Benjamin R. and {Ryan}, Daniel F. and {Rykoff}, Eli S. and {Sabater}, Jose and {Sakurikar}, Parikshit and {Salgado}, Jes{\'u}s and {Sanghi}, Aniket and {Saunders}, Nicholas and {Savchenko}, Volodymyr and {Schwardt}, Ludwig and {Seifert-Eckert}, Michael and {Shih}, Albert Y. and {Jain}, Anany Shrey and {Shukla}, Gyanendra and {Sick}, Jonathan and {Simpson}, Chris and {Singanamalla}, Sudheesh and {Singer}, Leo P. and {Singhal}, Jaladh and {Sinha}, Manodeep and {Sip{\H{o}}cz}, Brigitta M. and {Spitler}, Lee R. and {Stansby}, David and {Streicher}, Ole and {{\v{S}}umak}, Jani and {Swinbank}, John D. and {Taranu}, Dan S. and {Tewary}, Nikita and {Tremblay}, Grant R. and {de Val-Borro}, Miguel and {Van Kooten}, Samuel J. and {Vasovi{\'c}}, Zlatan and {Verma}, Shresth and {de Miranda Cardoso}, Jos{\'e} Vin{\'\i}cius and {Williams}, Peter K.~G. and {Wilson}, Tom J. and {Winkel}, Benjamin and {Wood-Vasey}, W.~M. and {Xue}, Rui and {Yoachim}, Peter and {Zhang}, Chen and {Zonca}, Andrea and {Astropy Project Contributors}},
doi = {10.3847/1538-4357/ac7c74},
eid = {167},
eprint = {2206.14220},
journal = {\apj},
keywords = {Astronomy software, Open source software, Astronomy data analysis, 1855, 1866, 1858, Astrophysics - Instrumentation and Methods for Astrophysics},
month = aug,
number = {2},
pages = {167},
primaryclass = {astro-ph.IM},
title = {The {A}stropy Project: Sustaining and Growing a Community-oriented Open-source Project and the Latest Major Release (v5.0) of the Core Package},
volume = {935},
year = 2022
}

@software{jax:18,
author = {Bradbury, James and Frostig, Roy and Hawkins, Peter and Johnson, Matthew James and Leary, Chris and Maclaurin, Dougal and Necula, George and Paszke, Adam and VanderPlas, Jake and Wanderman-Milne, Skye and Zhang, Qiao},
date = {2018},
title = {{{JAX}}: Composable Transformations of {{Python}}+{{NumPy}} Programs},
url = {http://github.com/jax-ml/jax},
version = {0.4.35}
}

@article{numpy:2020,
author = {Charles R. Harris and K. Jarrod Millman and St{\'{e}}fan J.
van der Walt and Ralf Gommers and Pauli Virtanen and David
Cournapeau and Eric Wieser and Julian Taylor and Sebastian
Berg and Nathaniel J. Smith and Robert Kern and Matti Picus
and Stephan Hoyer and Marten H. van Kerkwijk and Matthew
Brett and Allan Haldane and Jaime Fern{\'{a}}ndez del
R{\'{i}}o and Mark Wiebe and Pearu Peterson and Pierre
G{\'{e}}rard-Marchant and Kevin Sheppard and Tyler Reddy and
Warren Weckesser and Hameer Abbasi and Christoph Gohlke and
Travis E. Oliphant},
doi = {10.1038/s41586-020-2649-2},
journal = {Nature},
month = sep,
number = {7825},
pages = {357--362},
publisher = {Springer Science and Business Media {LLC}},
title = {Array programming with {NumPy}},
url = {https://doi.org/10.1038/s41586-020-2649-2},
volume = {585},
year = {2020}
}

@software{quax:23,
author = {Kidger, Patrrick},
date = {2023},
title = {{{Quax}}: {{JAX}} + multiple dispatch + custom array-ish objects},
year = {}
}

@article{unxt:2025,
author = {Starkman, Nathaniel and Price-Whelan, Adrian M. and Nibauer, Jake},
doi = {10.21105/joss.07771},
journal = {Journal of Open Source Software},
number = {107},
pages = {7771},
publisher = {The Open Journal},
title = {unxt: A Python package for unit-aware computing with JAX},
url = {https://doi.org/10.21105/joss.07771},
volume = {10},
year = {2025}
}
138 changes: 138 additions & 0 deletions paper/paper.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
---
title:
"coordinax: A Python package enabling calculations with coordinates in JAX"
tags:
- Python
- Numerical Computing
- Scientific Computing
authors:
- name: Nathaniel Starkman
orcid: 0000-0003-3954-3291
affiliation: "1,2"
corresponding: true
- name: Adrian M. Price-Whelan
orcid: 0000-0003-0872-7098
affiliation: "2"
affiliations:
- index: 1
name:
Brinson Prize Fellow at Kavli Institute for Astrophysics and Space
Research, Massachusetts Institute of Technology, USA
ror: 042nb2s44
- index: 2
name: Department of Physics, Case Western Reserve University, USA
ror: 051fd9666
- index: 3
name: Center for Computational Astrophysics, Flatiron Institute, USA
ror: 00sekdz59
date: October 1 2025
bibliography: paper.bib
---

# Summary

`coordinax` is a Python package for coordinate and frame-aware computing with
JAX [@jax:18], a high-performance numerical library that supports automatic
differentiation and just-in-time compilation across multiple compute
architectures. `coordinax` is built on top of `quax` [@quax:23] -- a framework
for building JAX-compatible array-like objects -- and `unxt` [@unxt:2025] -- for
handling units and quantities in JAX. With these foundations, coordinax enables
the definition and transformation of coordinate representations, the
construction of coordinate frames and frame transformations, and computations
with coordinates while preserving their associated representations and frames.
In addition, coordinax supports time-dependent operators on coordinates,
allowing for straightforward definition of inertial and non-inertial reference
frames. By providing seamless integration into JAX, coordinax substantially
extends JAX’s capabilities for scientific applications that require rigorous and
efficient handling of coordinates.

Scientific research frequently requires transforming between coordinate systems
and defining reference frames that may be time-dependent or non-inertial.
`coordinax` provides a principled framework within JAX to represent and carry
out such operations consistently and efficiently. By leveraging JAX’s automatic
differentiation, it enables thorough support for these transformations,
including those involving rotating reference frames, while preserving
compatibility with gradient-based methods. At the same time, `coordinax` is
designed to be intuitive and performant, making it straightforward to
incorporate frame-aware computations into existing JAX workflows.

`coordinax` is designed to be accessible to researchers and developers, offering
an intuitive interface for defining, transforming, and analyzing coordinate
frames and their associated data. It supports both straightforward use cases and
more advanced workflows, making it suitable for a broad community of users.
Furthermore, `coordinax` leverages multiple dispatch to enable deep
interoperability with other libraries, currently including `astropy`, and to
accommodate custom array-like objects within JAX. This extensibility ensures
that `coordinax` can serve as a foundation for diverse scientific and
engineering applications, wherever coordinate- and frame-aware computations are
required.

# Statement of Need

JAX is a powerful tool for high-performance numerical computing, featuring
automatic differentiation, just-in-time compilation, and support for sharding
computations. It excels in providing unified interfaces to various compute
architectures, including CPUs, GPUs, and TPUs, to accelerate code execution
[@jax:18]. While JAX supports PyTrees -- nested containers of independent arrays
with some built -- in and user-extendable functionality—there is no intrinsic
notion that the contained arrays are collectively an array-like object. As a
result, operations in JAX remain fundamentally array-based, which poses
challenges for scientific applications that require structured objects such as
coordinate data.

Astropy has been an invaluable resource for the scientific community, with over
10,000 citations to its initial paper and more than 2,000 citations to its 2022
paper [@astropy:13; @astropy:22]. One of its core sub-packages,
`astropy.coordinates`, provides a rich framework for defining coordinate
representations and transforming between reference frames. This functionality
ensures that scientific calculations involving positions, velocities, and other
kinematic quantities are expressed consistently within well-defined frames.
However, despite JAX’s NumPy-like API, it does not provide native support for
such structured objects, and `astropy.coordinates` cannot be directly extended
to work with JAX. This gap highlights the need for a solution that integrates
the expressive power of Astropy’s coordinate framework with the high-performance
and differentiable computing features of JAX.

`coordinax` addresses this gap by providing a function-oriented
framework—consistent with the style of JAX—for handling coordinates,
representations, and frame transformations, with an object-oriented front end
that will be familiar to users of `astropy.coordinates`. By leveraging `quax`
and `unxt`, `coordinax` defines coordinate classes that integrate directly with
JAX functions. Through automatic differentiation, it not only supports
transformations of positions but also propagates velocities and accelerations
through those same transformations. Coordinates can further be aggregated into
phase-space objects, ensuring that positions, velocities, and higher-order
kinematics transform cleanly across inertial and non-inertial frames. This
design allows researchers to work directly with coordinate arrays while relying
on `coordinax` to manage the underlying transformations, preserving both
performance and conceptual clarity.

# Related Works

`astropy.coordinates` provides a framework for coordinate representations,
reference frames, and transformations [@astropy:13;@astropy:22], and `coordinax`
builds on many of the same ideas. Its architecture differs in several key ways:
it integrates with JAX to support time-dependent operators, automatic
differentiation through transformations, and consistent propagation of
velocities and accelerations across inertial and non-inertial frames. The
transformation system is redesigned around multiple dispatch, making it easier
to add new representations, frames, and transforms while remaining compatible
with JAX’s compilation and differentiation. `coordinax` is both a JAX-oriented
framework for coordinate-aware computing and a test-bed for features that will
guide future development in `astropy.coordinates`, even as the projects follow
different implementation paths and timescales.

# Acknowledgements

Support for this work was provided by The Brinson Foundation through a Brinson
Prize Fellowship grant.

The authors thank the Astropy collaboration and many contributors for their work
on `astropy`, which has been invaluable to the scientific community. Members of
the `coordinax` development team are also core developers and maintainers of the
`astropy` package, and we had `astropy` as our guiding star while developing
`coordinax`. We also extend our gratitude to Patrick Kidger for his valuable
communications and guidance on using `quax` to ensure seamless integration of
`coordinax` with `jax`.

# References
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ build-backend = "hatchling.build"


[tool.codespell]
skip = ["uv.lock"]
skip = "uv.lock,paper/paper.bib"


[tool.commitizen]
Expand Down
Loading