Skip to content

Commit

Permalink
Added GalSim 2.0+ compatibility for the field _input_objs when usin…
Browse files Browse the repository at this point in the history
…g proxy catalogs.
  • Loading branch information
sweverett committed Jan 2, 2019
1 parent 4da8d5b commit b3cfbaf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion balrog/balrog_injection.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,11 @@ def generate_stars(self, config, realization):

# Make proxy catalog
galsim.config.ProcessInput(gs_config)
cat_proxy = gs_config['input_objs'][input_type][0]
try:
cat_proxy = gs_config['input_objs'][input_type][0]
except KeyError:
# The field name changed in GalSim 2.0+
cat_proxy = gs_config['_input_objs'][input_type][0]

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

0 comments on commit b3cfbaf

Please sign in to comment.