Skip to content

Commit

Permalink
polish x-limit code and make the setting changeable
Browse files Browse the repository at this point in the history
  • Loading branch information
nikohansen committed Nov 24, 2021
1 parent 3cd31d1 commit f5289e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions code-postprocessing/cocopp/compall/pprldmany.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
PlotType = ppfig.enum('ALG', 'DIM', 'FUNC')

displaybest = True
x_limit = genericsettings.x_limit_pprldmany
divide_by_dimension = True
annotation_line_end_relative = 1.11 # lines between graph and annotation
annotation_space_end_relative = 1.24 # figure space end relative to x_limit
Expand Down Expand Up @@ -197,6 +196,7 @@ def plotdata(data, maxval=None, maxevals=None, CrE=0., **kwargs):
:param kwargs: optional arguments provided to plot function.
"""
x_limit = genericsettings.xlimit_pprldmany

# Expect data to be a ndarray.
x = data[np.isnan(data) == False] # Take away the nans
Expand Down Expand Up @@ -566,8 +566,8 @@ def main(dictAlg, order=None, outputdir='.', info='default',
:param str parentHtmlFileName: defines the parent html page
"""
global x_limit
global divide_by_dimension # not fully implemented/tested yet
x_limit = genericsettings.xlimit_pprldmany

tmp = pp.dictAlgByDim(dictAlg)
algorithms_with_data = [a for a in dictAlg.keys() if dictAlg[a] != []]
Expand Down
8 changes: 5 additions & 3 deletions code-postprocessing/cocopp/genericsettings.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,11 @@
target_runlength = 10 # used in ppfigs.main
single_runlength_factors = [0.5, 1.2, 3, 10] + [10 ** i for i in range(2, 12)] # used in pprldistr

xlimit_expensive = 1e3 # used in
xlimit_pprldmany = 1e7
"""maximal run length used in pprldmany, noisy: rather 1e8
maybe better: 10 * genericsettings.evaluation_setting[1]"""
xlimit_expensive = 1e3
"""maximal run length in expensive setting, used in config for pprldmany and ppfigdim"""
#tableconstant_target_function_values = (
#1e1, 1e0, 1e-1, 1e-3, 1e-5, 1e-7) # used as input for pptables.main in rungenericmany
# tableconstant_target_function_values = (1e3, 1e2, 1e1, 1, 1e-1, 1e-2, 1e-3, 1e-4, 1e-5, 1e-7) # for post-workshop landscape tables
Expand Down Expand Up @@ -323,5 +327,3 @@
isPickled = False # only affects rungeneric1
##
isScatter = True # only affects rungenericmany

x_limit_pprldmany = 1e7 # better: 10 * genericsettings.evaluation_setting[1], noisy: 1e8, otherwise: 1e7. maximal run length shown

0 comments on commit f5289e3

Please sign in to comment.