Godtone
Joined 17 December 2020
→My Python 3 code: fix & better explain code & make more flexible |
|||
| Line 1,383: | Line 1,383: | ||
# this gives much sparser but also much more interesting lists. | # this gives much sparser but also much more interesting lists. | ||
# default weighting of an interval x is proportional to its odd-limit complexity iv_complexity(x). | # default weighting of an interval x is proportional to its odd-limit complexity iv_complexity(x). | ||
def strict_optimal_edo_sequence(ivs, | def strict_optimal_edo_sequence(ivs,edo_set=range(2,311+2),weighting=lambda x: iv_complexity(x),combine='avg'): | ||
return optimal_edo_sequence(lambda edo: et_badness(ivs,edo,lambda rel_err,x,et2: rel_err**2,weighting,combine), | return optimal_edo_sequence(lambda edo: et_badness(ivs,edo,lambda rel_err,x,et2: rel_err**2,weighting,combine),edo_set) | ||
</syntaxhighlight> | </syntaxhighlight> | ||