Skip to content

Commit

Permalink
Merge pull request #274 from sblunt/fix-track-pl-perturbs-setting
Browse files Browse the repository at this point in the history
address #248
  • Loading branch information
sblunt committed Sep 4, 2021
2 parents a9ce3f0 + 7d4c223 commit c953cf7
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions orbitize/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,17 @@ def __init__(self, num_secondary_bodies, data_table, stellar_mass,
np.intersect1d(self.body_indices[body_num], rv_indices)
)

# we should track the influence of the planet(s) on each other/the star if we are not fitting massless planets and
# we are not fitting relative astrometry of just a single body
self.track_planet_perturbs = self.fit_secondary_mass and \
((len(self.radec[1]) + len(self.seppa[1]) + len(self.rv[1]) < len(data_table)) or \
(self.num_secondary_bodies > 1))
# we should track the influence of the planet(s) on each other/the star if:
# we are not fitting massless planets and
# we have more than 1 companion OR we have stellar astrometry
self.track_planet_perturbs = (
self.fit_secondary_mass and
(
(len(self.radec[0]) + len(self.seppa[0] > 0) or
(self.num_secondary_bodies > 1)
)
)
)

if self.hipparcos_IAD is not None:
self.track_planet_perturbs = True
Expand Down Expand Up @@ -285,8 +291,6 @@ def compute_all_orbits(self, params_arr, epochs=None, comp_rebound=False):
masses = np.zeros((self.num_secondary_bodies + 1, n_orbits))
mtots = np.zeros((self.num_secondary_bodies + 1, n_orbits))

total_rv0 = 0

if comp_rebound or self.use_rebound:

sma = params_arr[self.sma_indx]
Expand Down

0 comments on commit c953cf7

Please sign in to comment.