astropy:docs

format_parameter_keys

halotools.occupation_helpers.format_parameter_keys(input_parameter_dict, correct_initial_keys, gal_type, key_prefix=None)[source] [edit on github]

Simple method that tests whether the input keys are correct, and if so, appends the key names with the galaxy type that they pertain to.

Parameters:

input_parameter_dict : dictionary

dictionary of parameters being used by the component model.

correct_initial_keys : list

list of strings providing the correct set of keys that input_parameter_dict should have.

gal_type : string

Galaxy type of the population being modeled by the component model. This string will be appended to each key, with a leading underscore.

key_prefix : string, optional

If not None, key_prefix will be prepended to each dictionary key with a trailing underscore.

Returns:

output_parameter_dict : dictionary

Provided that the keys of input_parameter_dict are correct, the output dictionary will be identical to the input, except now each key has the gal_type string appended to it.

Page Contents