Skip to content

Commit

Permalink
Feature: Improve hardcoded maximum number of terms
Browse files Browse the repository at this point in the history
  • Loading branch information
bertrand-caron committed Oct 12, 2018
1 parent 6381dfc commit 63ae660
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def in_degrees(list_of_terms: List[Term]) -> List[Term]:
def in_radians(list_of_terms: List[Term]) -> List[Term]:
return [Term(n / (2 * pi / 360.), k_n, term_type) for (n, k_n, term_type) in list_of_terms]

MAX_NUM_TERMS = 6
MAX_NUM_TERMS = 12

WEIGHTED_RMSD, UNWEIGHTED_RMSD = float, float

Expand Down Expand Up @@ -287,7 +287,7 @@ def best_fit(
float('inf'),
)
else:
max_keep_n = min(MAX_NUM_TERMS, len(xs))
max_keep_n = min(MAX_NUM_TERMS, len(xs) // 2)

xs_in_rad = (xs if unit == 'rad' else radians(xs)) # pylint: disable=no-member

Expand Down

0 comments on commit 63ae660

Please sign in to comment.