resonances
A python package for identification of mean-motion resonances in the Solar system and other planetary systems.
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 12 DOI reference(s) in README -
✓Academic publication links
Links to: sciencedirect.com -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (17.0%) to scientific vocabulary
Keywords
Repository
A python package for identification of mean-motion resonances in the Solar system and other planetary systems.
Basic Info
Statistics
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 2
- Releases: 0
Topics
Metadata Files
README.md
Mean-Motion Resonances
resonances is an open-source package dedicated to the identification of mean-motion resonances of small bodies. Many examples are for the Solar system; however, you might use the package for any possible planetary system, including exoplanets.
For more information, read the documentation.
Note: while this app has many functional and integration tests built in, it is still in the dev stage. Hence, it might include some inconsistencies. So, any community help is appreciated!
What's new
June 2025
- Clean Architecture Implementation: The
Simulationclass has been completely refactored into a clean, component-based architecture without backward compatibility concerns. The mainsimulation.pyfile has been reduced by 67% (from 613 to 204 lines) by removing unnecessary setters/getters and moving specialized functionality into dedicated components:SimulationConfig,BodyManager,IntegrationEngine, andDataManager. - Modern Configuration Syntax: Configuration parameters are now accessed using the clean
sim.config.propertysyntax (e.g.,sim.config.dt = 0.1,sim.config.save = 'all'). Essential properties needed by external modules (like libration analysis) are still available directly on the simulation object. - Comprehensive Test Refactoring: All tests have been updated to use the new clean architecture, with 46 simulation component tests passing, ensuring the refactoring maintains full functionality while improving code quality.
February 2025
- Full support for
nasaHorizon source of the initial data. findandcheckmethods for quick identification of the resonant status of objects.create_mmrmethod now supports variaty of options: string, a list of strings, an object, a list of objects.Simulationconstructor got many new parameters allowing to change the settings directly when instantiating.- Instead of
config.json,.env.distis now used. Furthermore, a developer can specify.envin the directory, which will overwrite the default parameters or just use environment variables. - MMRs now have
orderfunction. - Added full support for backward integration (
dt=-1.0,tmax=-600000). - Minor updates to graphs.
October 2024
- The
resonances.findmethod now accepts extra parameters:name,sigma2, andsigma3, see the documentation. - Fixed bug with wrong titles on the plots (periodograms for the resonant angle and semi-major axis).
- Fixed bug when adding an asteroid that has no relevant MMRs (previously it caused exception).
July 2024
- Now you can choose the type of the output image: it could be either
pdforpng`.
python
sim = resonances.Simulation()
...
sim.image_type = 'pdf'
- You can plot only resonant asteroids:
python
sim = resonances.Simulation()
...
sim.plot_only_identified = True
If it is true, then the app will plot every resonant asteroid even if plot is False. If plot is True, this option is ignored.
- New finder module (easy resonance identification):
```python import resonances
sim = resonances.find([463, 490], planets=['Mars', 'Jupiter', 'Saturn']) sim.run() ```
Features
The package:
- can automatically identify two-body and three-body mean-motion resonance in the Solar system,
- accurately differentiates different types of resonances (pure, transient, uncertain),
- provides an interface for mass tasks (i.e. find resonant areas in a planetary system),
- can plot time series and periodograms,
- and, yeah, it is well tested ;)
It actively uses REBOUND integrator maintained by Hanno Rein and others.
Installation
To install resonances on your system, follow the instructions on the appropriate installation guide
Mean-motion resonances
For those who are not familiar with the mean-motion resonances, here is the list of papers used to develop this package:
Papers about the automatic identification of resonant asteroids
- Smirnov, E. A. & Dovgalev, I. S. Identification of Asteroids in Two-Body Resonances. Solar System Research 52, 347–354 (2018).
- Smirnov, E. A. (2023). A new python package for identifying celestial bodies trapped in mean-motion resonances. Astronomy and Computing, 100707. https://doi.org/10.1016/j.ascom.2023.100707
- Smirnov, E. A. & Shevchenko, I. I. Massive identification of asteroids in three-body resonances. Icarus 222, 220–228 (2013).
- Smirnov, E. A., Dovgalev, I. S. & Popova, E. A. Asteroids in three-body mean motion resonances with planets. Icarus (2017) doi:10.1016/j.icarus.2017.09.032.
- Nesvorný, D. & Morbidelli, A. Three-Body Mean Motion Resonances and the Chaotic Structure of the Asteroid Belt. The Astronomical Journal 116, 3029–3037 (1998).
Papers about mean-motion resonances
- Chirikov, B. V. A universal instability of many-dimensional oscillator systems. Physics reports 52, 263–379 (1979).
- Gallardo, T. Strength, stability and three dimensional structure of mean motion resonances in the solar system. Icarus 317, 121–134 (2019).
- Gallardo, T. Atlas of the mean motion resonances in the Solar System. Icarus 184, 29–38 (2006).
- Gallardo, T., Coito, L. & Badano, L. Planetary and satellite three body mean motion resonances. Icarus 274, 83–98 (2016).
- Milani, A., Cellino, A., Knezevic, Z., Novaković, B. & Spoto, F. Asteroid families classification: Exploiting very large datasets. Icarus 239, 46–73 (2014).
- Murray, N. & Holman, M. Diffusive chaos in the outer asteroid belt. The Astronomical Journal 114, 1246 (1997).
- Murray, N., Holman, M. & Potter, M. On the Origin of Chaos in the Asteroid Belt. The Astronomical Journal 116, 2583–2589 (1998).
- Shevchenko, I. I. On the Lyapunov exponents of the asteroidal motion subject to resonances and encounters. Proc. IAU 2, 15–30 (2006).
Books
- Murray, C. D. & Dermott, S. F. Solar system dynamics. (Cambridge Univ. Press, 2012).
- Morbidelli, A. Modern celestial mechanics: aspects of solar system dynamics. (2002).
References
Whenever you use this package, we are kindly asking you to refer to one of the following papers (please choose the appropriate):
- The package itself:
- Smirnov, E. A. (2023). A new python package for identifying celestial bodies trapped in mean-motion resonances. Astronomy and Computing. https://doi.org/10.1016/j.ascom.2023.100707
tex
@article{Smirnov2023,
title = {A new python package for identifying celestial bodies trapped in mean-motion resonances},
journal = {Astronomy and Computing},
year = {2023},
issn = {2213-1337},
doi = {https://doi.org/10.1016/j.ascom.2023.100707},
url = {https://www.sciencedirect.com/science/article/pii/S2213133723000227},
author = {E.A. Smirnov},
keywords = {Mean-motion resonances, Python, Identification, Asteroids},
abstract = {In this paper, a new open-source package ‘resonances’ written in python is introduced. It allows to find, analyse, and plot two-body and three-body mean-motion eccentricity-type resonances in the Solar and other planetary systems. The package has a better accuracy of the automatic identification procedure for resonant objects compared to previous studies. Furthermore, it has built-in integrations with AstDyS and NASA JPL catalogues. The code is extensively documented and tested with automatic tests. The package is available on GitHub under MIT Licence.}
}
- The Libration module and automatic identification of librations:
- Smirnov, E. A. (2023). A new python package for identifying celestial bodies trapped in mean-motion resonances. Astronomy and Computing, 100707. https://doi.org/10.1016/j.ascom.2023.100707
- Mass identification of mean-motion resonances:
- Smirnov, E. A., & Dovgalev, I. S. (2018). Identification of Asteroids in Two-Body Resonances. Solar System Research, 52(4), 347–354. https://doi.org/10.1134/S0038094618040056
- Smirnov, E. A., Dovgalev, I. S. & Popova, E. A. Asteroids in three-body mean motion resonances with planets. Icarus (2017) doi:10.1016/j.icarus.2017.09.032.
Authors
The authors of the package:
Acknowledgement
- Many thanks to the co-authors of the papers (prof. I. I. Shevchenko, I. Dovgalev, and Dr. E. Popova).
- The creators of REBOUND integrator.
- The creators of Astropy.
- The creators of
numpy,scipy,pandas, andmatplotlib.
Contributing
Feel free to contribute to the code by sending pull requests to the repository.
License
MIT
Owner
- Name: Evgeny Smirnov
- Login: smirik
- Kind: user
- Location: Barcelona, Spain
- Website: https://smirik.com
- Twitter: smirik
- Repositories: 10
- Profile: https://github.com/smirik
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: Smirnov
given-names: Evgeny
orcid: https://orcid.org/0000-0001-8264-8668
title: "resonances python package"
version: 0.3.1
identifiers:
- type: doi
value: 10.1016/j.ascom.2023.100707
date-released: 2023-03-18
GitHub Events
Total
- Watch event: 3
- Delete event: 9
- Issue comment event: 5
- Push event: 27
- Pull request event: 14
- Create event: 12
Last Year
- Watch event: 3
- Delete event: 9
- Issue comment event: 5
- Push event: 27
- Pull request event: 14
- Create event: 12
Committers
Last synced: almost 3 years ago
All Time
- Total Commits: 16
- Total Committers: 3
- Avg Commits per committer: 5.333
- Development Distribution Score (DDS): 0.125
Top Committers
| Name | Commits | |
|---|---|---|
| Evgeny Smirnov | s****k@g****m | 14 |
| Alexander Petrov | a****s@g****m | 1 |
| dependabot[bot] | 4****]@u****m | 1 |
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 1
- Total pull requests: 45
- Average time to close issues: N/A
- Average time to close pull requests: about 1 month
- Total issue authors: 1
- Total pull request authors: 3
- Average comments per issue: 1.0
- Average comments per pull request: 0.24
- Merged pull requests: 26
- Bot issues: 0
- Bot pull requests: 27
Past Year
- Issues: 0
- Pull requests: 16
- Average time to close issues: N/A
- Average time to close pull requests: about 2 months
- Issue authors: 0
- Pull request authors: 2
- Average comments per issue: 0
- Average comments per pull request: 0.38
- Merged pull requests: 2
- Bot issues: 0
- Bot pull requests: 14
Top Authors
Issue Authors
- apetrov (1)
Pull Request Authors
- dependabot[bot] (29)
- smirik (17)
- apetrov (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 28 last-month
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 11
- Total maintainers: 1
pypi.org: resonances
Identification of mean-motion resonances
- Homepage: http://smirik.github.io/resonances/
- Documentation: http://smirik.github.io/resonances/
- License: MIT
-
Latest release: 0.5.0
published 8 months ago
Rankings
Maintainers (1)
Dependencies
- appdirs 1.4.4 develop
- atomicwrites 1.4.0 develop
- attrs 21.2.0 develop
- black 21.7b0 develop
- click 8.0.1 develop
- colorama 0.4.4 develop
- coverage 5.5 develop
- flake8 3.9.2 develop
- flake8-bugbear 21.4.3 develop
- iniconfig 1.1.1 develop
- mccabe 0.6.1 develop
- mypy-extensions 0.4.3 develop
- packaging 21.0 develop
- pathspec 0.9.0 develop
- pluggy 0.13.1 develop
- py 1.10.0 develop
- pycodestyle 2.7.0 develop
- pyflakes 2.3.1 develop
- pytest 6.2.4 develop
- regex 2021.7.6 develop
- toml 0.10.2 develop
- tomli 1.2.0 develop
- typed-ast 1.4.3 develop
- astropy 4.3.post1
- cycler 0.10.0
- importlib-metadata 4.6.3
- kiwisolver 1.3.1
- matplotlib 3.4.2
- numpy 1.21.1
- pandas 1.3.1
- pillow 8.3.1
- pyerfa 2.0.0
- pyparsing 2.4.7
- python-dateutil 2.8.2
- pytz 2021.1
- rebound 3.17.4
- scipy 1.7.1
- seaborn 0.11.1
- six 1.16.0
- typing-extensions 3.10.0.0
- zipp 3.5.0
- black ^21.6b0 develop
- coverage ^5.5 develop
- flake8 ^3.9.2 develop
- flake8-bugbear ^21.4.3 develop
- pytest ^6.2.4 develop
- astropy ^4.2.1
- matplotlib ^3.4.2
- numpy ^1.21.0
- pandas ^1.3.0
- python >=3.7.1,<3.10
- rebound ^3.17.3
- scipy ^1.7.0
- seaborn ^0.11.1
- actions/checkout v2 composite
- actions/setup-python v2 composite