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

Conversation

sblunt
Copy link
Owner

@sblunt sblunt commented Aug 19, 2024

This line in system.py was causing a failure when we pass in a single orbit. Caught by the changing basis tutorial! I applied a very simple fix of checking if ecc is a float, then if so making it an array for the logical comparison

@sblunt sblunt requested a review from semaphoreP August 19, 2024 19:04
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants