Converting Settings

These functions are used to convert the settings that have missing data into dictionaries that are filled in with default values for things like data coefficient of variation, eta the log offset, etc.

cascade_at.settings.convert.midpoint_list_from_settings(settings)[source]

Takes the settings configuration for which integrands to midpoint which comes in as measure ID and translates that to integrand enums.

Parameters

settings (SettingsConfig) – The settings configuration to convert from

Return type

List[str]

cascade_at.settings.convert.measures_to_exclude_from_settings(settings)[source]

Gets the measures to exclude from the data from the model settings configuration.

Parameters

settings (SettingsConfig) – The settings configuration to convert from

Return type

List[str]

cascade_at.settings.convert.data_eta_from_settings(settings, default=nan)[source]

Gets the data eta from the settings Configuration. The default data eta is np.nan.

Parameters
  • settings (SettingsConfig) – The settings configuration to convert from

  • default (float) – The default eta to use

Return type

Dict[str, float]

cascade_at.settings.convert.density_from_settings(settings, default='gaussian')[source]

Gets the density from the settings Configuration. The default density is “gaussian”.

Parameters
  • settings (SettingsConfig) – The settings configuration to convert from

  • default (str) – The default data density to use

Return type

Dict[str, str]

cascade_at.settings.convert.data_cv_from_settings(settings, default=0.0)[source]

Gets the data min coefficient of variation from the settings Configuration

Parameters
  • settings (SettingsConfig) – The settings configuration to convert from

  • default (float) – The default data coefficient of variation

Return type

Dict[str, float]

cascade_at.settings.convert.min_cv_from_settings(settings, default=0.0)[source]

Gets the minimum coefficient of variation by rate and level of the cascade from settings. First key is cascade level, second is rate

Parameters
  • settings (SettingsConfig) – The settings configuration from which to pull

  • default (float) – The default min CV to use when not specified

Return type

defaultdict

cascade_at.settings.convert.nu_from_settings(settings, default=nan)[source]

Gets nu from the settings Configuration. The default nu is np.nan.

Parameters
  • settings (SettingsConfig) – The settings configuration from which to pull

  • default (float) – The default nu to use when not specified in the settings

Return type

Dict[str, float]