orbcloud 0.1.0__tar.gz → 0.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {orbcloud-0.1.0/src/orbcloud.egg-info → orbcloud-0.1.1}/PKG-INFO +58 -14
- orbcloud-0.1.1/README.md +127 -0
- {orbcloud-0.1.0 → orbcloud-0.1.1}/pyproject.toml +1 -1
- {orbcloud-0.1.0 → orbcloud-0.1.1/src/orbcloud.egg-info}/PKG-INFO +58 -14
- orbcloud-0.1.0/README.md +0 -83
- {orbcloud-0.1.0 → orbcloud-0.1.1}/LICENSE +0 -0
- {orbcloud-0.1.0 → orbcloud-0.1.1}/setup.cfg +0 -0
- {orbcloud-0.1.0 → orbcloud-0.1.1}/src/orbcloud/__init__.py +0 -0
- {orbcloud-0.1.0 → orbcloud-0.1.1}/src/orbcloud/ensemble.py +0 -0
- {orbcloud-0.1.0 → orbcloud-0.1.1}/src/orbcloud/kepler_math.py +0 -0
- {orbcloud-0.1.0 → orbcloud-0.1.1}/src/orbcloud/sim.py +0 -0
- {orbcloud-0.1.0 → orbcloud-0.1.1}/src/orbcloud.egg-info/SOURCES.txt +0 -0
- {orbcloud-0.1.0 → orbcloud-0.1.1}/src/orbcloud.egg-info/dependency_links.txt +0 -0
- {orbcloud-0.1.0 → orbcloud-0.1.1}/src/orbcloud.egg-info/requires.txt +0 -0
- {orbcloud-0.1.0 → orbcloud-0.1.1}/src/orbcloud.egg-info/top_level.txt +0 -0
- {orbcloud-0.1.0 → orbcloud-0.1.1}/tests/test_ensemble.py +0 -0
- {orbcloud-0.1.0 → orbcloud-0.1.1}/tests/test_kepler_math.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: orbcloud
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: 3D orbital probability clouds from simulated exoplanet posteriors
|
|
5
5
|
Author: Oscar Flores Gaitán, Sam Hopper
|
|
6
6
|
License: MIT License
|
|
@@ -44,7 +44,7 @@ Dynamic: license-file
|
|
|
44
44
|
By plotting thousands of low-opacity orbital paths, the overlapping threads naturally highlight the high-probability regions of 3D orbital space, creating a beautiful and physically accurate visualization.
|
|
45
45
|
|
|
46
46
|
> [!TIP]
|
|
47
|
-
> In addition to visualization, `orbcloud` can be useful to rule out possible dynamical instability in the system. Visually mapping the orbital probability clouds allows researchers to quickly identify overlapping orbital regions. This helps save significant time and computational resources by avoiding expensive N-body simulations if a visual inspection already reveals that the system is most likely going to be unstable.
|
|
47
|
+
> In addition to visualization, `orbcloud` can be useful to rule out possible dynamical instability in the system. Visually mapping the orbital probability clouds allows researchers to quickly identify overlapping orbital regions. This helps save significant time and computational resources by avoiding expensive N-body simulations if a visual inspection already reveals that the system is most likely going to be unstable anyway.
|
|
48
48
|
|
|
49
49
|
---
|
|
50
50
|
|
|
@@ -70,42 +70,86 @@ Dependencies: `numpy`, `matplotlib`
|
|
|
70
70
|
|
|
71
71
|
## Quickstart
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
### Step 1: Initialize the System
|
|
74
|
+
Configure the central star's name, mass, and spectral type (e.g. O, B, A, F, G, K, M). By default, a Sun-like star is used.
|
|
74
75
|
|
|
75
76
|
```python
|
|
76
77
|
import matplotlib.pyplot as plt
|
|
77
78
|
from orbcloud import PlanetConfig, SystemEnsemble
|
|
78
79
|
|
|
79
|
-
#
|
|
80
|
-
system = SystemEnsemble(
|
|
80
|
+
# Initialize a system centered around a Sun-like star
|
|
81
|
+
system = SystemEnsemble(star_id='sun')
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Step 2: Configure and Add Planets
|
|
85
|
+
Define the planet's geometric parameters (orbital period, eccentricity, argument of periastron, etc.) using `PlanetConfig`, and add it to the ensemble to simulate the posterior distribution.
|
|
81
86
|
|
|
82
|
-
|
|
87
|
+
```python
|
|
88
|
+
# 1. Inner planet 'b'
|
|
83
89
|
planet_b = PlanetConfig(
|
|
84
|
-
name=
|
|
90
|
+
name='Planet b',
|
|
85
91
|
P_mean=90.0, P_std=8.0,
|
|
86
92
|
omega_mean_deg=60.0, omega_std_deg=40.0,
|
|
87
|
-
e_mean=0.15, e_std=0.09
|
|
93
|
+
e_mean=0.15, e_std=0.09,
|
|
94
|
+
i_deg=0.0, Omega_deg=0.0
|
|
88
95
|
)
|
|
89
96
|
|
|
97
|
+
# 2. Outer planet 'c'
|
|
90
98
|
planet_c = PlanetConfig(
|
|
91
|
-
name=
|
|
99
|
+
name='Planet c',
|
|
92
100
|
P_mean=260.0, P_std=14.0,
|
|
93
101
|
omega_mean_deg=210.0, omega_std_deg=45.0,
|
|
94
|
-
e_mean=0.25, e_std=0.10
|
|
102
|
+
e_mean=0.25, e_std=0.10,
|
|
103
|
+
i_deg=0.0, Omega_deg=0.0
|
|
95
104
|
)
|
|
96
105
|
|
|
97
|
-
#
|
|
106
|
+
# Simulate 1000 posterior paths per planet and compute 3D coordinate clouds
|
|
98
107
|
system.add_planet(planet_b, num_samples=1000)
|
|
99
108
|
system.add_planet(planet_c, num_samples=1000)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Step 3: Visualize the Full Probability Cloud
|
|
112
|
+
By default, `plot_system()` will generate both 2D and 3D subplots side-by-side using the optimized parameter defaults (`alpha_2d=0.02` and `alpha_3d=0.01`).
|
|
100
113
|
|
|
101
|
-
|
|
114
|
+
```python
|
|
115
|
+
# Render both 2D (top-down) and 3D (oblique lateral) views
|
|
102
116
|
system.plot_system(show_reference_plane=True)
|
|
117
|
+
plt.savefig('system_both_views.png', dpi=150, facecolor='white', bbox_inches='tight')
|
|
118
|
+
plt.show()
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+

|
|
122
|
+
|
|
123
|
+
### Step 4: Filtering Planet Visibility or Projection
|
|
124
|
+
If you want to view a single projection (e.g. 2D top-down view only) or isolate a specific planet, pass the `dimension` and `planets_to_show` filters:
|
|
103
125
|
|
|
104
|
-
|
|
105
|
-
|
|
126
|
+
```python
|
|
127
|
+
# Render 2D top view only for Planet b
|
|
128
|
+
system.plot_system(dimension='2d', planets_to_show=['Planet b'])
|
|
129
|
+
plt.savefig('planet_b_2d_only.png', dpi=150, facecolor='white', bbox_inches='tight')
|
|
130
|
+
plt.show()
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+

