These codes in Fortran and Python calculate properties of mean motion resonances of a particle with a planet or a system of planets: semimajor axis, libration centers, periods, width, resonance strength and level curves of the Hamiltonian. Arbitrary orbits for both bodies. Based on Gallardo (2020, CMDA) but extended to eccentric planets. An early version of this model was proposed in Gallardo (2006, Icarus). It can also be considered as a particular case of the model given by Gallardo, Beauge and Giuppone (2021, A&A).
Note 1: the usual notation is kp:k, so resonance 1:2 (aka 1/2) corresponds to an asteroid exterior to the planet's orbit and resonance 2:1 (aka 2/1) represents an asteroid interior to the planet's orbit. For the calculations, as critical angle we take sigma = k*lambda_ast- kp*lambda_pla + (kp-k)*varpi_ast.
Other critical angles can be defined, but this model assumes that all nodes and pericenters are fixed (without time variations), so the dynamics can be described with a single critical angle.
Note 2: when the planet's and particle's orbits intersect (typical of orbits with i=0), the width estimate can be erroneous. In these cases, it's best to look at the contour lines of the Hamiltonian (the code is included) and deduce a more realistic width.
Fortran codes (new version v3 calculates atlas in the space (a,e)). April 2025: bug corrected (an issue with the mass of the central object, see readme). Fixed inconsistency with definition of sigma (August 2025).
Python class semianalyticResonance
Reference: Gallardo (2020, CMDA).
examples
Widths calculated for test particles with i=10 using the code superatlasv2
Widths calculated for test particles with i=10 using the code superatlasv2