Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3!!!!!!!!!!! #367

Merged
merged 303 commits into from
Apr 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
303 commits
Select commit Hold shift + click to select a range
fb3d53a
add ds_store files to gitignore
sblunt Jul 5, 2023
df63e4d
Merge branch 'dynesty' of https://github.com/sblunt/orbitize into dyn…
sblunt Jul 5, 2023
ebba94c
Merge branch 'main' into dynesty
sblunt Jul 5, 2023
e220f0e
renamed MCMC tutorial
sblunt Jul 5, 2023
4b28943
revert deletion of other tutorials
sblunt Jul 5, 2023
3a6e7bf
add todo list
sblunt Jul 5, 2023
a88a7da
pep8
sblunt Jul 5, 2023
bdf1bf0
kepler's 3rd law bugfix
sblunt Jul 5, 2023
c0cc7b8
change savdir of nested_test
sblunt Jul 5, 2023
3037cd9
fix parallelization & update docs a bit
sblunt Jul 5, 2023
b528ab3
bit of cleanup for e2e tests
sblunt Jul 5, 2023
30b74cf
delete researchnote_func
sblunt Jul 5, 2023
299a8fd
go back to optimized dynesty parallelization method
sblunt Jul 5, 2023
cc5af7a
clean up generate synethetic data documentation
sblunt Jul 5, 2023
eccdf48
clean up unit test a bit; test both dynamic & static samplers
sblunt Jul 5, 2023
5faf0e8
tweaks here and there
sblunt Jul 5, 2023
87cbcb8
don't use mp unless n_threads>1
sblunt Jul 5, 2023
76a7e0d
getting unit tests to pass
sblunt Jul 5, 2023
e6879b3
set default values for generate synthetic data func
sblunt Jul 5, 2023
65b976e
parallelization in tests
sblunt Jul 5, 2023
589b51e
remove kill switch
sblunt Jul 5, 2023
cb1efd2
remove unused var
sblunt Jul 5, 2023
350c043
bugfix
sblunt Jul 5, 2023
49e7bab
actually fixing the bug
sblunt Jul 5, 2023
fa8b4a1
remember when I said I fixed the bug well guess what
sblunt Jul 6, 2023
4d2e0da
bugfix for loguniform transform_samples; pep8 cleanup
sblunt Jul 7, 2023
736725e
fixed no_negatives keyword in GaussianPrior
sblunt Jul 7, 2023
fd6abdb
nested sampler tutorial!
thea-mckenna Jul 20, 2023
5240659
fix criterion in selecting fitting secondary mass
semaphoreP Aug 15, 2023
5890a89
fixed some bugs but this is wrong
semaphoreP Aug 15, 2023
9eaf888
simplified version but may be working
semaphoreP Aug 15, 2023
08cfc18
Merge branch 'hcga' into hgca_v2
semaphoreP Aug 17, 2023
f34e7b8
add ra/dec covariances in hgca fit
semaphoreP Aug 22, 2023
a8528e1
add hgca test
semaphoreP Aug 22, 2023
965f13d
fix typos in hgca test
semaphoreP Aug 23, 2023
253919b
add hgca tutorial
semaphoreP Aug 23, 2023
25a1978
small tutorail changes for docs
semaphoreP Aug 23, 2023
545c77d
forgot corr norm
semaphoreP Aug 28, 2023
5d2de78
HGCA saves to results. cleaned up unused fields
semaphoreP Aug 29, 2023
c59a9a8
speed up hgca fit using linear solver
semaphoreP Aug 30, 2023
088e221
fix likelihood bug
semaphoreP Sep 5, 2023
e1ba5b4
Merge pull request #344 from sblunt/hgca_v2
semaphoreP Sep 11, 2023
964a15b
fix merge conflict
semaphoreP Sep 11, 2023
62a3b96
fix bugs causing test to crash
semaphoreP Sep 11, 2023
b1b48b3
udpate hgca tutorial discribing differences with IAD
semaphoreP Sep 11, 2023
082cc7c
fix HGCA catalog URL
semaphoreP Sep 11, 2023
8519cff
turn off ssl certificate verification for HGCA
semaphoreP Sep 11, 2023
f853861
add OFTI time warning following issue #303
michaelkmpoon Sep 24, 2023
030d3fc
Add autocorrelation time estimate
michaelkmpoon Sep 24, 2023
ddca876
Plot function for PM_RA and PM_DEC vs Epoch when using HGCA
wbalmer Oct 2, 2023
076ea94
Updated tutorial with plot function.
wbalmer Oct 2, 2023
248ea96
apply caution as per Jason's warning
wbalmer Oct 2, 2023
40bf993
correct error in string handling when printing warning (oops!)
wbalmer Oct 3, 2023
46451c8
Update caution text in print and tuto nb as per Jason's explanation
wbalmer Oct 3, 2023
0fb5435
Merge pull request #348 from wbalmer/hcga
semaphoreP Oct 3, 2023
9cd9913
lint (sorry jason)
sblunt Nov 10, 2023
66286a7
add ability to fit type 1 hipparcos sols
sblunt Nov 10, 2023
b409eb0
lint
sblunt Nov 13, 2023
4f07507
separate out model computation in hipparcos.py
sblunt Nov 13, 2023
79bf112
lint
sblunt Nov 13, 2023
48c8cdb
lint
sblunt Nov 13, 2023
b51f416
fix bug introduced with type 1 sols
sblunt Nov 13, 2023
a34a834
another api type 1 bug fixed
sblunt Nov 13, 2023
73e18cb
lint
sblunt Nov 13, 2023
f0eff4f
bugfix to get hipparcos fits working again
sblunt Nov 13, 2023
b99ce71
messed up too much; abort
sblunt Nov 13, 2023
a70f04e
don't bootstrap by default
sblunt Nov 18, 2023
6222680
separate plx/pm prediction from hipparcos into separate class
sblunt Nov 20, 2023
5382c80
untested full implementation
sblunt Nov 20, 2023
9f0cb08
linting
sblunt Nov 21, 2023
0950f63
bugfixes
sblunt Nov 21, 2023
eebe42e
fits running
sblunt Nov 21, 2023
fc50ccf
bugfix for type 1 solution
sblunt Nov 27, 2023
1267f61
add back in var term for type 1 solutions refitting test
sblunt Nov 27, 2023
6a38833
formatting
sblunt Dec 27, 2023
e1aae01
update label on corner plot to me mu_alpha*
sblunt Dec 27, 2023
2e54a39
pep8
sblunt Dec 30, 2023
ee5720e
remove unused imports
sblunt Dec 30, 2023
3b1d84e
pep8
sblunt Dec 30, 2023
5e842ce
update hgca edr3 to stable vizier url, safer fits.open
wbalmer Jan 8, 2024
fa54e4a
Merge branch 'sblunt:hcga' into hcga
wbalmer Jan 8, 2024
9437506
Merge pull request #353 from wbalmer/hcga
semaphoreP Jan 8, 2024
4caf29b
fix syntax issue
semaphoreP Jan 8, 2024
9201708
replace depricated calculate_com function
semaphoreP Jan 8, 2024
d51fe49
formatting
sblunt Jan 10, 2024
5e27c82
speed up log_chi2 vs standard test & make it lil less brittle
sblunt Jan 10, 2024
1f83e10
formatting
sblunt Jan 10, 2024
d54e660
remove unused import
sblunt Jan 10, 2024
a6c0693
speed up hipparcos unit tests
sblunt Jan 10, 2024
d9e90b8
speed up multiplanet tests
sblunt Jan 10, 2024
00d4bb6
speed up ofti tests a bit
sblunt Jan 10, 2024
9f8ba7b
Merge branch 'main' into v3
sblunt Jan 10, 2024
a86fa6d
Merge branch 'v3' into rebound-bugfix
sblunt Jan 10, 2024
81e4e46
don't re-execute tutorials when building docs
sblunt Jan 10, 2024
3cd6899
add separate workflow to run notebooks
sblunt Jan 10, 2024
b0346ea
new workflow should prob have its own name
sblunt Jan 10, 2024
d3b396a
fix syntax error in workflow
sblunt Jan 10, 2024
177728a
run CI on newer python versions
sblunt Jan 10, 2024
83695fb
install jupyter in workflow env
sblunt Jan 10, 2024
cd620b3
also need to install orbitize in ci env
sblunt Jan 10, 2024
e5c7b6a
trying to get nbs to run
sblunt Jan 10, 2024
c34ab4b
trying again to get nbs to run
sblunt Jan 10, 2024
185fcc2
trying again
sblunt Jan 10, 2024
dae000e
and again!
sblunt Jan 10, 2024
812a823
debugging nb action
sblunt Jan 11, 2024
17b0475
more debugging
sblunt Jan 11, 2024
38c0d31
more debugging
sblunt Jan 11, 2024
785a74d
debugging
sblunt Jan 11, 2024
a64a29d
more debugging
sblunt Jan 11, 2024
a54cbed
more debugging
sblunt Jan 11, 2024
4b8acdf
more debugging
sblunt Jan 11, 2024
32a430b
new error, making progress
sblunt Jan 11, 2024
63e468a
success!! remove debugging stmts
sblunt Jan 11, 2024
c12c991
Merge branch 'v3' into rebound-bugfix
sblunt Jan 11, 2024
a46b260
formatting
sblunt Jan 11, 2024
d65b5f8
use nbmake to force pytest to fail if nb raises error
sblunt Jan 12, 2024
3424fcc
only run coveralls for one of the three parallel CI builds
sblunt Jan 12, 2024
66d6d23
Merge branch 'v3' into rebound-bugfix
sblunt Jan 12, 2024
dc93e0c
allow longer time for nb cells to run before timeout error
sblunt Jan 12, 2024
83e7976
Merge pull request #354 from sblunt/rebound-bugfix
sblunt Jan 12, 2024
1ea93f2
Merge branch 'v3' into hcga
sblunt Jan 12, 2024
59c02a6
Merge branch 'v3' into dynesty
sblunt Jan 12, 2024
a0424f2
Merge branch 'v3' into OFTI_time_warning
sblunt Jan 16, 2024
afa3f82
minor pep8 type changes
sblunt Jan 16, 2024
0b5f85b
bugfix
sblunt Jan 16, 2024
c8facdf
make warning a float instead of bool
sblunt Jan 16, 2024
e2ca9df
Merge pull request #346 from michaelkmpoon/MCMC_autocorr
sblunt Jan 16, 2024
7c6dcd3
Start v3 changelog
sblunt Jan 16, 2024
017f0bc
Merge branch 'v3' into OFTI_time_warning
sblunt Jan 16, 2024
db08283
wider tolerances for failed iad test
sblunt Jan 16, 2024
af3ffa5
catch autocorr exception so notebook runs through
sblunt Jan 16, 2024
b51d335
Merge branch 'v3' into OFTI_time_warning
sblunt Jan 16, 2024
72ee7b2
wider tolerance for failing chi2 test
sblunt Jan 16, 2024
2fd96d4
set numpy random seed to prevent getting unlucky
sblunt Jan 16, 2024
ac8a962
initial commit of manual
sblunt Jan 16, 2024
6bfa14b
Merge pull request #355 from sblunt/OFTI_time_warning
sblunt Jan 18, 2024
d7f68d6
Merge branch 'v3' into hcga
sblunt Jan 19, 2024
d5fe676
pep8 cleanup because I decided I care about that lol
sblunt Jan 19, 2024
886ea2a
remove test-generated file after test is complete
sblunt Jan 19, 2024
1aabcfe
run hgca tutorial
sblunt Jan 19, 2024
62b03af
update v3 changelog
sblunt Jan 19, 2024
0f19a50
Merge branch 'hcga' into fit-arbitrary-abs-astrom
sblunt Jan 19, 2024
c5e2974
Merge pull request #317 from sblunt/hcga
sblunt Jan 19, 2024
3f72c8c
Testing equations
sofiacovarrubias Jan 27, 2024
f2c9be4
Equation testing
sofiacovarrubias Jan 27, 2024
0e30855
fix bug causing unit test failures
sblunt Jan 30, 2024
d4c20b4
add test that type 1 hipparcos sols pass
sblunt Jan 30, 2024
3b8a628
add test of pm calculation
sblunt Jan 30, 2024
ee0e7e7
add plx test for arbitrary abs astrom
sblunt Jan 30, 2024
e20eaf4
remove unused import
sblunt Jan 30, 2024
98148b7
fix cos(delta) bug
sblunt Feb 9, 2024
e4f3cf9
fix nbody indexing error & add unit test
sblunt Feb 12, 2024
e661b5c
more temps/walkers
sblunt Feb 12, 2024
c2653f2
equation checkpoint
sofiacovarrubias Feb 13, 2024
6361d77
equation check
sofiacovarrubias Feb 14, 2024
bc3e4cc
lint
sblunt Feb 23, 2024
56481f7
set integrator nbody keyword
sblunt Feb 23, 2024
f24b70f
make rebound mcmc test faster
sblunt Feb 23, 2024
cbfd819
Merge branch 'v3' into obs-priors
sblunt Feb 29, 2024
0eac480
lint
sblunt Feb 29, 2024
9aeca3e
remove unused import
sblunt Feb 29, 2024
f6b9929
lint
sblunt Feb 29, 2024
98ae257
merge and add test
semaphoreP Feb 29, 2024
b296de1
lint
sblunt Feb 29, 2024
9537e14
orbitize plot for companion RVs, and add more orbits to plot host sta…
chihchunhsu Feb 29, 2024
8b19f16
cut down for clarity
sofiacovarrubias Feb 29, 2024
5e23a70
update notebook with latest changes
sblunt Feb 29, 2024
d267c17
formatting test
sofiacovarrubias Feb 29, 2024
77c8b5e
unit test for obspriors basis
sblunt Feb 29, 2024
6752ede
add ObsPriors basis
sblunt Feb 29, 2024
32681c5
formatting check
sofiacovarrubias Feb 29, 2024
49f5f41
change default plotting size to by smaller and consistent with other …
semaphoreP Feb 29, 2024
b59000f
obsprior now implemented
sblunt Feb 29, 2024
3c2c382
add passing obsprior unit test
sblunt Feb 29, 2024
752db5a
remove unused variable
sblunt Feb 29, 2024
ed674d8
lint
sblunt Feb 29, 2024
3cf2a61
add tp to corner plot labels
sblunt Feb 29, 2024
0275640
fix latex error
sblunt Feb 29, 2024
0ec9957
obsprior syntax is working; just need to run an end-to-end test
sblunt Feb 29, 2024
dd5468f
in progress updates
sblunt Feb 29, 2024
5cf2c9b
add period limits
sblunt Feb 29, 2024
62f1d55
Added RV section
sofiacovarrubias Feb 29, 2024
533653d
document obspriors
sblunt Feb 29, 2024
b3e9829
formatting
sofiacovarrubias Feb 29, 2024
128d0ea
fix tp test bug
sblunt Feb 29, 2024
4062eec
formatting updates
sofiacovarrubias Feb 29, 2024
da3765e
add axes limits
semaphoreP Feb 29, 2024
9bf29ac
add tutorial for plot_residuals into plotting tutorial
semaphoreP Feb 29, 2024
1cf3986
lint
sblunt Feb 29, 2024
f9b00bd
fix Standard to XYZ documentation needs a minor fix #347
sblunt Feb 29, 2024
0260eed
Add to Modifying Priors tutorial
wcroberson Mar 1, 2024
5f19714
update obs priors tutorial
Mar 1, 2024
8386c5c
run tutorial
sblunt Mar 1, 2024
6c922f7
Merge pull request #337 from sblunt/saanika/changes
sblunt Mar 1, 2024
196276e
add residual to v3 changelog
sblunt Mar 1, 2024
537d64a
Merge branch 'obs-priors-tutorial' into obs-priors
sblunt Mar 1, 2024
e921186
working tutorial (with pub-worthy mcmc params)
sblunt Mar 1, 2024
d6eca2c
add example 206 dataset for obspriors tutorial
sblunt Mar 1, 2024
8d6f750
add tp limits for obsprior and add is_correlated flag to prior class
sblunt Mar 1, 2024
beb9347
add some more explanation of syntax to tutorial
sblunt Mar 1, 2024
c8df36e
run the obspriors tutorial
sblunt Mar 1, 2024
7c26aff
run the tutorial for fewer steps
sblunt Mar 1, 2024
2a9b481
Merge branch 'v3' into obs-priors
sblunt Mar 1, 2024
875cd02
add HD206893B data file
clarissardoo Mar 4, 2024
c00975e
negative raoff -> positive
sblunt Mar 7, 2024
860ef62
Add example from Efit5 to with obs priors in tutorial
Mar 8, 2024
bffd022
add abs astrometry tutorial
sblunt Mar 13, 2024
d7108ed
complete tutorial
sblunt Mar 15, 2024
46a2c6d
make dynesty sampler an attribute of NestedSampler
sblunt Mar 15, 2024
271dafe
restrict angle range in nested e2e test
sblunt Mar 15, 2024
758a27a
Merge branch 'v3' into dynesty
sblunt Mar 15, 2024
dad850e
time nested e2e test
sblunt Mar 15, 2024
75b7507
Merge branch 'dynesty' of https://github.com/sblunt/orbitize into dyn…
sblunt Mar 15, 2024
20bf7a9
lint
sblunt Mar 17, 2024
4dd3c2d
fix loguniform prior bug
sblunt Mar 17, 2024
3786cda
protect e2e nested sampler entry point
sblunt Mar 17, 2024
cc3a076
add keyword for passing kwargs into run_nested()
sblunt Mar 17, 2024
6335dc5
add clarissa's image to repo so it displays
sblunt Mar 17, 2024
7dfe1c4
fix bug with loading hipparcos iad from saved run
sblunt Mar 18, 2024
44c9755
Revert "fix bug with loading hipparcos iad from saved run"
sblunt Mar 18, 2024
822b501
Revert "Revert "fix bug with loading hipparcos iad from saved run""
sblunt Mar 18, 2024
1739d5b
fix bug with hipparcos IAD objects loaded from saved file
sblunt Mar 18, 2024
bf81c75
delete rogue print stmt
sblunt Mar 18, 2024
b3567c7
clarify stellar_or_system_mass documentation
sblunt Mar 18, 2024
a4c6ab0
add unit test in response to #351
sblunt Mar 18, 2024
b80e899
fix test bug causing test_abs_astrom test to fail
sblunt Mar 29, 2024
1e1dd5e
fix arg descriptions in nbody docstring
sblunt Apr 5, 2024
d477ca9
Merge branch 'v3' into plot_pl_rvs
sblunt Apr 5, 2024
1d33d93
add unit tests for plotting rvs of secondary
sblunt Apr 5, 2024
ba901c2
fix the plot.py legend issue
chihchunhsu Apr 7, 2024
1c9868b
add numpy random seed to prevent failures in test_OFTI
sblunt Apr 10, 2024
4da8772
add issue 357 fix to changelog
sblunt Apr 10, 2024
04b638c
Merge branch 'v3' into rebound-indexing-bugfix
sblunt Apr 10, 2024
0491dc4
Merge pull request #360 from sblunt/rebound-indexing-bugfix
sblunt Apr 10, 2024
7d94208
add orbitize manual to changelog
sblunt Apr 10, 2024
8a1a284
Merge branch 'v3' into orbitize-manual
sblunt Apr 10, 2024
cc32b67
Merge pull request #362 from sblunt/orbitize-manual
sblunt Apr 10, 2024
02d5ab7
add plot companion RVs to changelog
sblunt Apr 10, 2024
3c0fbd8
Merge pull request #366 from sblunt/plot_pl_rvs
sblunt Apr 10, 2024
3e7e9b1
Merge pull request #364 from wcroberson/main
sblunt Apr 10, 2024
3d5796b
add @wcroberson's documentation updates to changelog
sblunt Apr 10, 2024
6d582c0
wasn't using this file for e2e tests so deleted it
sblunt Apr 10, 2024
1368b1b
Merge pull request #327 from sblunt/dynesty
semaphoreP Apr 11, 2024
c1ad5f0
Merge pull request #363 from sblunt/fix-as-many-small-bugs-as-i-can
semaphoreP Apr 11, 2024
30bcb61
Merge branch 'v3' into obs-priors
sblunt Apr 11, 2024
f675ace
Merge branch 'v3' into obs-priors
sblunt Apr 11, 2024
8c0ca9e
Merge branch 'obs-priors' into fit-arbitrary-abs-astrom
sblunt Apr 11, 2024
0412dc0
Merge pull request #365 from sblunt/obs-priors
sblunt Apr 11, 2024
436a866
add last two v3 changes to changelog!
sblunt Apr 11, 2024
5afbc1a
Merge pull request #356 from sblunt/fit-arbitrary-abs-astrom
sblunt Apr 11, 2024
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
8 changes: 6 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
Expand All @@ -40,5 +40,9 @@ jobs:
run: |
pytest --cov
- name: Coveralls GitHub Action
if: ${{ matrix.python-version }} == '3.12'
uses: coverallsapp/github-action@v2

