diff --git a/galsim/config/process.py b/galsim/config/process.py index e9ce33537c..fe4882feb8 100644 --- a/galsim/config/process.py +++ b/galsim/config/process.py @@ -265,7 +265,7 @@ def Process(config, logger=None, njobs=1, job=1, new_params=None, except_abort=F json.dumps(config, default=lambda o: repr(o), indent=4)) # Warn about any unexpected fields. - unexpected = [ k for k in config if k not in top_level_fields ] + unexpected = [ k for k in config if k not in top_level_fields and k[0] != '_' ] if len(unexpected) > 0 and logger: logger.warning("Warning: config dict contains the following unexpected fields: %s.", unexpected) diff --git a/galsim/config/value_eval.py b/galsim/config/value_eval.py index 0ed5687d82..9294b34daa 100644 --- a/galsim/config/value_eval.py +++ b/galsim/config/value_eval.py @@ -86,7 +86,7 @@ def _GenerateFromEval(config, base, value_type): # These will be the variables to use for evaluating the eval statement. # Start with the current locals and globals, and add extra items to them. - if 'eval_gdict' not in base: + if '_eval_gdict' not in base: gdict = globals().copy() # We allow the following modules to be used in the eval string: exec('import galsim', gdict) @@ -95,9 +95,9 @@ def _GenerateFromEval(config, base, value_type): exec('import numpy as np', gdict) exec('import os', gdict) ImportModules(base, gdict) - base['eval_gdict'] = gdict + base['_eval_gdict'] = gdict else: - gdict = base['eval_gdict'] + gdict = base['_eval_gdict'] if 'str' not in config: raise GalSimConfigError(