Skip to content

Commit

Permalink
fix for 0d orbit masking for xyz basis
Browse files Browse the repository at this point in the history
  • Loading branch information
sblunt committed Aug 19, 2024
1 parent 402b78c commit 1125b92
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion orbitize/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,9 @@ def compute_all_orbits(self, params_arr, epochs=None, comp_rebound=False):

if self.fitting_basis == "XYZ":
# Find and filter out unbound orbits
bad_orbits = np.where(np.logical_or(ecc >= 1.0, ecc < 0.0))[0]
if ecc.size == 1:
ecc_as_array = np.array([ecc])
bad_orbits = np.where(np.logical_or(ecc_as_array >= 1.0, ecc_as_array < 0.0))[0]
if bad_orbits.size != 0:
raoff[:, :, bad_orbits] = np.inf
deoff[:, :, bad_orbits] = np.inf
Expand Down

0 comments on commit 1125b92

Please sign in to comment.