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

fix for 0d orbit masking for xyz basis #375

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
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
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]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what happens when ecc.size != 1? I don't see ecc_as_array to be defined in that case.

if bad_orbits.size != 0:
raoff[:, :, bad_orbits] = np.inf
deoff[:, :, bad_orbits] = np.inf
Expand Down
Loading