Skip to content

Commit

Permalink
Merge pull request #131 from sblunt/fixomegabounds
Browse files Browse the repository at this point in the history
fixed a bug that was affecting setting bounds on Omega and omega when there is no RV data
  • Loading branch information
sblunt committed Aug 18, 2019
2 parents d41b4d7 + f2b6245 commit 95033a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions orbitize/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class System(object):
mass_err (float, optional): uncertainty on ``stellar_mass``, in M_sol
plx_err (float, optional): uncertainty on ``plx``, in mas
restrict_angle_ranges (bool, optional): if True, restrict the ranges
of the position angle of nodes and argument of periastron to [0,180)
of the position angle of nodes to [0,180)
to get rid of symmetric double-peaks for imaging-only datasets.
tau_ref_epoch (float, optional): reference epoch for defining tau (MJD).
Default is 58849 (Jan 1, 2020).
Expand Down Expand Up @@ -91,8 +91,8 @@ def __init__(self, num_secondary_bodies, data_table, stellar_mass,
np.intersect1d(self.body_indices[body_num], seppa_indices)
)


if (len(radec_indices) + len(seppa_indices) == len(self.data_table)) and (restrict_angle_ranges is None):
if (len(radec_indices[0]) + len(seppa_indices[0]) == len(self.data_table)) and (restrict_angle_ranges is None):
print("No RV in data table: We are restricting the longitude of ascending node to [0,pi]")
restrict_angle_ranges = True

if restrict_angle_ranges:
Expand All @@ -118,7 +118,7 @@ def __init__(self, num_secondary_bodies, data_table, stellar_mass,
self.labels.append('inc{}'.format(body+1))

# Add argument of periastron prior
self.sys_priors.append(priors.UniformPrior(0.,angle_upperlim))
self.sys_priors.append(priors.UniformPrior(0.,2.*np.pi))
self.labels.append('aop{}'.format(body+1))

# Add position angle of nodes prior
Expand Down

0 comments on commit 95033a5

Please sign in to comment.