|
|
134
|
+
|
|
135
|
+
### Step 5: Defining a Custom Star
|
|
136
|
+
You can configure the central star's size, glow, and color dynamically using real-world reference stars (e.g. "Vega", "Barnard's Star", or "Theta1 Orionis C"):
|
|
137
|
+
|
|
138
|
+
```python
|
|
139
|
+
# Initialize a system centered around a custom massive O-type star (Theta1 Orionis C)
|
|
140
|
+
system_custom = SystemEnsemble(star_id='theta1')
|
|
141
|
+
|
|
142
|
+
# Add the inner planet 'b'
|
|
143
|
+
system_custom.add_planet(planet_b, num_samples=1000)
|
|
144
|
+
|
|
145
|
+
# Plot the system to see the custom blue central star!
|
|
146
|
+
system_custom.plot_system(show_reference_plane=True)
|
|
147
|
+
plt.savefig('custom_star_both_views.png', dpi=150, facecolor='white', bbox_inches='tight')
|
|
106
148
|
plt.show()
|
|
107
149
|
```
|
|
108
150
|
|
|
151
|
+

|
|
152
|
+
|
|
109
153
|
---
|
|
110
154
|
|
|
111
155
|
## Development & Testing
|
orbcloud-0.1.1/README.md
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# orbcloud
|
|
2
|
+
|
|
3
|
+
`orbcloud` is a Python package designed to transform simulated exoplanet parameter posteriors (such as MCMC chains) into physical 3D orbital probability density clouds.
|
|
4
|
+
|
|
5
|
+
By plotting thousands of low-opacity orbital paths, the overlapping threads naturally highlight the high-probability regions of 3D orbital space, creating a beautiful and physically accurate visualization.
|
|
6
|
+
|
|
7
|
+
> [!TIP]
|
|
8
|
+
> In addition to visualization, `orbcloud` can be useful to rule out possible dynamical instability in the system. Visually mapping the orbital probability clouds allows researchers to quickly identify overlapping orbital regions. This helps save significant time and computational resources by avoiding expensive N-body simulations if a visual inspection already reveals that the system is most likely going to be unstable anyway.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Features
|
|
13
|
+
|
|
14
|
+
- **Vectorized Kepler Solver**: Vectorized Newton-Raphson solver to compute eccentric and true anomalies over custom phase grids.
|
|
15
|
+
- **Physical Star Customization**: Built-in star properties database (e.g. Vega, Barnard's Star) that automatically adjusts the size and glowing spectral color of the central star.
|
|
16
|
+
- **Top (2D) & Lateral (3D) Views**: Easily render orbits in 2D, 3D, or side-by-side.
|
|
17
|
+
- **Transparent Alpha-Clouds**: Line-by-line low opacity (`alpha=0.02`) plots that naturally map the probability clouds.
|
|
18
|
+
- **Robust Parameter Validation**: Informative alert messages and correction suggestions to prevent unphysical values (e.g. eccentricity $\ge 1.0$) or solver failures.
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## Installation
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pip install orbcloud
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Dependencies: `numpy`, `matplotlib`
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## Quickstart
|
|
33
|
+
|
|
34
|
+
### Step 1: Initialize the System
|
|
35
|
+
Configure the central star's name, mass, and spectral type (e.g. O, B, A, F, G, K, M). By default, a Sun-like star is used.
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
import matplotlib.pyplot as plt
|
|
39
|
+
from orbcloud import PlanetConfig, SystemEnsemble
|
|
40
|
+
|
|
41
|
+
# Initialize a system centered around a Sun-like star
|
|
42
|
+
system = SystemEnsemble(star_id='sun')
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
### Step 2: Configure and Add Planets
|
|
46
|
+
Define the planet's geometric parameters (orbital period, eccentricity, argument of periastron, etc.) using `PlanetConfig`, and add it to the ensemble to simulate the posterior distribution.
|
|
47
|
+
|
|
48
|
+
```python
|
|
49
|
+
# 1. Inner planet 'b'
|
|
50
|
+
planet_b = PlanetConfig(
|
|
51
|
+
name='Planet b',
|
|
52
|
+
P_mean=90.0, P_std=8.0,
|
|
53
|
+
omega_mean_deg=60.0, omega_std_deg=40.0,
|
|
54
|
+
e_mean=0.15, e_std=0.09,
|
|
55
|
+
i_deg=0.0, Omega_deg=0.0
|
|
56
|
+
)
|
|
57
|
+
|
|
58
|
+
# 2. Outer planet 'c'
|
|
59
|
+
planet_c = PlanetConfig(
|
|
60
|
+
name='Planet c',
|
|
61
|
+
P_mean=260.0, P_std=14.0,
|
|
62
|
+
omega_mean_deg=210.0, omega_std_deg=45.0,
|
|
63
|
+
e_mean=0.25, e_std=0.10,
|
|
64
|
+
i_deg=0.0, Omega_deg=0.0
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
# Simulate 1000 posterior paths per planet and compute 3D coordinate clouds
|
|
68
|
+
system.add_planet(planet_b, num_samples=1000)
|
|
69
|
+
system.add_planet(planet_c, num_samples=1000)
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Step 3: Visualize the Full Probability Cloud
|
|
73
|
+
By default, `plot_system()` will generate both 2D and 3D subplots side-by-side using the optimized parameter defaults (`alpha_2d=0.02` and `alpha_3d=0.01`).
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
# Render both 2D (top-down) and 3D (oblique lateral) views
|
|
77
|
+
system.plot_system(show_reference_plane=True)
|
|
78
|
+
plt.savefig('system_both_views.png', dpi=150, facecolor='white', bbox_inches='tight')
|
|
79
|
+
plt.show()
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+

|
|
83
|
+
|
|
84
|
+
### Step 4: Filtering Planet Visibility or Projection
|
|
85
|
+
If you want to view a single projection (e.g. 2D top-down view only) or isolate a specific planet, pass the `dimension` and `planets_to_show` filters:
|
|
86
|
+
|
|
87
|
+
```python
|
|
88
|
+
# Render 2D top view only for Planet b
|
|
89
|
+
system.plot_system(dimension='2d', planets_to_show=['Planet b'])
|
|
90
|
+
plt.savefig('planet_b_2d_only.png', dpi=150, facecolor='white', bbox_inches='tight')
|
|
91
|
+
plt.show()
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+

|
|
95
|
+
|
|
96
|
+
### Step 5: Defining a Custom Star
|
|
97
|
+
You can configure the central star's size, glow, and color dynamically using real-world reference stars (e.g. "Vega", "Barnard's Star", or "Theta1 Orionis C"):
|
|
98
|
+
|
|
99
|
+
```python
|
|
100
|
+
# Initialize a system centered around a custom massive O-type star (Theta1 Orionis C)
|
|
101
|
+
system_custom = SystemEnsemble(star_id='theta1')
|
|
102
|
+
|
|
103
|
+
# Add the inner planet 'b'
|
|
104
|
+
system_custom.add_planet(planet_b, num_samples=1000)
|
|
105
|
+
|
|
106
|
+
# Plot the system to see the custom blue central star!
|
|
107
|
+
system_custom.plot_system(show_reference_plane=True)
|
|
108
|
+
plt.savefig('custom_star_both_views.png', dpi=150, facecolor='white', bbox_inches='tight')
|
|
109
|
+
plt.show()
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+

|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Development & Testing
|
|
117
|
+
|
|
118
|
+
Run unit tests via `pytest`:
|
|
119
|
+
```bash
|
|
120
|
+
python3 -m pytest -v
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## License
|
|
126
|
+
|
|
127
|
+
This project is licensed under the MIT License.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: orbcloud
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.1
|
|
4
4
|
Summary: 3D orbital probability clouds from simulated exoplanet posteriors
|
|
5
5
|
Author: Oscar Flores Gaitán, Sam Hopper
|
|
6
6
|
License: MIT License
|
|
@@ -44,7 +44,7 @@ Dynamic: license-file
|
|
|
44
44
|
By plotting thousands of low-opacity orbital paths, the overlapping threads naturally highlight the high-probability regions of 3D orbital space, creating a beautiful and physically accurate visualization.
|
|
45
45
|
|
|
46
46
|
> [!TIP]
|
|
47
|
-
> In addition to visualization, `orbcloud` can be useful to rule out possible dynamical instability in the system. Visually mapping the orbital probability clouds allows researchers to quickly identify overlapping orbital regions. This helps save significant time and computational resources by avoiding expensive N-body simulations if a visual inspection already reveals that the system is most likely going to be unstable.
|
|
47
|
+
> In addition to visualization, `orbcloud` can be useful to rule out possible dynamical instability in the system. Visually mapping the orbital probability clouds allows researchers to quickly identify overlapping orbital regions. This helps save significant time and computational resources by avoiding expensive N-body simulations if a visual inspection already reveals that the system is most likely going to be unstable anyway.
|
|
48
48
|
|
|
49
49
|
---
|
|
50
50
|
|
|
@@ -70,42 +70,86 @@ Dependencies: `numpy`, `matplotlib`
|
|
|
70
70
|
|
|
71
71
|
## Quickstart
|
|
72
72
|
|
|
73
|
-
|
|
73
|
+
### Step 1: Initialize the System
|
|
74
|
+
Configure the central star's name, mass, and spectral type (e.g. O, B, A, F, G, K, M). By default, a Sun-like star is used.
|
|
74
75
|
|
|
75
76
|
```python
|
|
76
77
|
import matplotlib.pyplot as plt
|
|
77
78
|
from orbcloud import PlanetConfig, SystemEnsemble
|
|
78
79
|
|
|
79
|
-
#
|
|
80
|
-
system = SystemEnsemble(
|
|
80
|
+
# Initialize a system centered around a Sun-like star
|
|
81
|
+
system = SystemEnsemble(star_id='sun')
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Step 2: Configure and Add Planets
|
|
85
|
+
Define the planet's geometric parameters (orbital period, eccentricity, argument of periastron, etc.) using `PlanetConfig`, and add it to the ensemble to simulate the posterior distribution.
|
|
81
86
|
|
|
82
|
-
|
|
87
|
+
```python
|
|
88
|
+
# 1. Inner planet 'b'
|
|
83
89
|
planet_b = PlanetConfig(
|
|
84
|
-
name=
|
|
90
|
+
name='Planet b',
|
|
85
91
|
P_mean=90.0, P_std=8.0,
|
|
86
92
|
omega_mean_deg=60.0, omega_std_deg=40.0,
|
|
87
|
-
e_mean=0.15, e_std=0.09
|
|
93
|
+
e_mean=0.15, e_std=0.09,
|
|
94
|
+
i_deg=0.0, Omega_deg=0.0
|
|
88
95
|
)
|
|
89
96
|
|
|
97
|
+
# 2. Outer planet 'c'
|
|
90
98
|
planet_c = PlanetConfig(
|
|
91
|
-
name=
|
|
99
|
+
name='Planet c',
|
|
92
100
|
P_mean=260.0, P_std=14.0,
|
|
93
101
|
omega_mean_deg=210.0, omega_std_deg=45.0,
|
|
94
|
-
e_mean=0.25, e_std=0.10
|
|
102
|
+
e_mean=0.25, e_std=0.10,
|
|
103
|
+
i_deg=0.0, Omega_deg=0.0
|
|
95
104
|
)
|
|
96
105
|
|
|
97
|
-
#
|
|
106
|
+
# Simulate 1000 posterior paths per planet and compute 3D coordinate clouds
|
|
98
107
|
system.add_planet(planet_b, num_samples=1000)
|
|
99
108
|
system.add_planet(planet_c, num_samples=1000)
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Step 3: Visualize the Full Probability Cloud
|
|
112
|
+
By default, `plot_system()` will generate both 2D and 3D subplots side-by-side using the optimized parameter defaults (`alpha_2d=0.02` and `alpha_3d=0.01`).
|
|
100
113
|
|
|
101
|
-
|
|
114
|
+
```python
|
|
115
|
+
# Render both 2D (top-down) and 3D (oblique lateral) views
|
|
102
116
|
system.plot_system(show_reference_plane=True)
|
|
117
|
+
plt.savefig('system_both_views.png', dpi=150, facecolor='white', bbox_inches='tight')
|
|
118
|
+
plt.show()
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+

|
|
122
|
+
|
|
123
|
+
### Step 4: Filtering Planet Visibility or Projection
|
|
124
|
+
If you want to view a single projection (e.g. 2D top-down view only) or isolate a specific planet, pass the `dimension` and `planets_to_show` filters:
|
|
103
125
|
|
|
104
|
-
|
|
105
|
-
|
|
126
|
+
```python
|
|
127
|
+
# Render 2D top view only for Planet b
|
|
128
|
+
system.plot_system(dimension='2d', planets_to_show=['Planet b'])
|
|
129
|
+
plt.savefig('planet_b_2d_only.png', dpi=150, facecolor='white', bbox_inches='tight')
|
|
130
|
+
plt.show()
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+

|
|
134
|
+
|
|
135
|
+
### Step 5: Defining a Custom Star
|
|
136
|
+
You can configure the central star's size, glow, and color dynamically using real-world reference stars (e.g. "Vega", "Barnard's Star", or "Theta1 Orionis C"):
|
|
137
|
+
|
|
138
|
+
```python
|
|
139
|
+
# Initialize a system centered around a custom massive O-type star (Theta1 Orionis C)
|
|
140
|
+
system_custom = SystemEnsemble(star_id='theta1')
|
|
141
|
+
|
|
142
|
+
# Add the inner planet 'b'
|
|
143
|
+
system_custom.add_planet(planet_b, num_samples=1000)
|
|
144
|
+
|
|
145
|
+
# Plot the system to see the custom blue central star!
|
|
146
|
+
system_custom.plot_system(show_reference_plane=True)
|
|
147
|
+
plt.savefig('custom_star_both_views.png', dpi=150, facecolor='white', bbox_inches='tight')
|
|
106
148
|
plt.show()
|
|
107
149
|
```
|
|
108
150
|
|
|
151
|
+

|
|
152
|
+
|
|
109
153
|
---
|
|
110
154
|
|
|
111
155
|
## Development & Testing
|
orbcloud-0.1.0/README.md
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
# orbcloud
|
|
2
|
-
|
|
3
|
-
`orbcloud` is a Python package designed to transform simulated exoplanet parameter posteriors (such as MCMC chains) into physical 3D orbital probability density clouds.
|
|
4
|
-
|
|
5
|
-
By plotting thousands of low-opacity orbital paths, the overlapping threads naturally highlight the high-probability regions of 3D orbital space, creating a beautiful and physically accurate visualization.
|
|
6
|
-
|
|
7
|
-
> [!TIP]
|
|
8
|
-
> In addition to visualization, `orbcloud` can be useful to rule out possible dynamical instability in the system. Visually mapping the orbital probability clouds allows researchers to quickly identify overlapping orbital regions. This helps save significant time and computational resources by avoiding expensive N-body simulations if a visual inspection already reveals that the system is most likely going to be unstable.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## Features
|
|
13
|
-
|
|
14
|
-
- **Vectorized Kepler Solver**: Vectorized Newton-Raphson solver to compute eccentric and true anomalies over custom phase grids.
|
|
15
|
-
- **Physical Star Customization**: Built-in star properties database (e.g. Vega, Barnard's Star) that automatically adjusts the size and glowing spectral color of the central star.
|
|
16
|
-
- **Top (2D) & Lateral (3D) Views**: Easily render orbits in 2D, 3D, or side-by-side.
|
|
17
|
-
- **Transparent Alpha-Clouds**: Line-by-line low opacity (`alpha=0.02`) plots that naturally map the probability clouds.
|
|
18
|
-
- **Robust Parameter Validation**: Informative alert messages and correction suggestions to prevent unphysical values (e.g. eccentricity $\ge 1.0$) or solver failures.
|
|
19
|
-
|
|
20
|
-
---
|
|
21
|
-
|
|
22
|
-
## Installation
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
pip install orbcloud
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Dependencies: `numpy`, `matplotlib`
|
|
29
|
-
|
|
30
|
-
---
|
|
31
|
-
|
|
32
|
-
## Quickstart
|
|
33
|
-
|
|
34
|
-
Here is how to set up and render a multi-planet system:
|
|
35
|
-
|
|
36
|
-
```python
|
|
37
|
-
import matplotlib.pyplot as plt
|
|
38
|
-
from orbcloud import PlanetConfig, SystemEnsemble
|
|
39
|
-
|
|
40
|
-
# 1. Initialize the system around a customized star (e.g. M-type dwarf)
|
|
41
|
-
system = SystemEnsemble(star_name="Custom Star", star_mass=1.6, star_type="M")
|
|
42
|
-
|
|
43
|
-
# 2. Configure planets with mean parameters and uncertainties
|
|
44
|
-
planet_b = PlanetConfig(
|
|
45
|
-
name="Planet b",
|
|
46
|
-
P_mean=90.0, P_std=8.0,
|
|
47
|
-
omega_mean_deg=60.0, omega_std_deg=40.0,
|
|
48
|
-
e_mean=0.15, e_std=0.09
|
|
49
|
-
)
|
|
50
|
-
|
|
51
|
-
planet_c = PlanetConfig(
|
|
52
|
-
name="Planet c",
|
|
53
|
-
P_mean=260.0, P_std=14.0,
|
|
54
|
-
omega_mean_deg=210.0, omega_std_deg=45.0,
|
|
55
|
-
e_mean=0.25, e_std=0.10
|
|
56
|
-
)
|
|
57
|
-
|
|
58
|
-
# 3. Add planets to simulate posterior distributions and pre-compute 3D coordinates
|
|
59
|
-
system.add_planet(planet_b, num_samples=1000)
|
|
60
|
-
system.add_planet(planet_c, num_samples=1000)
|
|
61
|
-
|
|
62
|
-
# 4. Plot 2D and 3D clouds side-by-side
|
|
63
|
-
system.plot_system(show_reference_plane=True)
|
|
64
|
-
|
|
65
|
-
# 5. Save the result
|
|
66
|
-
plt.savefig("system_plot.png", dpi=150, facecolor="white", bbox_inches="tight")
|
|
67
|
-
plt.show()
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
---
|
|
71
|
-
|
|
72
|
-
## Development & Testing
|
|
73
|
-
|
|
74
|
-
Run unit tests via `pytest`:
|
|
75
|
-
```bash
|
|
76
|
-
python3 -m pytest -v
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
---
|
|
80
|
-
|
|
81
|
-
## License
|
|
82
|
-
|
|
83
|
-
This project is licensed under the MIT License.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|