mergepars#

class mergepars(*args, _copy=False, **kwargs)[source]#

Merge all parameter dictionaries into a single dictionary with nested merging. This is used to initialize the SimPars class with all relevant parameters.

Unlike sc.mergedicts, this function recursively merges nested dictionaries instead of replacing them entirely. This allows partial dictionary specifications in calibration parameters (e.g., only specifying preference values in spacing_pref while preserving interval, n_bins, months from defaults).

Parameters:
  • _copy (bool) – whether to deep copy the input dictionaries (default False, same as sc.mergedicts)

  • *args – dictionaries to merge

  • **kwargs – additional parameters (for compatibility with sc.mergedicts)