diff --git a/src/gaiaunlimited/selectionfunctions/subsample.py b/src/gaiaunlimited/selectionfunctions/subsample.py index 775d573..ef4d532 100644 --- a/src/gaiaunlimited/selectionfunctions/subsample.py +++ b/src/gaiaunlimited/selectionfunctions/subsample.py @@ -575,8 +575,8 @@ def finalize(self, pp, ci_lo=None, ci_hi=None): if key == 'healpix': continue coords[key + '_'] = np.arange(val[0], val[1], val[2]) - print("\n* finalize") - print("coords =", coords) + #print("\n* finalize") + #print("coords =", coords) self.hds = [] #hplevel = self.hplevel_and_binning['healpix'] @@ -622,7 +622,8 @@ def query(self, coords, hplevel=-1, return_confidence=False, fill_nan=False, **k ipix = xr.DataArray(np.atleast_1d(ipix)) d = {} - for k in self.factors: + factors = set(self.hds[hplevel]['logitp'].dims) - set({'ipix'}) + for k in factors: if k not in kwargs: raise ValueError(f"{k} values are missing.") d[k] = xr.DataArray(np.atleast_1d(kwargs[k]))