Skip to content

Commit b3cfbaf

Browse files
committed
Added GalSim 2.0+ compatibility for the field _input_objs when using proxy catalogs.
1 parent 4da8d5b commit b3cfbaf

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

balrog/balrog_injection.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,11 @@ def generate_stars(self, config, realization):
475475

476476
# Make proxy catalog
477477
galsim.config.ProcessInput(gs_config)
478-
cat_proxy = gs_config['input_objs'][input_type][0]
478+
try:
479+
cat_proxy = gs_config['input_objs'][input_type][0]
480+
except KeyError:
481+
# The field name changed in GalSim 2.0+
482+
cat_proxy = gs_config['_input_objs'][input_type][0]
479483

480484
# pudb.set_trace()
481485
# If all stars in Sahar's catalogs were guaranteed to be in the

0 commit comments

Comments
 (0)