octofitterpy

Python wrapper of Octofitter.jl: fast and flexible orbit fitting

https://github.com/sefffal/octofitterpy

Science Score: 57.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 10 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.7%) to scientific vocabulary

Keywords from Contributors

interactive mesh interpretability sequences generic projection optim hacking network-simulation
Last synced: 7 months ago · JSON representation ·

Repository

Python wrapper of Octofitter.jl: fast and flexible orbit fitting

Basic Info
  • Host: GitHub
  • Owner: sefffal
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 12.1 MB
Statistics
  • Stars: 4
  • Watchers: 2
  • Forks: 2
  • Open Issues: 3
  • Releases: 0
Created about 2 years ago · Last pushed 11 months ago
Metadata Files
Readme License Citation

README.md

octofitterpy

octofitterpy is a python package for performing Bayesian inference against a wide variety of exoplanet / binary star data. It uses the Octofitter.jl julia package under the hood (just like eg numpy uses C).

octofitterpy can access almost all functionality of Octofitter.jl. Currently a subset of this functionality including relative astrometry fitting, absolute astrometry fitting, and various plotting functions have been wrapped with convenient python functions. Remaining functionality can be accessed via the octofitterpy.Octofitter submodule.

The examples directory and demo notebook provide an introduction to using octofitter in Python. Extensive documentation and tutorials are available here for the Julia version, and for the most part are directly translatable to Python.

Installation

In python 3.8 to 3.11 based environment, run: bash pip install -U octofitterpy

Example

```python import octofitterpy as octo

See demo.ipynb for more details

astromlike = octo.PlanetRelAstromLikelihood( epoch = [50000,50120], sep = [505.7,600.1], pa = [0.0,0.4,], σsep = [10,10], σpa = [0.01,0.01], cor= [0,0.2] ) planetb = octo.Planet( name="b", basis="Visual{KepOrbit}", priors= """
a ~ LogUniform(0.1, 500) e ~ Uniform(0.0, 0.99) i ~ Sine() ω ~ UniformCircular() Ω ~ UniformCircular() θ ~ UniformCircular() tp = θatepochtotperi(system,b,50000) # use MJD epoch of your data here!! """, likelihoods=[astromlike] ) sys = octo.System( name="HIP100123", priors = """ M ~ truncated(Normal(1.2, 0.1), lower=0) plx ~ truncated(Normal(50.0, 0.02), lower=0) """, likelihoods=[], companions=[planetb] ) model = octo.LogDensityModel(sys) # Compile model chain = octo.octofit(model) # Sample model octo.octoplot(model,chain) # Plot orbits octo.octocorner(model,chain,small=True) # Make corner plot octo.savechain("table.fits", chain) ```

Read the paper

In addition to these documentation and tutorial pages, you can read the paper published in the Astronomical Journal (open-access).

