From 967a70affeb97925c45f6aed1a522f301eb4b64a Mon Sep 17 00:00:00 2001 From: James Chiang Date: Sun, 4 Jun 2023 21:28:11 -0700 Subject: [PATCH] set att variable so that it's available in all needed contexts --- python/desc/skycatalogs/objects/base_object.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/desc/skycatalogs/objects/base_object.py b/python/desc/skycatalogs/objects/base_object.py index d1db398a..8a10ab15 100644 --- a/python/desc/skycatalogs/objects/base_object.py +++ b/python/desc/skycatalogs/objects/base_object.py @@ -438,8 +438,8 @@ def get_fluxes(self, bandpasses, mjd=None): def get_LSST_flux(self, band, sed=None, cache=True, mjd=None): if not band in LSST_BANDS: return None + att = f'lsst_flux_{band}' if mjd is None: - att = f'lsst_flux_{band}' # Check if it's already an attribute val = getattr(self, att, None) if val is not None: