module documentation

This module is an attempt for a global configuration file for various parameters.

The import of this module changes default settings (attributes) of other modules. This works, because each module has only one instance.

Before this module is imported somewhere, modules use their default settings.

This file could be dynamically modified and reloaded.

See also genericsettings which is a central place to define settings used by other modules, but does not modify settings of other modules.

Function config called from a high level, e.g. rungeneric, to configure the lower level modules via modifying parameter settings.
Function config_line_styles configure genericsettings.line_styles for a parameter sweet
Function config_target_values_setting manage target values setting in "expensive" optimization scenario.
Function main Undocumented
Function map_indices_to_line_styles helper function for config_line_styles.
Function sorted_line_styles use the sorting of names up until and including a float to rearrange styles.
Variable gs Undocumented
Variable gs_spec Undocumented
Function _index_after_parameter return the first index after a sequence indicating a positive float.
Function _str_to_colormap return a color iterator from a string like 'plasma.1.8'
def config(suite_name=None):

called from a high level, e.g. rungeneric, to configure the lower level modules via modifying parameter settings.

def config_line_styles():

configure genericsettings.line_styles for a parameter sweet

if parameter_sweep is given on input. The colormap and range can be changed via the --parameter_sweep_colormaps= value. The default value is 'plasma.0.9', viable alternatives are 'viridis' or 'gnuplot2.0.85' or a comma separated joined sequence of any of these, same color sweeps are 'Greens_r..7', 'Greys_r..7', 'Reds_r..7'.

The sorting of the input arguments up to and including a float value in the name determines the positioning in the color map.

Minor: The line_style_mapping attribute of genericsettings can be used to chose the marker and line style like {input_position: position_in_original_line_styles}. When input_position is not present, the usual marker line style combination is used matching input_position.

TODO: we may want to keep the original symbol colors?

def config_target_values_setting(is_expensive, is_runlength_based):

manage target values setting in "expensive" optimization scenario.

def main():

Undocumented

def map_indices_to_line_styles(names):

helper function for config_line_styles.

Map each index of names to the index of the first appearence of the name, where equality of names is determined starting from after a float number (which represents a parameter value) using _index_after_parameter.

def sorted_line_styles(styles, names, indices):

use the sorting of names up until and including a float to rearrange styles.

This assumes that the names[indices] correspond to styles[indices] and that styles[indices] (colormap) are in increasing order on input. On output, sorted_styles are in increasing order w.r.t. the sorting of names[indices].

gs =

Undocumented

gs_spec =

Undocumented

def _index_after_parameter(name, return_first_digit_index=False):

return the first index after a sequence indicating a positive float.

In particular, 1.23 or 1.2e-3 are correctly identified as a float.

If return_first_digit_index, the index of the first digit is returned instead of the first index after the float.

def _str_to_colormap(s, len_):

return a color iterator from a string like 'plasma.1.8'