with:
parallel: true
flag-name: run-$

36 changes: 36 additions & 0 deletions .github/workflows/run-notebooks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test jupyter notebook tutorials

on:
push:
branches:
- main # only rerun tutorials when making PRs or changing main
- v3
pull_request:
branches:
- '*'

jobs:
build:

runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.12"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install jupyter setuptools wheel nbmake
python -m pip install -r requirements.txt
python -m pip install . --no-build-isolation
- name: Run tutorial notebooks
run: |
py.test --nbmake --nbmake-timeout=3000 docs/tutorials/*.ipynb
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ orbitize/example_data/rebound*.csv
orbitize/example_data/*test.hdf5
.vscode/launch.json
.vscode/settings.json
*.DS_Store

# images & storage files generated by tutorials
*.hdf5
!orbitize/example_data/v1_posterior.hdf5
*.fits
*.png
!docs/tutorials/eift_hd206893.png
tests/test_results.h5
tests/multiplanet*test.csv

Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
# Disable notebook timeout
nbsphinx_timeout = -1

# Always re-run notebooks when building docss
nbsphinx_execute = "always"
# Only re-run notebooks that have no outputs
nbsphinx_execute = "auto"

# Allow notebook errors
nbsphinx_allow_errors = False
Expand Down
14 changes: 14 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,24 @@ User Guide:
faq
contributing
api
manual

Changelog:
++++++++++

**3.0.0 (2024-4-11)**

- implementation of Hipparcos-Gaia catalog of accelerations fitting! (@semaphoreP)
- fit arbitrary absolute astrometry (@sblunt)
- implement O'Neil observation-based priors (@sblunt/@clarissardoo)
- discuss MCMC autocorrelation in MCMC tutorial (@michaelkmpoon)
- add time warning if OFTI doesn't accept an orbit in first 60 s (@michaelkmpoon)
- add first parts of orbitize! manual (@sofiacovarrubias/@sblunt)
- bugfix for rebound MCMC fits (issue #357; @sblunt)
- implementation of residual plotting method for orbit plots (@Saanikachoudhary and @semaphoreP)
- plot companion RVs (@chihchunhsu)
- add documentation about referencing issues when modifying priors to tutorial (@wcroberson)

**2.2.2 (2023-06-30)**

- tests now overwrite any generated text files (@sblunt)
Expand Down
128 changes: 128 additions & 0 deletions docs/manual.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
.. _manual:

orbitize! Manual
==============

Intro to ``orbitize!``
+++++++++++++++++

``orbitize!`` hinges on the two-body problem, which describes the paths of two
bodies gravitationally bound to each other as a function of time,
given parameters determining the position and velocity of both objects at a particular epoch.
There are many basis sets (orbital bases) that can be used to describe an orbit,
which can then be solved using Kepler’s equation, but first it is important to be explicit about coordinate systems.

.. Note::
For an interactive visualization to define and help users understand our coordinate system,
you can check out `this GitHub tutorial <https://github.com/sblunt/orbitize/blob/main/docs/tutorials/show-me-the-orbit.ipynb>`_.

There is also a `YouTube video <https://www.youtube.com/watch?v=0e24VUhQmbM>`_
with use and explanation of the coordinate system by Sarah Blunt.

In its “standard” mode, ``orbitize!`` assumes that the user only has relative astrometric data to fit.
In the ``orbitize!`` coordinate system, relative R.A. and declination can be expressed as the following functions
of orbital parameters

.. math::
\Delta R.A. = \pi a(1-ecosE)[cos^2{i\over 2}sin(f+\omega_p+\Omega)-sin^2{i\over 2}sin(f+\omega_p-\Omega)]

\Delta decl. = \pi a(1-ecosE)[cos^2{i\over 2}cos(f+\omega_p+\Omega)+sin^2{i\over 2}cos(f+\omega_p-\Omega)]

where 𝑎, 𝑒, :math:`\omega_p`, Ω, and 𝑖 are orbital parameters, and 𝜋 is the system parallax. f is
the true anomaly, and E is the eccentric anomaly, which are related to elapsed time
through Kepler’s equation and Kepler’s third law

.. math::
M = 2\pi ({t\over P}-(\tau -\tau_{ref}))


.. math::
({P\over yr})^2 =({a\over au})^3({M_\odot \over M_{tot}})

M =E-esinE

f = 2tan^{-1}[\sqrt{{1+e\over 1-e}}tan{E\over 2}]

``orbitize!`` employs two Kepler solvers to convert between mean
and eccentric anomaly: one that is efficient for the highest eccentricities, and Newton’s method, which in other cases is more efficient for solving for the average
orbit. See `Blunt et al. (2020) <https://iopscience.iop.org/article/10.3847/1538-3881/ab6663>`_ for more detail.


From scrutinizing the above sets of equations, one may observe
a few important degeneracies:

1. Individual component masses do not show up anywhere in this equation set.

2. The degeneracy between semimajor axis 𝑎, total mass :math:`𝑀_{tot}`, and
parallax 𝜋. If we just had relative astrometric measurements and no external knowledge of the system parallax,
we would not be able to distinguish between a system
that has larger distance and larger semimajor axis (and therefore larger total mass,
assuming a fixed period) from a system that has smaller distance, smaller semimajor
axis, and smaller total mass.

3. The argument of periastron :math:`\omega_p` and the position angle of nodes Ω.
The above defined R.A. and decl. functions are invariant to the transformation:

.. math::
\omega_p' = \omega_p + \pi

\Omega' = \Omega - \pi

which creates a 180◦ degeneracy between particular values of :math:`\omega_p` and Ω, and
a characteristic “double-peaked” structure in marginalized 1D posteriors of these
parameters.

Solutions to breaking degeneracies 1 and 3 can be found in the next section.


Using Radial Velocities
+++++++++++++++++
In the ``orbitize!`` coordinate system, and relative to the system barycenter, the
radial velocity of the planet due to the gravitational influence of the star is:

.. math::
rv_p(f) = \sqrt{{G\over (1-e^2)}}M_* sini(M_{tot})^{-1/2}a^{-1/2}(cos(\omega_p+f)+ecos\omega_p)

rv_*(f) = \sqrt{{G\over (1-e^2)}}M_p sini(M_{tot})^{-1/2}a^{-1/2}(cos(\omega_*+f)+ecos\omega_*)

where 𝜔∗ is the argument of periastron of the star’s orbit, which is equal to 𝜔𝑝 +
180◦.

In these equations, the individual component masses m𝑝 and m∗ enter. This means
radial velocity measurements break the total mass degeneracy and enable measurements of individual component masses
(“dynamical” masses). However it is crucial to keep in mind that radial velocities of a planet do not enable
dynamical mass measurements of the planet itself, but of the star.
Radial velocity measurements also break the Ω/𝜔 degeneracy discussed in the
previous section, uniquely orienting the orbit in 3D space.

``orbitize!`` can perform joint fits of RV and astrometric data in two different
ways, which have complementary applications.

The first method is automatically triggered when an ``orbitize!`` user inputs radial velocity data.
``orbitize!`` automatically parses the data, sets up an appropriate model,
then runs the user’s Bayesian computation
algorithm of choice to jointly constrain all free parameters in the fit.
``orbitize!`` can handle both primary and secondary RVs, and fits for the appropriate dynamical
masses when RVs are present; when primary RVs are included, ``orbitize!`` fits for
the dynamical masses of secondary objects, and vice versa.
Instrumental nuisance parameters (RV zeropoint offset, 𝛾, and white noise jitter, 𝜎) for each RV instrument
are also included as additional free parameters in the fit if the user specifies different
instrument names in the data file.

The second method of jointly fitting RV and astrometric data in ``orbitize!`` separates out the fitting of
radial velocities and astrometry, enabling a user to fit “one at a
time,” and combine the results in a Bayesian framework. First, a user performs a
fit to just the radial velocity data using, for example, radvel (but can be any radial
velocity orbit-fitting code). The user then feeds the numerical posterior samples
into ``orbitize!`` through the ``orbitize.priors.KDEPrior`` object. This prior
creates a representation of the prior using kernel density estimation
(`kernel density estimation <https://mathisonian.github.io/kde/>`_),
which can then be used to generate random prior samples or compute the prior
probability of a sample orbit. Importantly, this prior preserves covariances between
input parameters, allowing ``orbitize!`` to use an accurate representation of the RV
posterior to constrain the fit. This method can be referred to as the “posteriors as priors”
method, since posteriors output from a RV fitting code are, through KDE sampling,
being applied as priors in ``orbitize!`` .


More coming soon!
2 changes: 2 additions & 0 deletions docs/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ us if you are still confused).
tutorials/Using_nonOrbitize_Posteriors_as_Priors.ipynb
tutorials/Changing_bases_tutorial.ipynb
tutorials/Hipparcos_IAD.ipynb
tutorials/HGCA_tutorial.ipynb
tutorials/abs_astrometry.ipynb



Loading
Loading