Attribution

  • If you use Octofitter in your work, please cite Thompson et al: bibtex @article{Thompson_2023, doi = {10.3847/1538-3881/acf5cc}, url = {https://dx.doi.org/10.3847/1538-3881/acf5cc}, year = {2023}, month = {sep}, publisher = {The American Astronomical Society}, volume = {166}, number = {4}, pages = {164}, author = {William Thompson and Jensen Lawrence and Dori Blakely and Christian Marois and Jason Wang and Mosé Giordano and Timothy Brandt and Doug Johnstone and Jean-Baptiste Ruffio and S. Mark Ammons and Katie A. Crotts and Clarissa R. Do Ó and Eileen C. Gonzales and Malena Rice}, title = {Octofitter: Fast, Flexible, and Accurate Orbit Modeling to Detect Exoplanets}, journal = {The Astronomical Journal}, }

  • If you use the pairplot functionality, please cite: @misc{Thompson2023, author = {William Thompson}, title = {{PairPlots.jl} Beautiful and flexible visualizations of high dimensional data}, year = {2023}, howpublished = {\url{https://sefffal.github.io/PairPlots.jl/dev}}, }

  • The python wrapper octofitterpy is based on the excellent PySR by Miles Cranmer.

  • See the documentation for a list of additional papers to consider citing.

Ready?

Start by following this tutorial.

Owner

  • Name: William Thompson
  • Login: sefffal
  • Kind: user
  • Location: Victoria, British Columbia

Citation (CITATION.md)

# Citing

To cite octofitterpy or Octiftter.jl, please use the following BibTeX entry:

```bibtex
@article{Thompson_2023,
    doi = {10.3847/1538-3881/acf5cc},
    url = {https://dx.doi.org/10.3847/1538-3881/acf5cc},
    year = {2023},
    month = {sep},
    publisher = {The American Astronomical Society},
    volume = {166},
    number = {4},
    pages = {164},
    author = {William Thompson and Jensen Lawrence and Dori Blakely and Christian Marois and Jason Wang and Mosé Giordano and Timothy Brandt and Doug Johnstone and Jean-Baptiste Ruffio and S. Mark Ammons and Katie A. Crotts and Clarissa R. Do Ó and Eileen C. Gonzales and Malena Rice},
    title = {Octofitter: Fast, Flexible, and Accurate Orbit Modeling to Detect Exoplanets},
    journal = {The Astronomical Journal},
}
```


* If you use Gaia parallaxes in your work, please cite Gaia DR3 [Gaia Collaboration et al. 2023](https://ui.adsabs.harvard.edu/abs/2023A&A...674A...1G)
* Please cite the HMC sampler backend if you use `octofit`: [Xu et al 2020](http://proceedings.mlr.press/v118/xu20a.html)
* Please cite the [Pigeons paper](https://arxiv.org/abs/2308.09769) if you use `octofit_pigeons`.
* If you use Hipparcos-GAIA proper motion anomaly, please cite [Brandt 2021](https://ui.adsabs.harvard.edu/abs/2021ApJS..254...42B)
* If you use example data in one of the tutorials, please cite the sources listed
* If you use one of the included functions for automatically retreiving data from a public dataset, eg HARPS RVBank, please cite the source as appropriate (it will be displayed in the terminal)
* If you adopt the O'Neil et al. 2019 observable based priors, please cite [O'Neil et al. 2019](https://ui.adsabs.harvard.edu/abs/2019AJ....158....4O).
* If you use RV phase folded plot, please consider citing Makie.jl [Danisch & Krumbiegel, (2021).](https://doi.org/10.21105/joss.03349)
* If you use TemporalGPs.jl to accelerate Gaussian processes modelling of stellar activity, please consider citing [Tebbutt et al 2021](https://proceedings.mlr.press/v161/tebbutt21a.html)
* If you use the pairplot/cornerplot functionality, please cite:
```bibtex
@misc{Thompson2023,
  author = {William Thompson},
  title = {{PairPlots.jl} Beautiful and flexible visualizations of high dimensional data},
  year = {2023},
  howpublished = {\url{https://sefffal.github.io/PairPlots.jl/dev}},
}
```

GitHub Events

Total
  • Delete event: 1
  • Push event: 11
  • Pull request event: 3
  • Fork event: 1
  • Create event: 2
Last Year
  • Delete event: 1
  • Push event: 11
  • Pull request event: 3
  • Fork event: 1
  • Create event: 2

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 59
  • Total Committers: 2
  • Avg Commits per committer: 29.5
  • Development Distribution Score (DDS): 0.102
Past Year
  • Commits: 20
  • Committers: 2
  • Avg Commits per committer: 10.0
  • Development Distribution Score (DDS): 0.05
Top Committers
Name Email Commits
William Thompson w****n@u****a 53
dependabot[bot] 4****] 6
Committer Domains (Top 20 + Academic)
uvic.ca: 1

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 1
  • Total pull requests: 19
  • Average time to close issues: N/A
  • Average time to close pull requests: 10 days
  • Total issue authors: 1
  • Total pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.32
  • Merged pull requests: 10
  • Bot issues: 0
  • Bot pull requests: 19
Past Year
  • Issues: 0
  • Pull requests: 5
  • Average time to close issues: N/A
  • Average time to close pull requests: 6 days
  • Issue authors: 0
  • Pull request authors: 2
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 5
Top Authors
Issue Authors
  • sefffal (1)
Pull Request Authors
  • dependabot[bot] (25)
  • github-actions[bot] (10)
Top Labels
Issue Labels
Pull Request Labels
dependencies (25) python (20) github_actions (5)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 48 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 11
  • Total maintainers: 1
pypi.org: octofitterpy

Fast and flexible orbit fitting

  • Documentation: https://octofitterpy.readthedocs.io/
  • License: MIT License Copyright (c) 2023 William Thompson Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 5.2.1
    published over 1 year ago
  • Versions: 11
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 48 Last month
Rankings
Dependent packages count: 9.7%
Average: 37.0%
Dependent repos count: 64.3%
Maintainers (1)
Last synced: 8 months ago

Dependencies

environment.yml conda
  • pyjuliacall >=0.9.15,<0.10.0
  • python >=3.8
.github/workflows/CI.yml actions
  • actions/cache v4 composite
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • conda-incubator/setup-miniconda v3 composite
  • julia-actions/cache v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/CI_Windows.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • julia-actions/cache v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/CI_large_nightly.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/CI_mac.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • julia-actions/cache v1 composite
  • julia-actions/setup-julia v1 composite
.github/workflows/pypi_deploy.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/update_backend.yml actions
  • actions/checkout v4 composite
  • actions/setup-python v5 composite
  • peter-evans/create-pull-request v6 composite
pyproject.toml pypi
requirements.txt pypi
  • juliacall ==0.9.15
  • numpy >=1.13.0,<2.0.0
  • pandas >=0.21.0,<3.0.0
  • setuptools >=50.0.0
setup.py pypi