From 1125b921156f74c7ce1a5de9a84c268c365a3799 Mon Sep 17 00:00:00 2001 From: Sarah Blunt Date: Mon, 19 Aug 2024 12:03:00 -0700 Subject: [PATCH] fix for 0d orbit masking for xyz basis --- orbitize/system.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/orbitize/system.py b/orbitize/system.py index 1da30d3f..ec085ec4 100644 --- a/orbitize/system.py +++ b/orbitize/system.py @@ -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