wafo-project/pywafo

View on GitHub
src/wafo/spectrum/models.py

Summary

Maintainability
F
1 mo
Test Coverage

File models.py has 1719 lines of code (exceeds 1000 allowed). Consider refactoring.
Open

#!/usr/bin/env python
"""
Models module
-------------

Severity: Major
Found in src/wafo/spectrum/models.py - About 2 days to fix

    Spreading has 29 functions (exceeds 20 allowed). Consider refactoring.
    Open

    class Spreading(object):
        """
        Directional spreading function.
    
        Parameters
    Severity: Minor
    Found in src/wafo/spectrum/models.py - About 3 hrs to fix

      Cyclomatic complexity is too high in method _init_spec. (9)
      Open

          def _init_spec(self):
              """ Initialize swell and wind part of Torsethaugen spectrum
              """
              monitor = 0
              Hm0 = self.Hm0
      Severity: Minor
      Found in src/wafo/spectrum/models.py by radon

      Cyclomatic Complexity

      Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

      Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

      Construct Effect on CC Reasoning
      if +1 An if statement is a single decision.
      elif +1 The elif statement adds another decision.
      else +0 The else statement does not cause a new decision. The decision is at the if.
      for +1 There is a decision at the start of the loop.
      while +1 There is a decision at the while statement.
      except +1 Each except branch adds a new conditional path of execution.
      finally +0 The finally block is unconditionally executed.
      with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
      assert +1 The assert statement internally roughly equals a conditional statement.
      Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
      Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

      Source: http://radon.readthedocs.org/en/latest/intro.html

      Cyclomatic complexity is too high in method _check_parametric_ag. (6)
      Open

          def _check_parametric_ag(self, N, M, gammai):
              parameters_ok = 3 <= N <= 50 or 2 <= M <= 9.5 and 1 <= gammai <= 20
              if not parameters_ok:
                  raise ValueError('Not knowing the normalization because N, ' +
                                   'M or peakedness parameter is out of bounds!')
      Severity: Minor
      Found in src/wafo/spectrum/models.py by radon

      Cyclomatic Complexity

      Cyclomatic Complexity corresponds to the number of decisions a block of code contains plus 1. This number (also called McCabe number) is equal to the number of linearly independent paths through the code. This number can be used as a guide when testing conditional logic in blocks.

      Radon analyzes the AST tree of a Python program to compute Cyclomatic Complexity. Statements have the following effects on Cyclomatic Complexity:

      Construct Effect on CC Reasoning
      if +1 An if statement is a single decision.
      elif +1 The elif statement adds another decision.
      else +0 The else statement does not cause a new decision. The decision is at the if.
      for +1 There is a decision at the start of the loop.
      while +1 There is a decision at the while statement.
      except +1 Each except branch adds a new conditional path of execution.
      finally +0 The finally block is unconditionally executed.
      with +1 The with statement roughly corresponds to a try/except block (see PEP 343 for details).
      assert +1 The assert statement internally roughly equals a conditional statement.
      Comprehension +1 A list/set/dict comprehension of generator expression is equivalent to a for loop.
      Boolean Operator +1 Every boolean operator (and, or) adds a decision point.

      Source: http://radon.readthedocs.org/en/latest/intro.html

      Function _test_some_spectra has 45 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      def _test_some_spectra():
          S = Jonswap()
      
          w = np.linspace(0, 3.0)
          S(w) * phi1(w, 30.0)
      Severity: Minor
      Found in src/wafo/spectrum/models.py - About 1 hr to fix

        Function _init_spec has 34 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            def _init_spec(self):
                """ Initialize swell and wind part of Torsethaugen spectrum
                """
                monitor = 0
                Hm0 = self.Hm0
        Severity: Minor
        Found in src/wafo/spectrum/models.py - About 1 hr to fix

          Function __init__ has 13 arguments (exceeds 7 allowed). Consider refactoring.
          Open

              def __init__(self, Hm0=7.0, Tp=11.0, gamma=None, sigmaA=0.07, sigmaB=0.09,
          Severity: Major
          Found in src/wafo/spectrum/models.py - About 1 hr to fix

            Function _init_spec has a Cognitive Complexity of 20 (exceeds 15 allowed). Consider refactoring.
            Open

                def _init_spec(self):
                    """ Initialize swell and wind part of Torsethaugen spectrum
                    """
                    monitor = 0
                    Hm0 = self.Hm0
            Severity: Minor
            Found in src/wafo/spectrum/models.py - About 1 hr to fix

            Cognitive Complexity

            Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

            A method's cognitive complexity is based on a few simple rules:

            • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
            • Code is considered more complex for each "break in the linear flow of the code"
            • Code is considered more complex when "flow breaking structures are nested"

            Further reading

            Function __init__ has 11 arguments (exceeds 7 allowed). Consider refactoring.
            Open

                def __init__(self, Hm0=7.0, Tp=11.0, gamma=None, sigmaA=0.07, sigmaB=0.09,
            Severity: Major
            Found in src/wafo/spectrum/models.py - About 1 hr to fix

              Function __init__ has 11 arguments (exceeds 7 allowed). Consider refactoring.
              Open

                  def __init__(self, type='cos-2s', theta0=0,  # @ReservedAssignment
              Severity: Major
              Found in src/wafo/spectrum/models.py - About 1 hr to fix

                Method "__init__" has 12 parameters, which is greater than the 7 authorized.
                Open

                    def __init__(self, Hm0=7.0, Tp=11.0, gamma=None, sigmaA=0.07, sigmaB=0.09,
                                 Ag=None, N=5, M=4, method='integration', wnc=6.0,
                                 chk_seastate=True):
                Severity: Major
                Found in src/wafo/spectrum/models.py by sonar-python

                A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

                Noncompliant Code Example

                With a maximum number of 4 parameters:

                def do_something(param1, param2, param3, param4, param5):
                    ...
                

                Compliant Solution

                def do_something(param1, param2, param3, param4):
                    ...
                

                Method "__init__" has 11 parameters, which is greater than the 7 authorized.
                Open

                    def __init__(self, type='cos-2s', theta0=0,  # @ReservedAssignment
                                 method='mitsuyasu', s_a=15., s_b=15., m_a=5., m_b=-2.5,
                                 wn_lo=0.0, wn_c=1., wn_up=inf):
                Severity: Major
                Found in src/wafo/spectrum/models.py by sonar-python

                A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

                Noncompliant Code Example

                With a maximum number of 4 parameters:

                def do_something(param1, param2, param3, param4, param5):
                    ...
                

                Compliant Solution

                def do_something(param1, param2, param3, param4):
                    ...
                

                Method "__init__" has 14 parameters, which is greater than the 7 authorized.
                Open

                    def __init__(self, Hm0=7.0, Tp=11.0, gamma=None, sigmaA=0.07, sigmaB=0.09,
                                 Ag=None, N=5, M=4, method='integration', wnc=6.0,
                                 chk_seastate=True, h=42, g=9.81):
                Severity: Major
                Found in src/wafo/spectrum/models.py by sonar-python

                A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

                Noncompliant Code Example

                With a maximum number of 4 parameters:

                def do_something(param1, param2, param3, param4, param5):
                    ...
                

                Compliant Solution

                def do_something(param1, param2, param3, param4):
                    ...
                

                Method "__init__" has 8 parameters, which is greater than the 7 authorized.
                Open

                    def __init__(self, Hm0=7, Tp=11, method='integration', wnc=6, gravity=9.81,
                                 chk_seastate=True, **kwds):
                Severity: Major
                Found in src/wafo/spectrum/models.py by sonar-python

                A long parameter list can indicate that a new structure should be created to wrap the numerous parameters or that the function is doing too many things.

                Noncompliant Code Example

                With a maximum number of 4 parameters:

                def do_something(param1, param2, param3, param4, param5):
                    ...
                

                Compliant Solution

                def do_something(param1, param2, param3, param4):
                    ...
                

                Refactor this function to reduce its Cognitive Complexity from 20 to the 15 allowed.
                Open

                    def _init_spec(self):
                Severity: Critical
                Found in src/wafo/spectrum/models.py by sonar-python

                Cognitive Complexity is a measure of how hard the control flow of a function is to understand. Functions with high Cognitive Complexity will be difficult to maintain.

                See

                Remove this commented out code.
                Open

                        # Snew.note = specdata.note + ', spreading: %s' % self.type
                Severity: Major
                Found in src/wafo/spectrum/models.py by sonar-python

                Programmers should not comment out code as it bloats programs and reduces readability.

                Unused code should be deleted and can be retrieved from source control history if required.

                See

                • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
                • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
                • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
                • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

                Remove this commented out code.
                Open

                        # _test_some_spectra()
                Severity: Major
                Found in src/wafo/spectrum/models.py by sonar-python

                Programmers should not comment out code as it bloats programs and reduces readability.

                Unused code should be deleted and can be retrieved from source control history if required.

                See

                • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
                • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
                • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
                • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

                Remove this commented out code.
                Open

                            # Tpw  = max(Tpw,2.5)
                Severity: Major
                Found in src/wafo/spectrum/models.py by sonar-python

                Programmers should not comment out code as it bloats programs and reduces readability.

                Unused code should be deleted and can be retrieved from source control history if required.

                See

                • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
                • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
                • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
                • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

                Remove this commented out code.
                Open

                    dw2 = where(k1 == 0, 0, dw1 / den)  # dw/dk|h=h0
                Severity: Major
                Found in src/wafo/spectrum/models.py by sonar-python

                Programmers should not comment out code as it bloats programs and reduces readability.

                Unused code should be deleted and can be retrieved from source control history if required.

                See

                • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
                • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
                • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
                • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

                Remove this commented out code.
                Open

                            # G0w = exp(C*log(B)+log(Mw)-gammaln(C))
                Severity: Major
                Found in src/wafo/spectrum/models.py by sonar-python

                Programmers should not comment out code as it bloats programs and reduces readability.

                Unused code should be deleted and can be retrieved from source control history if required.

                See

                • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
                • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
                • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
                • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

                Remove this commented out code.
                Open

                        # G0s=Ms/((Ns/Ms)**(-(Ns-1)/Ms)*gamma((Ns-1)/Ms )) #normalizing factor
                Severity: Major
                Found in src/wafo/spectrum/models.py by sonar-python

                Programmers should not comment out code as it bloats programs and reduces readability.

                Unused code should be deleted and can be retrieved from source control history if required.

                See

                • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
                • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
                • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
                • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

                Remove this commented out code.
                Open

                    # zeta = min(zeta, 2.414655013429281e+004)
                Severity: Major
                Found in src/wafo/spectrum/models.py by sonar-python

                Programmers should not comment out code as it bloats programs and reduces readability.

                Unused code should be deleted and can be retrieved from source control history if required.

                See

                • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
                • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
                • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
                • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"

                Correct one of the identical sub-expressions on both sides of operator "&".
                Open

                            if (3.6 * sqrt(Hm0) <= Tp & Tp <= 5 * sqrt(Hm0)):
                Severity: Major
                Found in src/wafo/spectrum/models.py by sonar-python

                Using the same value on either side of a binary operator is almost always a mistake. In the case of logical operators, it is either a copy/paste error and therefore a bug, or it is simply wasted code, and should be simplified. In the case of bitwise operators and most binary mathematical operators, having the same value on both sides of an operator yields predictable results, and should be simplified.

                This rule ignores *, +, and =.

                Noncompliant Code Example

                if a == a: # Noncompliant
                    work()
                
                if  a != a: # Noncompliant
                    work()
                
                if  a == b and a == b: # Noncompliant
                    work()
                
                if a == b or a == b: # Noncompliant
                    work()
                
                j = 5 / 5 # Noncompliant
                k = 5 - 5 # Noncompliant
                

                Exceptions

                The following are ignored:

                • The expression 1 << 1

                See

                • CERT, MSC12-C. - Detect and remove code that has no effect or is never executed
                • CERT, MSC12-CPP. - Detect and remove code that has no effect
                • {rule:python:S1656} - Implements a check on =.

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                        hp = array([[0.84, 0.54],
                                    [0.84, 0.54],
                                    [0.84, 0.54],
                                    [0.84, 0.54],
                                    [0.84, 0.54],
                Severity: Major
                Found in src/wafo/spectrum/models.py and 2 other locations - About 4 hrs to fix
                src/wafo/spectrum/models.py on lines 1209..1219
                src/wafo/spectrum/models.py on lines 1220..1230

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 54.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                        wb = array([[0.046, 0.039],
                                    [0.056, 0.046],
                                    [0.016, 0.026],
                                    [0.052, 0.039],
                                    [0.039, 0.030],
                Severity: Major
                Found in src/wafo/spectrum/models.py and 2 other locations - About 4 hrs to fix
                src/wafo/spectrum/models.py on lines 1198..1208
                src/wafo/spectrum/models.py on lines 1209..1219

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 54.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                        wa = array([[0.7, 1.15],
                                    [0.93, 1.5],
                                    [0.41, 0.88],
                                    [0.74, 1.3],
                                    [0.62, 1.03],
                Severity: Major
                Found in src/wafo/spectrum/models.py and 2 other locations - About 4 hrs to fix
                src/wafo/spectrum/models.py on lines 1198..1208
                src/wafo/spectrum/models.py on lines 1220..1230

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 54.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                            Rps = min((1 - A20) * exp(-(Eu / A2) ** 2) + A20, 1)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 3 hrs to fix
                src/wafo/spectrum/models.py on lines 980..980

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 48.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                            Rpw = min((1 - A10) * exp(-(El / A1) ** 2) + A10, 1)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 3 hrs to fix
                src/wafo/spectrum/models.py on lines 1005..1005

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 48.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        self.wind = Bretschneider(Hm0=Hm0i[1], Tp=Tpi[1], N=Ni[1], M=Mi[1])
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 3 hrs to fix
                src/wafo/spectrum/models.py on lines 1251..1251

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 46.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        self.swell = Bretschneider(Hm0=Hm0i[0], Tp=Tpi[0], N=Ni[0], M=Mi[0])
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 3 hrs to fix
                src/wafo/spectrum/models.py on lines 1252..1252

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 46.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                from numpy import (inf, atleast_1d, newaxis, minimum, maximum, array,
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 2 hrs to fix
                src/wafo/spectrum/core.py on lines 4..4

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 36.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                            gammas = KG * (1 + KG0 * exp(-Hm0 / KG1)) * \
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 2 hrs to fix
                src/wafo/spectrum/models.py on lines 984..984

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 33.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                            gammaw = KG * (1 + KG0 * exp(-Hm0 / KG1)) * \
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 2 hrs to fix
                src/wafo/spectrum/models.py on lines 1009..1009

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 33.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        Eu = min(max((Tp - Tf) / (Tu - Tf), 0), 1)  # Swell
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 2 hrs to fix
                src/wafo/spectrum/models.py on lines 973..973

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 33.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        El = min(max((Tf - Tp) / (Tf - Tl), 0), 1)  # wind sea
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 2 hrs to fix
                src/wafo/spectrum/models.py on lines 974..974

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 33.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        self.wind = Jonswap(Hm0=Hpw, Tp=Tpw, gamma=gammaw, N=Nw, M=Mw,
                                            method=self.method, chk_seastate=False)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 2 hrs to fix
                src/wafo/spectrum/models.py on lines 1054..1055

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 33.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        self.swell = Jonswap(Hm0=Hps, Tp=Tps, gamma=gammas, N=Ns, M=Ms,
                                             method=self.method, chk_seastate=False)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 2 hrs to fix
                src/wafo/spectrum/models.py on lines 1052..1053

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 33.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 5 locations. Consider refactoring.
                Open

                def test_docstrings():
                    import doctest
                    print('Testing docstrings in %s' % __file__)
                    doctest.testmod(optionflags=doctest.NORMALIZE_WHITESPACE)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 2 hrs to fix
                src/wafo/graphutil.py on lines 271..274
                src/wafo/objects.py on lines 2613..2616
                src/wafo/wave_theory/core.py on lines 587..590
                src/wafo/wavemodels.py on lines 261..264

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 29.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                        K, TH, phi0 = self.chk_input(theta, w, wc)[:3]
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 1608..1608
                src/wafo/spectrum/models.py on lines 1638..1638
                src/wafo/spectrum/models.py on lines 1708..1708
                src/wafo/spectrum/models.py on lines 1766..1766

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 23.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                        X, TH, phi0 = self.chk_input(theta, w, wc)[:3]
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 1608..1608
                src/wafo/spectrum/models.py on lines 1708..1708
                src/wafo/spectrum/models.py on lines 1738..1738
                src/wafo/spectrum/models.py on lines 1766..1766

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 23.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                        S, TH, phi0 = self.chk_input(theta, w, wc)[:3]
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 1638..1638
                src/wafo/spectrum/models.py on lines 1708..1708
                src/wafo/spectrum/models.py on lines 1738..1738
                src/wafo/spectrum/models.py on lines 1766..1766

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 23.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                        B, TH, phi0 = self.chk_input(theta, w, wc)[:3]
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 1608..1608
                src/wafo/spectrum/models.py on lines 1638..1638
                src/wafo/spectrum/models.py on lines 1738..1738
                src/wafo/spectrum/models.py on lines 1766..1766

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 23.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                        A, TH, phi0 = self.chk_input(theta, w, wc)[:3]
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 1608..1608
                src/wafo/spectrum/models.py on lines 1638..1638
                src/wafo/spectrum/models.py on lines 1708..1708
                src/wafo/spectrum/models.py on lines 1738..1738

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 23.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                    Hm0 = 4 * sqrt(epsilon1) * u10 ** 2. / g            # Table 1
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/wave_theory/dispersion_relation.py on lines 151..151

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 23.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        return dict(Hm0=Hm0, Tp=Tp, gamma=gam, sigmaA=sa, sigmaB=sb, Ag=A)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/stats/core.py on lines 242..242

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 22.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                    def __call__(self, w):
                        return self.wind(w) + self.swell(w)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 912..912

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 21.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                        return self.wind(w) + self.swell(w)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 1193..1194

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 21.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                            Rpw = sqrt(1 - Rps ** 2)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 2 other locations - About 1 hr to fix
                src/wafo/spectrum/core.py on lines 3822..3822
                src/wafo/spectrum/models.py on lines 990..990

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 21.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                            Rps = sqrt(1.0 - Rpw ** 2.0)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 2 other locations - About 1 hr to fix
                src/wafo/spectrum/core.py on lines 3822..3822
                src/wafo/spectrum/models.py on lines 1016..1016

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 21.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                    k1 = w2k(w, 0, inf, g=g)[0]
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 707..707

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 21.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                            if monitor:
                                if Rps > 0.1:
                                    print('     Spectrum for Wind dominated sea')
                                else:
                                    print('     Spectrum for pure wind sea')
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 1033..1037

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 21.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                            if monitor:
                                if Rpw > 0.1:
                                    print('     Spectrum for swell dominated sea')
                                else:
                                    print('     Spectrum for pure swell sea')
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 995..999

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 21.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                    k2 = w2k(w, 0, h, g=g)[0]
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 705..705

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 21.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                            Nw = K0 * sqrt(Hm0) + K00             # high frequency exponent
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 1003..1003

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 21.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                            Ns = K0 * sqrt(Hm0) + K00  # high frequency exponent
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 978..978

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 21.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        fourierfun = self._fourierdispatch.get(self.type[0])
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/kdetools/tests/test_kernels.py on lines 101..101

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 21.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        if Tz is None:
                            Tz = 0.8143 * Tp
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/gaussian.py on lines 723..724

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 21.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                            wp = 2 * pi / self.Tp
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 656..656

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 19.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                            wp = 2 * pi / self.Tp
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 257..257

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 19.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                        f2NM = ((2.2 * M ** (-3.3) + 0.57) * N ** (-0.58 * M ** 0.37 + 0.53) -
                Severity: Major
                Found in src/wafo/spectrum/models.py and 2 other locations - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 595..595
                src/wafo/spectrum/models.py on lines 596..596

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 19.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                    zeta = g * fetch / (u10 ** 2)  # dimensionless fetch, Table 1
                Severity: Major
                Found in src/wafo/spectrum/models.py and 2 other locations - About 1 hr to fix
                src/wafo/stats/_continuous_distns.py on lines 8369..8369
                src/wafo/wavemodels.py on lines 93..93

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 19.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                        f1NM = 4.1 * (N - 2 * M ** 0.28 + 5.3) ** (-1.45 * M ** 0.1 + 0.96)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 2 other locations - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 596..596
                src/wafo/spectrum/models.py on lines 596..596

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 19.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                            norm_ag = dict(i=self._integrate_ag,
                                           p=self._parametric_ag,
                                           c=self._custom_ag)[self.method[0]]
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 1957..1959

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 19.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        if self.Ag <= 0:
                            raise ValueError('Ag must be larger than 0!')
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 171..172

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 19.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                                (2 * pi / gravity1 * Hm0 / (Tf ** 2)) ** r * (1 + A3 * Eu)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 985..985

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 19.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        spread = dict(b=self._banner_spread,
                                      d=self._donelan_spread,
                                      m=self._mitsuyasu_spread
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 633..635

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 19.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        if self.Tp <= 0:
                            raise ValueError('Tp must be positve!')
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 610..611

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 19.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        Tf = Af * (Hm0) ** (1.0 / 3.0)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/kdetools/kernels.py on lines 1162..1162

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 19.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                                (2 * pi / gravity1 * Rpw * Hm0 / (Tp ** 2)) ** r
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 1010..1010

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 19.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        super(McCormick, self).__init__(Hm0, Tp, N, M, chk_seastate)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 1325..1325

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 18.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                    plt.plot(w, S(w, h=42))
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 2072..2072

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 18.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                    plt.plot(w, S(w, h=21))
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 2073..2073

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 18.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        super(Wallop, self).__init__(Hm0, Tp, N, M, chk_seastate)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 1118..1118

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 18.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 9 locations. Consider refactoring.
                Open

                            A = 0.0662 * zeta ** (-0.2)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 8 other locations - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 412..412
                src/wafo/spectrum/models.py on lines 414..414
                src/wafo/spectrum/models.py on lines 416..416
                src/wafo/spectrum/models.py on lines 419..419
                src/wafo/spectrum/models.py on lines 427..427
                src/wafo/spectrum/models.py on lines 428..428
                src/wafo/spectrum/models.py on lines 431..431
                src/wafo/spectrum/models.py on lines 432..432

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 9 locations. Consider refactoring.
                Open

                            ny = 2.84 * zeta ** (-0.3)  # dimensionless peakfrequency, Table 1
                Severity: Major
                Found in src/wafo/spectrum/models.py and 8 other locations - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 412..412
                src/wafo/spectrum/models.py on lines 414..414
                src/wafo/spectrum/models.py on lines 416..416
                src/wafo/spectrum/models.py on lines 418..418
                src/wafo/spectrum/models.py on lines 427..427
                src/wafo/spectrum/models.py on lines 428..428
                src/wafo/spectrum/models.py on lines 431..431
                src/wafo/spectrum/models.py on lines 432..432

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 9 locations. Consider refactoring.
                Open

                            ny = 3.5 * zeta ** (-0.33)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 8 other locations - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 412..412
                src/wafo/spectrum/models.py on lines 416..416
                src/wafo/spectrum/models.py on lines 418..418
                src/wafo/spectrum/models.py on lines 419..419
                src/wafo/spectrum/models.py on lines 427..427
                src/wafo/spectrum/models.py on lines 428..428
                src/wafo/spectrum/models.py on lines 431..431
                src/wafo/spectrum/models.py on lines 432..432

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 9 locations. Consider refactoring.
                Open

                        ny = 3.57 * zeta ** (-0.33)     # dimensionless peakfrequency, Eq. 11
                Severity: Major
                Found in src/wafo/spectrum/models.py and 8 other locations - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 412..412
                src/wafo/spectrum/models.py on lines 414..414
                src/wafo/spectrum/models.py on lines 416..416
                src/wafo/spectrum/models.py on lines 418..418
                src/wafo/spectrum/models.py on lines 419..419
                src/wafo/spectrum/models.py on lines 427..427
                src/wafo/spectrum/models.py on lines 431..431
                src/wafo/spectrum/models.py on lines 432..432

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 9 locations. Consider refactoring.
                Open

                        if g is None:
                            g = self.g
                Severity: Major
                Found in src/wafo/spectrum/models.py and 8 other locations - About 1 hr to fix
                src/wafo/kdetools/gridding.py on lines 53..54
                src/wafo/kdetools/gridding.py on lines 203..204
                src/wafo/kdetools/gridding.py on lines 205..206
                src/wafo/kdetools/kdetools.py on lines 1003..1004
                src/wafo/spectrum/core.py on lines 3094..3095
                src/wafo/spectrum/models.py on lines 804..805
                src/wafo/transform/estimation.py on lines 232..233
                src/wafo/transform/estimation.py on lines 234..235

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 9 locations. Consider refactoring.
                Open

                        if h is None:
                            h = self.h
                Severity: Major
                Found in src/wafo/spectrum/models.py and 8 other locations - About 1 hr to fix
                src/wafo/kdetools/gridding.py on lines 53..54
                src/wafo/kdetools/gridding.py on lines 203..204
                src/wafo/kdetools/gridding.py on lines 205..206
                src/wafo/kdetools/kdetools.py on lines 1003..1004
                src/wafo/spectrum/core.py on lines 3094..3095
                src/wafo/spectrum/models.py on lines 806..807
                src/wafo/transform/estimation.py on lines 232..233
                src/wafo/transform/estimation.py on lines 234..235

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 9 locations. Consider refactoring.
                Open

                            A = 0.076 * zeta ** (-0.22)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 8 other locations - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 414..414
                src/wafo/spectrum/models.py on lines 416..416
                src/wafo/spectrum/models.py on lines 418..418
                src/wafo/spectrum/models.py on lines 419..419
                src/wafo/spectrum/models.py on lines 427..427
                src/wafo/spectrum/models.py on lines 428..428
                src/wafo/spectrum/models.py on lines 431..431
                src/wafo/spectrum/models.py on lines 432..432

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 9 locations. Consider refactoring.
                Open

                            epsilon1 = 9.91e-8 * zeta ** 1.1
                Severity: Major
                Found in src/wafo/spectrum/models.py and 8 other locations - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 412..412
                src/wafo/spectrum/models.py on lines 414..414
                src/wafo/spectrum/models.py on lines 418..418
                src/wafo/spectrum/models.py on lines 419..419
                src/wafo/spectrum/models.py on lines 427..427
                src/wafo/spectrum/models.py on lines 428..428
                src/wafo/spectrum/models.py on lines 431..431
                src/wafo/spectrum/models.py on lines 432..432

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 9 locations. Consider refactoring.
                Open

                        A = 0.074 * zeta ** (-0.22)     # Eq. 10
                Severity: Major
                Found in src/wafo/spectrum/models.py and 8 other locations - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 412..412
                src/wafo/spectrum/models.py on lines 414..414
                src/wafo/spectrum/models.py on lines 416..416
                src/wafo/spectrum/models.py on lines 418..418
                src/wafo/spectrum/models.py on lines 419..419
                src/wafo/spectrum/models.py on lines 428..428
                src/wafo/spectrum/models.py on lines 431..431
                src/wafo/spectrum/models.py on lines 432..432

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 9 locations. Consider refactoring.
                Open

                        sa = 0.05468 * ny ** (-0.32)      # Eq. 13
                Severity: Major
                Found in src/wafo/spectrum/models.py and 8 other locations - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 412..412
                src/wafo/spectrum/models.py on lines 414..414
                src/wafo/spectrum/models.py on lines 416..416
                src/wafo/spectrum/models.py on lines 418..418
                src/wafo/spectrum/models.py on lines 419..419
                src/wafo/spectrum/models.py on lines 427..427
                src/wafo/spectrum/models.py on lines 428..428
                src/wafo/spectrum/models.py on lines 432..432

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 9 locations. Consider refactoring.
                Open

                        sb = 0.078314 * ny ** (-0.16)     # Eq. 14
                Severity: Major
                Found in src/wafo/spectrum/models.py and 8 other locations - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 412..412
                src/wafo/spectrum/models.py on lines 414..414
                src/wafo/spectrum/models.py on lines 416..416
                src/wafo/spectrum/models.py on lines 418..418
                src/wafo/spectrum/models.py on lines 419..419
                src/wafo/spectrum/models.py on lines 427..427
                src/wafo/spectrum/models.py on lines 428..428
                src/wafo/spectrum/models.py on lines 431..431

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                            wp = 2. * pi / Tp
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 706..706
                src/wafo/spectrum/models.py on lines 1322..1322
                src/wafo/stats/_continuous_distns.py on lines 995..995
                src/wafo/stats/_continuous_distns.py on lines 1076..1076

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                    dw1 = 2.0 * w / g  # % dw/dk|h=inf
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 1320..1320
                src/wafo/spectrum/models.py on lines 1322..1322
                src/wafo/stats/_continuous_distns.py on lines 995..995
                src/wafo/stats/_continuous_distns.py on lines 1076..1076

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                            Lp = 2. * pi / kp  # wave length at the peak frequency
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 706..706
                src/wafo/spectrum/models.py on lines 1320..1320
                src/wafo/stats/_continuous_distns.py on lines 995..995
                src/wafo/stats/_continuous_distns.py on lines 1076..1076

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                    theta = np.linspace(-pi, pi, 129)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 2151..2151

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                    theta = np.linspace(-pi, pi, 129)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 2141..2141

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 4 locations. Consider refactoring.
                Open

                        Ni = 4 * Li + 1
                Severity: Major
                Found in src/wafo/spectrum/models.py and 3 other locations - About 1 hr to fix
                src/wafo/integrate.py on lines 233..233
                src/wafo/sg_filter/_core.py on lines 148..148
                src/wafo/stats/_continuous_distns.py on lines 1846..1846

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                        s = r1 / (1. - r1)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 2 other locations - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 1911..1911
                src/wafo/stats/_continuous_distns.py on lines 3920..3920

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                            N = np.abs((log(2. * pi ** 2.) + 2 * log(Hm0 / 4) - 2.0 * log(Lp)) / log(2))
                Severity: Major
                Found in src/wafo/spectrum/models.py and 2 other locations - About 1 hr to fix
                src/wafo/kdetools/kernels.py on lines 415..415
                src/wafo/kdetools/kernels.py on lines 1165..1165

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                        s = r1 / (1. - r1)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 2 other locations - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 1926..1926
                src/wafo/stats/_continuous_distns.py on lines 3920..3920

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                                (np.abs(da) > sqrt(_EPS) * np.abs(A)) * (np.abs(da) > sqrt(_EPS)))
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/integrate.py on lines 236..236

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                    Tp = u10 / (ny * g)                          # Table 1
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/core.py on lines 3582..3582

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        D = 0.5 * B * sech(B * TH) ** 2. / NB
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/objects.py on lines 416..416

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        C = (N - 1.0) / M
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 1019..1019

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        D[D < 0] = 0
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/kdetools/kernels.py on lines 142..142

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                            K[ix] = optimize.fsolve(lambda x: fun0(x) - r1[ix], K0[ix])
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 1827..1827

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                            kp = w2k(wp, 0, inf)[0]  # wavenumber at peak frequency
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/core.py on lines 3514..3514

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                            Ai = Ai - da[ix]
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/wave_theory/dispersion_relation.py on lines 179..179

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                            C = (Nw - 1) / Mw
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 114..114

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                            da[ix] = (sin(Ai) - Ai * r1[ix]) / (cos(Ai) - r1[ix])
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 1862..1862

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 17.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 4 locations. Consider refactoring.
                Open

                        SD = D * S[None, :]
                Severity: Major
                Found in src/wafo/spectrum/models.py and 3 other locations - About 1 hr to fix
                src/wafo/integrate.py on lines 352..352
                src/wafo/integrate.py on lines 352..352
                src/wafo/integrate.py on lines 373..373

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 16.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                        s, _spb, wn_up, _mb = self._init_frequency_dependent_spreading(wn)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 2 other locations - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 1906..1906
                src/wafo/spectrum/models.py on lines 1916..1916

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 16.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                        s, spb, wn_up, mb = self._init_frequency_dependent_spreading(wn)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 2 other locations - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 1906..1906
                src/wafo/spectrum/models.py on lines 1931..1931

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 16.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                        s, spb, wn_up, mb = self._init_frequency_dependent_spreading(wn)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 2 other locations - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 1916..1916
                src/wafo/spectrum/models.py on lines 1931..1931

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 16.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        S = SpecData1D(self.__call__(w), w)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 1869..1869

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 16.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        funB = interp1d(self._r1ofsech2(B0), B0)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 1 other location - About 1 hr to fix
                src/wafo/spectrum/models.py on lines 155..155

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 16.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 31 locations. Consider refactoring.
                Open

                    T, H = np.meshgrid(Tp, Hm0)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 30 other locations - About 55 mins to fix
                src/wafo/containers.py on lines 203..203
                src/wafo/demos.py on lines 13..13
                src/wafo/demos.py on lines 23..23
                src/wafo/graphutil.py on lines 214..215
                src/wafo/integrate.py on lines 83..83
                src/wafo/interpolate.py on lines 1161..1161
                src/wafo/kdetools/gridding.py on lines 339..339
                src/wafo/kdetools/kernels.py on lines 116..116
                src/wafo/markov.py on lines 489..493
                src/wafo/misc.py on lines 494..494
                src/wafo/misc.py on lines 1334..1334
                src/wafo/misc.py on lines 2429..2429
                src/wafo/padua.py on lines 326..326
                src/wafo/padua.py on lines 475..475
                src/wafo/padua.py on lines 513..513
                src/wafo/sg_filter/demos.py on lines 418..418
                src/wafo/spectrum/models.py on lines 2108..2108
                src/wafo/stats/_continuous_distns.py on lines 3779..3779
                src/wafo/stats/core.py on lines 495..495
                src/wafo/stats/core.py on lines 534..534
                src/wafo/stats/core.py on lines 937..937
                src/wafo/stats/estimation.py on lines 474..474
                src/wafo/stats/estimation.py on lines 482..482
                src/wafo/tests/test_gaussian.py on lines 47..47
                src/wafo/tests/test_gaussian.py on lines 154..154
                src/wafo/tests/test_misc.py on lines 546..546
                src/wafo/tests/test_misc.py on lines 556..556
                src/wafo/tests/test_misc.py on lines 569..569
                src/wafo/transform/models.py on lines 231..231
                src/wafo/transform/models.py on lines 240..240

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 31 locations. Consider refactoring.
                Open

                    [T, H] = np.meshgrid(Tp, Hm0)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 30 other locations - About 55 mins to fix
                src/wafo/containers.py on lines 203..203
                src/wafo/demos.py on lines 13..13
                src/wafo/demos.py on lines 23..23
                src/wafo/graphutil.py on lines 214..215
                src/wafo/integrate.py on lines 83..83
                src/wafo/interpolate.py on lines 1161..1161
                src/wafo/kdetools/gridding.py on lines 339..339
                src/wafo/kdetools/kernels.py on lines 116..116
                src/wafo/markov.py on lines 489..493
                src/wafo/misc.py on lines 494..494
                src/wafo/misc.py on lines 1334..1334
                src/wafo/misc.py on lines 2429..2429
                src/wafo/padua.py on lines 326..326
                src/wafo/padua.py on lines 475..475
                src/wafo/padua.py on lines 513..513
                src/wafo/sg_filter/demos.py on lines 418..418
                src/wafo/spectrum/models.py on lines 2099..2099
                src/wafo/stats/_continuous_distns.py on lines 3779..3779
                src/wafo/stats/core.py on lines 495..495
                src/wafo/stats/core.py on lines 534..534
                src/wafo/stats/core.py on lines 937..937
                src/wafo/stats/estimation.py on lines 474..474
                src/wafo/stats/estimation.py on lines 482..482
                src/wafo/tests/test_gaussian.py on lines 47..47
                src/wafo/tests/test_gaussian.py on lines 154..154
                src/wafo/tests/test_misc.py on lines 546..546
                src/wafo/tests/test_misc.py on lines 556..556
                src/wafo/tests/test_misc.py on lines 569..569
                src/wafo/transform/models.py on lines 231..231
                src/wafo/transform/models.py on lines 240..240

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 18 locations. Consider refactoring.
                Open

                if __name__ == '__main__':
                    main()
                Severity: Major
                Found in src/wafo/spectrum/models.py and 17 other locations - About 55 mins to fix
                source/c_library/build_all.py on lines 24..25
                source/mreg/build_all.py on lines 29..30
                source/mvn/build_all.py on lines 19..20
                source/mvnprd/build_all.py on lines 25..26
                source/mvnprd/old/mvnprodcorrprb/build_all.py on lines 23..24
                source/rind2007/build_all.py on lines 31..32
                src/wafo/covariance/tests/test_covariance.py on lines 27..28
                src/wafo/graphutil.py on lines 276..277
                src/wafo/interpolate.py on lines 1341..1343
                src/wafo/objects.py on lines 2619..2620
                src/wafo/spectrum/core.py on lines 4415..4416
                src/wafo/stats/core.py on lines 1495..1497
                src/wafo/stats/estimation.py on lines 1693..1695
                src/wafo/wave_theory/core.py on lines 595..596
                src/wafo/wavemodels.py on lines 267..268
                build_package.py on lines 125..126
                setup.py on lines 209..210

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 11 locations. Consider refactoring.
                Open

                        logwn = log(w.take(k))
                Severity: Major
                Found in src/wafo/spectrum/models.py and 10 other locations - About 55 mins to fix
                src/wafo/fig.py on lines 790..790
                src/wafo/fig.py on lines 791..791
                src/wafo/integrate_oscillating.py on lines 386..386
                src/wafo/integrate_oscillating.py on lines 387..387
                src/wafo/stats/_continuous_distns.py on lines 3793..3793
                src/wafo/stats/_continuous_distns.py on lines 3847..3847
                src/wafo/stats/_continuous_distns.py on lines 8280..8280
                src/wafo/stats/_continuous_distns.py on lines 8336..8336
                src/wafo/stats/_continuous_distns.py on lines 8337..8337
                src/wafo/stats/core.py on lines 1019..1019

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 3 locations. Consider refactoring.
                Open

                        k = flatnonzero(wn_up < wn)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 2 other locations - About 55 mins to fix
                src/wafo/spectrum/models.py on lines 1917..1917
                src/wafo/spectrum/models.py on lines 1932..1932

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 3 locations. Consider refactoring.
                Open

                        k = flatnonzero(wn_up < wn)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 2 other locations - About 55 mins to fix
                src/wafo/spectrum/models.py on lines 1907..1907
                src/wafo/spectrum/models.py on lines 1917..1917

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 3 locations. Consider refactoring.
                Open

                        k = flatnonzero(wn_up < wn)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 2 other locations - About 55 mins to fix
                src/wafo/spectrum/models.py on lines 1907..1907
                src/wafo/spectrum/models.py on lines 1932..1932

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 6 locations. Consider refactoring.
                Open

                        Tl = AL * sqrt(Hm0)   # lower limit
                Severity: Major
                Found in src/wafo/spectrum/models.py and 5 other locations - About 55 mins to fix
                src/wafo/stats/core.py on lines 1292..1292
                src/wafo/wave_theory/dispersion_relation.py on lines 154..154
                src/wafo/wave_theory/dispersion_relation.py on lines 164..164
                src/wafo/wave_theory/dispersion_relation.py on lines 201..201
                src/wafo/wave_theory/dispersion_relation.py on lines 202..202

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 6 locations. Consider refactoring.
                Open

                        if nt < 40:
                            warnings.warn('Number of angles is less than 40. ' +
                Severity: Major
                Found in src/wafo/spectrum/models.py and 5 other locations - About 55 mins to fix
                src/wafo/covariance/core.py on lines 590..590
                src/wafo/misc.py on lines 2604..2604
                src/wafo/spectrum/models.py on lines 579..580
                src/wafo/stats/core.py on lines 1127..1129
                src/wafo/stats/estimation.py on lines 1616..1618

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 6 locations. Consider refactoring.
                Open

                        if self.sigmaA != 0.07 or self.sigmaB != 0.09:
                            warnings.warn('Use integration to calculate Ag when ' + 'sigmaA!=0.07 or sigmaB!=0.09')
                Severity: Major
                Found in src/wafo/spectrum/models.py and 5 other locations - About 55 mins to fix
                src/wafo/covariance/core.py on lines 590..590
                src/wafo/misc.py on lines 2604..2604
                src/wafo/spectrum/models.py on lines 2001..2002
                src/wafo/stats/core.py on lines 1127..1129
                src/wafo/stats/estimation.py on lines 1616..1618

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                        if Hm0 > 11 or Hm0 > max((Tp / 3.6) ** 2, (Tp - 2) * 12 / 11):
                            txt0 = """Hm0 is outside the valid range.
                                    The validity of the spectral density is questionable"""
                            warnings.warn(txt0)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 55 mins to fix
                src/wafo/containers.py on lines 144..151
                src/wafo/containers.py on lines 251..258
                src/wafo/spectrum/models.py on lines 563..568
                src/wafo/spectrum/models.py on lines 922..925

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                        if Tp > 20 or Tp < 3:
                            txt1 = """Tp is outside the valid range.
                                    The validity of the spectral density is questionable"""
                            warnings.warn(txt1)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 55 mins to fix
                src/wafo/containers.py on lines 144..151
                src/wafo/containers.py on lines 251..258
                src/wafo/spectrum/models.py on lines 563..568
                src/wafo/spectrum/models.py on lines 917..920

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                        if gam < 1 or 7 < gam:
                            txt = """
                            The peakedness factor, gamma, is possibly too large.
                            The validity of the spectral density is questionable.
                            """
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 55 mins to fix
                src/wafo/containers.py on lines 144..151
                src/wafo/containers.py on lines 251..258
                src/wafo/spectrum/models.py on lines 917..920
                src/wafo/spectrum/models.py on lines 922..925

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                        NB = tanh(pi * B)  # % Normalization factor.
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 55 mins to fix
                src/wafo/kdetools/kdetools.py on lines 969..969
                src/wafo/kdetools/kdetools.py on lines 999..999
                src/wafo/sg_filter/_core.py on lines 464..464
                src/wafo/sg_filter/demos.py on lines 126..126

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 4 locations. Consider refactoring.
                Open

                        super(Bretschneider, self).__init__(Hm0, Tp)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 3 other locations - About 55 mins to fix
                src/wafo/interpolate.py on lines 545..545
                src/wafo/spectrum/models.py on lines 533..533
                src/wafo/spectrum/models.py on lines 897..897

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 4 locations. Consider refactoring.
                Open

                        wn = atleast_1d(w / wc)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 3 other locations - About 55 mins to fix
                src/wafo/covariance/core.py on lines 434..434
                src/wafo/spectrum/core.py on lines 3259..3259
                src/wafo/transform/models.py on lines 390..390

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 4 locations. Consider refactoring.
                Open

                        S.put(k, exp(logA - N * logwn - B * exp(-M * logwn)))
                Severity: Major
                Found in src/wafo/spectrum/models.py and 3 other locations - About 55 mins to fix
                src/wafo/stats/_continuous_distns.py on lines 6906..6906
                src/wafo/stats/estimation.py on lines 146..146
                src/wafo/stats/estimation.py on lines 177..177

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                        ix0 = flatnonzero(r1 != 0.0)
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 55 mins to fix
                src/wafo/spectrum/models.py on lines 1859..1859

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 4 locations. Consider refactoring.
                Open

                        super(Torsethaugen, self).__init__(Hm0, Tp)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 3 other locations - About 55 mins to fix
                src/wafo/interpolate.py on lines 545..545
                src/wafo/spectrum/models.py on lines 245..245
                src/wafo/spectrum/models.py on lines 533..533

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                        ix0 = flatnonzero(r1 != 0.0)
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 55 mins to fix
                src/wafo/spectrum/models.py on lines 1877..1877

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 4 locations. Consider refactoring.
                Open

                        super(Jonswap, self).__init__(Hm0, Tp)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 3 other locations - About 55 mins to fix
                src/wafo/interpolate.py on lines 545..545
                src/wafo/spectrum/models.py on lines 245..245
                src/wafo/spectrum/models.py on lines 897..897

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                    def __init__(self, Hm0=7.0, Tp=11.0, **kwds):  # @UnusedVariable
                        self.Hm0 = Hm0
                        self.Tp = Tp
                Severity: Major
                Found in src/wafo/spectrum/models.py and 2 other locations - About 55 mins to fix
                src/wafo/misc.py on lines 688..690
                src/wafo/win32_utils.py on lines 172..174

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                    plt.contour(d1[0])
                Severity: Major
                Found in src/wafo/spectrum/models.py and 2 other locations - About 55 mins to fix
                src/wafo/sg_filter/demos.py on lines 355..355
                src/wafo/sg_filter/demos.py on lines 356..356

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                            B0[k1] = max(B0)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 2 other locations - About 55 mins to fix
                src/wafo/stats/_continuous_distns.py on lines 4670..4670
                src/wafo/stats/core.py on lines 622..622

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                    k = flatnonzero(w > 0.0)
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 55 mins to fix
                src/wafo/spectrum/core.py on lines 3786..3786

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        Fcof = Fcof * Pcor.conj()
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 55 mins to fix
                src/wafo/kdetools/kernels.py on lines 1040..1040

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        Tpi = 2 * pi * exp(wb[self.par] * Hm0) / wa[self.par]
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 55 mins to fix
                src/wafo/spectrum/models.py on lines 1246..1246

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                    x = Tp / sqrt(Hm0)
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 55 mins to fix
                src/wafo/objects.py on lines 459..459

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        Hm0i = hp[self.par] * Hm0
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 55 mins to fix
                src/wafo/spectrum/models.py on lines 1247..1247

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 15.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 4 locations. Consider refactoring.
                Open

                            if self.method is not None:  # frequency dependent spreading
                                TH = TH[:, newaxis]
                Severity: Major
                Found in src/wafo/spectrum/models.py and 3 other locations - About 50 mins to fix
                src/wafo/objects.py on lines 787..787
                src/wafo/spectrum/models.py on lines 2046..2047
                src/wafo/stats/core.py on lines 903..903

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 14.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 4 locations. Consider refactoring.
                Open

                        if D.ndim != 2:  # frequency dependent spreading
                            D = D[:, None]
                Severity: Major
                Found in src/wafo/spectrum/models.py and 3 other locations - About 50 mins to fix
                src/wafo/objects.py on lines 787..787
                src/wafo/spectrum/models.py on lines 1558..1559
                src/wafo/stats/core.py on lines 903..903

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 14.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                    plt.plot(w, S1(w))
                Severity: Major
                Found in src/wafo/spectrum/models.py and 2 other locations - About 50 mins to fix
                src/wafo/interpolate.py on lines 1312..1312
                src/wafo/spectrum/models.py on lines 2071..2071

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 14.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                    plt.plot(w, S(w))
                Severity: Major
                Found in src/wafo/spectrum/models.py and 2 other locations - About 50 mins to fix
                src/wafo/interpolate.py on lines 1312..1312
                src/wafo/spectrum/models.py on lines 2093..2093

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 14.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                            print('Ns, Ms = %g, %g  Nw, Mw = %g, %g' % (Ns, Ms, Nw, Mw))
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 50 mins to fix
                src/wafo/stats/core.py on lines 1149..1150

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 14.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        if self.method is not None:
                            s_par = s_par[newaxis, :]
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 50 mins to fix
                src/wafo/stats/core.py on lines 1251..1251

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 14.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                            txt0 = """
                            Hm0=%g,Tp=%g is outside the JONSWAP range.
                            The validity of the spectral density is questionable.
                            """ % (Hm0, Tp)
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 50 mins to fix
                src/wafo/spectrum/core.py on lines 1462..1462

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 14.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        funK = interp1d(fun0(K0), K0)
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 50 mins to fix
                src/wafo/spectrum/tests/test_specdata1d.py on lines 185..185

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 14.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 37 locations. Consider refactoring.
                Open

                    w = np.linspace(0, 2, 100)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 36 other locations - About 45 mins to fix
                src/wafo/doc/tutorial_scripts/chapter3.py on lines 37..37
                src/wafo/doc/tutorial_scripts/chapter5.py on lines 97..97
                src/wafo/doc/tutorial_scripts/chapter5.py on lines 184..184
                src/wafo/interpolate.py on lines 1149..1149
                src/wafo/interpolate.py on lines 1150..1150
                src/wafo/interpolate.py on lines 1151..1151
                src/wafo/interpolate.py on lines 1155..1155
                src/wafo/interpolate.py on lines 1156..1156
                src/wafo/interpolate.py on lines 1157..1157
                src/wafo/interpolate.py on lines 1304..1304
                src/wafo/kdetools/demo.py on lines 31..31
                src/wafo/kdetools/demo.py on lines 68..68
                src/wafo/kdetools/kernels.py on lines 923..923
                src/wafo/objects.py on lines 415..415
                src/wafo/sg_filter/demos.py on lines 20..20
                src/wafo/sg_filter/demos.py on lines 381..381
                src/wafo/sg_filter/demos.py on lines 417..417
                src/wafo/sg_filter/tests/test_sg_filter.py on lines 37..37
                src/wafo/spectrum/core.py on lines 4401..4401
                src/wafo/spectrum/models.py on lines 2092..2092
                src/wafo/spectrum/models.py on lines 2140..2140
                src/wafo/spectrum/models.py on lines 2150..2150
                src/wafo/spectrum/tests/test_specdata1d.py on lines 184..184
                src/wafo/stats/core.py on lines 1427..1427
                src/wafo/stats/core.py on lines 1446..1446
                src/wafo/tests/test_gaussian.py on lines 153..153
                src/wafo/tests/test_misc.py on lines 112..112
                src/wafo/tests/test_misc.py on lines 389..389
                src/wafo/tests/test_misc.py on lines 452..452
                src/wafo/tests/test_misc.py on lines 510..510
                src/wafo/tests/test_misc.py on lines 520..520
                src/wafo/tests/test_misc.py on lines 530..530
                src/wafo/tests/test_misc.py on lines 535..535
                src/wafo/tests/test_misc.py on lines 545..545
                src/wafo/tests/test_misc.py on lines 555..555
                src/wafo/tests/test_misc.py on lines 568..568

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 37 locations. Consider refactoring.
                Open

                    w = np.linspace(0, 3, 257)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 36 other locations - About 45 mins to fix
                src/wafo/doc/tutorial_scripts/chapter3.py on lines 37..37
                src/wafo/doc/tutorial_scripts/chapter5.py on lines 97..97
                src/wafo/doc/tutorial_scripts/chapter5.py on lines 184..184
                src/wafo/interpolate.py on lines 1149..1149
                src/wafo/interpolate.py on lines 1150..1150
                src/wafo/interpolate.py on lines 1151..1151
                src/wafo/interpolate.py on lines 1155..1155
                src/wafo/interpolate.py on lines 1156..1156
                src/wafo/interpolate.py on lines 1157..1157
                src/wafo/interpolate.py on lines 1304..1304
                src/wafo/kdetools/demo.py on lines 31..31
                src/wafo/kdetools/demo.py on lines 68..68
                src/wafo/kdetools/kernels.py on lines 923..923
                src/wafo/objects.py on lines 415..415
                src/wafo/sg_filter/demos.py on lines 20..20
                src/wafo/sg_filter/demos.py on lines 381..381
                src/wafo/sg_filter/demos.py on lines 417..417
                src/wafo/sg_filter/tests/test_sg_filter.py on lines 37..37
                src/wafo/spectrum/core.py on lines 4401..4401
                src/wafo/spectrum/models.py on lines 2087..2087
                src/wafo/spectrum/models.py on lines 2092..2092
                src/wafo/spectrum/models.py on lines 2150..2150
                src/wafo/spectrum/tests/test_specdata1d.py on lines 184..184
                src/wafo/stats/core.py on lines 1427..1427
                src/wafo/stats/core.py on lines 1446..1446
                src/wafo/tests/test_gaussian.py on lines 153..153
                src/wafo/tests/test_misc.py on lines 112..112
                src/wafo/tests/test_misc.py on lines 389..389
                src/wafo/tests/test_misc.py on lines 452..452
                src/wafo/tests/test_misc.py on lines 510..510
                src/wafo/tests/test_misc.py on lines 520..520
                src/wafo/tests/test_misc.py on lines 530..530
                src/wafo/tests/test_misc.py on lines 535..535
                src/wafo/tests/test_misc.py on lines 545..545
                src/wafo/tests/test_misc.py on lines 555..555
                src/wafo/tests/test_misc.py on lines 568..568

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 37 locations. Consider refactoring.
                Open

                    w = np.linspace(0, 2, 100)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 36 other locations - About 45 mins to fix
                src/wafo/doc/tutorial_scripts/chapter3.py on lines 37..37
                src/wafo/doc/tutorial_scripts/chapter5.py on lines 97..97
                src/wafo/doc/tutorial_scripts/chapter5.py on lines 184..184
                src/wafo/interpolate.py on lines 1149..1149
                src/wafo/interpolate.py on lines 1150..1150
                src/wafo/interpolate.py on lines 1151..1151
                src/wafo/interpolate.py on lines 1155..1155
                src/wafo/interpolate.py on lines 1156..1156
                src/wafo/interpolate.py on lines 1157..1157
                src/wafo/interpolate.py on lines 1304..1304
                src/wafo/kdetools/demo.py on lines 31..31
                src/wafo/kdetools/demo.py on lines 68..68
                src/wafo/kdetools/kernels.py on lines 923..923
                src/wafo/objects.py on lines 415..415
                src/wafo/sg_filter/demos.py on lines 20..20
                src/wafo/sg_filter/demos.py on lines 381..381
                src/wafo/sg_filter/demos.py on lines 417..417
                src/wafo/sg_filter/tests/test_sg_filter.py on lines 37..37
                src/wafo/spectrum/core.py on lines 4401..4401
                src/wafo/spectrum/models.py on lines 2087..2087
                src/wafo/spectrum/models.py on lines 2140..2140
                src/wafo/spectrum/models.py on lines 2150..2150
                src/wafo/spectrum/tests/test_specdata1d.py on lines 184..184
                src/wafo/stats/core.py on lines 1427..1427
                src/wafo/stats/core.py on lines 1446..1446
                src/wafo/tests/test_gaussian.py on lines 153..153
                src/wafo/tests/test_misc.py on lines 112..112
                src/wafo/tests/test_misc.py on lines 389..389
                src/wafo/tests/test_misc.py on lines 452..452
                src/wafo/tests/test_misc.py on lines 510..510
                src/wafo/tests/test_misc.py on lines 520..520
                src/wafo/tests/test_misc.py on lines 530..530
                src/wafo/tests/test_misc.py on lines 535..535
                src/wafo/tests/test_misc.py on lines 545..545
                src/wafo/tests/test_misc.py on lines 555..555
                src/wafo/tests/test_misc.py on lines 568..568

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 36 locations. Consider refactoring.
                Open

                        TH = self._normalize_angle(wn, theta, theta0)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 35 other locations - About 45 mins to fix
                src/wafo/containers.py on lines 235..236
                src/wafo/containers.py on lines 307..307
                src/wafo/integrate.py on lines 1014..1014
                src/wafo/integrate.py on lines 1412..1412
                src/wafo/integrate_oscillating.py on lines 442..442
                src/wafo/integrate_oscillating.py on lines 492..492
                src/wafo/interpolate.py on lines 574..574
                src/wafo/interpolate.py on lines 577..577
                src/wafo/kdetools/kdetools.py on lines 712..712
                src/wafo/kdetools/kernels.py on lines 820..820
                src/wafo/kdetools/kernels.py on lines 912..912
                src/wafo/kdetools/kernels.py on lines 1018..1018
                src/wafo/kdetools/kernels.py on lines 1139..1139
                src/wafo/kdetools/kernels.py on lines 1247..1247
                src/wafo/misc.py on lines 248..248
                src/wafo/misc.py on lines 1339..1339
                src/wafo/misc.py on lines 1393..1393
                src/wafo/misc.py on lines 2248..2248
                src/wafo/misc.py on lines 2260..2260
                src/wafo/misc.py on lines 2262..2262
                src/wafo/misc.py on lines 2273..2273
                src/wafo/misc.py on lines 2292..2292
                src/wafo/misc.py on lines 2461..2461
                src/wafo/objects.py on lines 446..446
                src/wafo/objects.py on lines 978..978
                src/wafo/sg_filter/_core.py on lines 429..429
                src/wafo/sg_filter/_core.py on lines 1167..1167
                src/wafo/sg_filter/_core.py on lines 1168..1168
                src/wafo/sg_filter/_core.py on lines 1169..1169
                src/wafo/sg_filter/demos.py on lines 424..424
                src/wafo/sg_filter/demos.py on lines 426..426
                src/wafo/sg_filter/demos.py on lines 428..428
                src/wafo/stats/_continuous_distns.py on lines 3870..3870
                src/wafo/stats/estimation.py on lines 534..537
                src/wafo/transform/models.py on lines 72..72

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 37 locations. Consider refactoring.
                Open

                    w = np.linspace(0, 3, 257)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 36 other locations - About 45 mins to fix
                src/wafo/doc/tutorial_scripts/chapter3.py on lines 37..37
                src/wafo/doc/tutorial_scripts/chapter5.py on lines 97..97
                src/wafo/doc/tutorial_scripts/chapter5.py on lines 184..184
                src/wafo/interpolate.py on lines 1149..1149
                src/wafo/interpolate.py on lines 1150..1150
                src/wafo/interpolate.py on lines 1151..1151
                src/wafo/interpolate.py on lines 1155..1155
                src/wafo/interpolate.py on lines 1156..1156
                src/wafo/interpolate.py on lines 1157..1157
                src/wafo/interpolate.py on lines 1304..1304
                src/wafo/kdetools/demo.py on lines 31..31
                src/wafo/kdetools/demo.py on lines 68..68
                src/wafo/kdetools/kernels.py on lines 923..923
                src/wafo/objects.py on lines 415..415
                src/wafo/sg_filter/demos.py on lines 20..20
                src/wafo/sg_filter/demos.py on lines 381..381
                src/wafo/sg_filter/demos.py on lines 417..417
                src/wafo/sg_filter/tests/test_sg_filter.py on lines 37..37
                src/wafo/spectrum/core.py on lines 4401..4401
                src/wafo/spectrum/models.py on lines 2087..2087
                src/wafo/spectrum/models.py on lines 2092..2092
                src/wafo/spectrum/models.py on lines 2140..2140
                src/wafo/spectrum/tests/test_specdata1d.py on lines 184..184
                src/wafo/stats/core.py on lines 1427..1427
                src/wafo/stats/core.py on lines 1446..1446
                src/wafo/tests/test_gaussian.py on lines 153..153
                src/wafo/tests/test_misc.py on lines 112..112
                src/wafo/tests/test_misc.py on lines 389..389
                src/wafo/tests/test_misc.py on lines 452..452
                src/wafo/tests/test_misc.py on lines 510..510
                src/wafo/tests/test_misc.py on lines 520..520
                src/wafo/tests/test_misc.py on lines 530..530
                src/wafo/tests/test_misc.py on lines 535..535
                src/wafo/tests/test_misc.py on lines 545..545
                src/wafo/tests/test_misc.py on lines 555..555
                src/wafo/tests/test_misc.py on lines 568..568

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 16 locations. Consider refactoring.
                Open

                    @property
                    def method(self):
                        return self._method
                Severity: Major
                Found in src/wafo/spectrum/models.py and 15 other locations - About 45 mins to fix
                src/wafo/kdetools/kdetools.py on lines 69..71
                src/wafo/kdetools/kdetools.py on lines 78..80
                src/wafo/kdetools/kdetools.py on lines 102..104
                src/wafo/kdetools/kdetools.py on lines 116..118
                src/wafo/kdetools/kdetools.py on lines 637..639
                src/wafo/kdetools/kdetools.py on lines 651..653
                src/wafo/kdetools/kdetools.py on lines 666..668
                src/wafo/kdetools/kdetools.py on lines 960..962
                src/wafo/kdetools/kernels.py on lines 272..274
                src/wafo/sg_filter/_core.py on lines 935..937
                src/wafo/sg_filter/_core.py on lines 947..949
                src/wafo/sg_filter/_core.py on lines 959..961
                src/wafo/sg_filter/_core.py on lines 971..973
                src/wafo/spectrum/core.py on lines 719..721
                src/wafo/transform/models.py on lines 154..156

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 11 locations. Consider refactoring.
                Open

                    Hm0, Tp = atleast_1d(Hm0, Tp)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 10 other locations - About 45 mins to fix
                src/wafo/demos.py on lines 114..114
                src/wafo/gaussian.py on lines 344..344
                src/wafo/gaussian.py on lines 393..393
                src/wafo/misc.py on lines 2672..2672
                src/wafo/misc.py on lines 2723..2723
                src/wafo/spectrum/core.py on lines 4112..4112
                src/wafo/spectrum/models.py on lines 2078..2078
                src/wafo/stats/_continuous_distns.py on lines 8525..8525
                src/wafo/tests/test_misc.py on lines 429..429
                src/wafo/tests/test_misc.py on lines 441..441

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 11 locations. Consider refactoring.
                Open

                    k, k2 = w2k(w, th)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 10 other locations - About 45 mins to fix
                src/wafo/demos.py on lines 114..114
                src/wafo/gaussian.py on lines 344..344
                src/wafo/gaussian.py on lines 393..393
                src/wafo/misc.py on lines 2672..2672
                src/wafo/misc.py on lines 2723..2723
                src/wafo/spectrum/core.py on lines 4112..4112
                src/wafo/spectrum/models.py on lines 319..319
                src/wafo/stats/_continuous_distns.py on lines 8525..8525
                src/wafo/tests/test_misc.py on lines 429..429
                src/wafo/tests/test_misc.py on lines 441..441

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 10 locations. Consider refactoring.
                Open

                    th0 = np.pi / 2; # primary direction of waves
                Severity: Major
                Found in src/wafo/spectrum/models.py and 9 other locations - About 45 mins to fix
                src/wafo/doc/tutorial_scripts/chapter1.py on lines 81..81
                src/wafo/kdetools/kernels.py on lines 404..404
                src/wafo/kdetools/kernels.py on lines 409..409
                src/wafo/misc.py on lines 369..369
                src/wafo/stats/_continuous_distns.py on lines 4556..4556
                src/wafo/stats/_continuous_distns.py on lines 4612..4612
                src/wafo/tests/test_integrate_oscillating.py on lines 190..190
                src/wafo/tests/test_integrate_oscillating.py on lines 272..272
                src/wafo/tests/test_integrate_oscillating.py on lines 342..342

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 6 locations. Consider refactoring.
                Open

                    if output[0] == 'l':
                Severity: Major
                Found in src/wafo/spectrum/models.py and 5 other locations - About 45 mins to fix
                src/wafo/objects.py on lines 1518..1518
                src/wafo/spectrum/core.py on lines 3119..3119
                src/wafo/spectrum/core.py on lines 4193..4193
                src/wafo/spectrum/models.py on lines 411..411
                src/wafo/transform/estimation.py on lines 449..449

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 7 locations. Consider refactoring.
                Open

                        K0 = funK(r1.ravel())
                Severity: Major
                Found in src/wafo/spectrum/models.py and 6 other locations - About 45 mins to fix
                src/wafo/containers.py on lines 383..383
                src/wafo/integrate.py on lines 1309..1309
                src/wafo/spectrum/models.py on lines 1817..1817
                src/wafo/spectrum/models.py on lines 1871..1871
                src/wafo/stats/estimation.py on lines 1552..1552
                src/wafo/transform/estimation.py on lines 324..324

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 7 locations. Consider refactoring.
                Open

                        A0 = funA(r1.ravel())
                Severity: Major
                Found in src/wafo/spectrum/models.py and 6 other locations - About 45 mins to fix
                src/wafo/containers.py on lines 383..383
                src/wafo/integrate.py on lines 1309..1309
                src/wafo/spectrum/models.py on lines 1853..1853
                src/wafo/spectrum/models.py on lines 1871..1871
                src/wafo/stats/estimation.py on lines 1552..1552
                src/wafo/transform/estimation.py on lines 324..324

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 6 locations. Consider refactoring.
                Open

                        D1 = par ** 2. / 2.
                Severity: Major
                Found in src/wafo/spectrum/models.py and 5 other locations - About 45 mins to fix
                src/wafo/kdetools/kernels.py on lines 42..42
                src/wafo/stats/_continuous_distns.py on lines 3858..3858
                src/wafo/stats/_continuous_distns.py on lines 8140..8140
                src/wafo/stats/_continuous_distns.py on lines 8196..8196
                src/wafo/stats/_continuous_distns.py on lines 8363..8363

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 7 locations. Consider refactoring.
                Open

                        B0 = funB(r1.ravel())
                Severity: Major
                Found in src/wafo/spectrum/models.py and 6 other locations - About 45 mins to fix
                src/wafo/containers.py on lines 383..383
                src/wafo/integrate.py on lines 1309..1309
                src/wafo/spectrum/models.py on lines 1817..1817
                src/wafo/spectrum/models.py on lines 1853..1853
                src/wafo/stats/estimation.py on lines 1552..1552
                src/wafo/transform/estimation.py on lines 324..324

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 6 locations. Consider refactoring.
                Open

                        if method[-1] == '3':  # Hasselman et.al (1973)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 5 other locations - About 45 mins to fix
                src/wafo/objects.py on lines 1518..1518
                src/wafo/spectrum/core.py on lines 3119..3119
                src/wafo/spectrum/core.py on lines 4193..4193
                src/wafo/spectrum/models.py on lines 437..437
                src/wafo/transform/estimation.py on lines 449..449

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                        S.workspace = self.__dict__.copy()
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 45 mins to fix
                src/wafo/sg_filter/_core.py on lines 287..287
                src/wafo/spectrum/tests/test_specdata1d.py on lines 19..19
                src/wafo/spectrum/tests/test_specdata1d.py on lines 113..113
                src/wafo/stats/estimation.py on lines 1125..1126

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                        if not parameters_ok:
                            raise ValueError('Not knowing the normalization because N, ' +
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 45 mins to fix
                src/wafo/spectrum/models.py on lines 616..617
                src/wafo/spectrum/models.py on lines 1964..1965
                src/wafo/stats/core.py on lines 1255..1256
                src/wafo/stats/estimation.py on lines 293..294

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                        if self.wnc < 1.0:
                            raise ValueError('Normalized cutoff frequency, wnc, ' +
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 45 mins to fix
                src/wafo/spectrum/models.py on lines 576..577
                src/wafo/spectrum/models.py on lines 1964..1965
                src/wafo/stats/core.py on lines 1255..1256
                src/wafo/stats/estimation.py on lines 293..294

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                    plt.contour(d1.squeeze())
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 45 mins to fix
                src/wafo/objects.py on lines 2517..2517
                src/wafo/objects.py on lines 2591..2591
                src/wafo/spectrum/core.py on lines 3268..3268
                src/wafo/spectrum/core.py on lines 3277..3277

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                        Li = hstack((Lpari[0], Lpari[1] * exp(Lpari[2] * Hm0)))
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 45 mins to fix
                src/wafo/integrate_oscillating.py on lines 413..413
                src/wafo/integrate_oscillating.py on lines 413..413
                src/wafo/spectrum/core.py on lines 962..962
                src/wafo/stats/estimation.py on lines 85..85

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                        if np.any(s < 0):
                            raise ValueError('The COS2S spread parameter, S(w), ' +
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 45 mins to fix
                src/wafo/spectrum/models.py on lines 576..577
                src/wafo/spectrum/models.py on lines 616..617
                src/wafo/stats/core.py on lines 1255..1256
                src/wafo/stats/estimation.py on lines 293..294

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 4 locations. Consider refactoring.
                Open

                        s = where(wn <= wn_c, spa * wn ** ma, spb * wn ** mb)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 3 other locations - About 45 mins to fix
                src/wafo/spectrum/models.py on lines 1900..1900
                src/wafo/spectrum/models.py on lines 1908..1908
                src/wafo/spectrum/models.py on lines 1919..1919

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 4 locations. Consider refactoring.
                Open

                        s3m = spb * (wn_up) ** mb
                Severity: Major
                Found in src/wafo/spectrum/models.py and 3 other locations - About 45 mins to fix
                src/wafo/spectrum/models.py on lines 1900..1900
                src/wafo/spectrum/models.py on lines 1900..1900
                src/wafo/spectrum/models.py on lines 1908..1908

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 4 locations. Consider refactoring.
                Open

                        s[k] = spb * (wn_up) ** mb
                Severity: Major
                Found in src/wafo/spectrum/models.py and 3 other locations - About 45 mins to fix
                src/wafo/spectrum/models.py on lines 1900..1900
                src/wafo/spectrum/models.py on lines 1900..1900
                src/wafo/spectrum/models.py on lines 1919..1919

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 4 locations. Consider refactoring.
                Open

                            S = ((Hm0 / 4.0) ** 2 / wp * Ag) * Gf * _gengamspec(wn, N, M)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 3 other locations - About 45 mins to fix
                src/wafo/misc.py on lines 1914..1914
                src/wafo/sg_filter/demos.py on lines 397..397
                src/wafo/spectrum/models.py on lines 917..917

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 4 locations. Consider refactoring.
                Open

                            self._TpdTz = Tp / Tz
                Severity: Major
                Found in src/wafo/spectrum/models.py and 3 other locations - About 45 mins to fix
                src/wafo/spectrum/core.py on lines 1464..1464
                src/wafo/spectrum/core.py on lines 1821..1821
                src/wafo/spectrum/core.py on lines 1822..1822

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                        if np.any(X >= 1):
                Severity: Major
                Found in src/wafo/spectrum/models.py and 2 other locations - About 45 mins to fix
                src/wafo/objects.py on lines 2495..2495
                src/wafo/stats/_continuous_distns.py on lines 678..678

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                            r1 = np.abs(s / (s + 1))
                Severity: Major
                Found in src/wafo/spectrum/models.py and 2 other locations - About 45 mins to fix
                src/wafo/stats/_continuous_distns.py on lines 6430..6430
                src/wafo/stats/_continuous_distns.py on lines 6431..6431

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        D = real(fft(Fcof, axis=0))
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 45 mins to fix
                src/wafo/spectrum/core.py on lines 3477..3477

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                    def _frequency_independent_spread(self, _wn):
                        """
                        no frequency dependent spreading,
                        but possible frequency dependent direction
                        """
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 45 mins to fix
                src/wafo/objects.py on lines 1238..1279

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        s[wn <= wn_lo] = 0.0
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 45 mins to fix
                src/wafo/stats/core.py on lines 128..128

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        try:
                            self._method = methods[m]
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 45 mins to fix
                src/wafo/stats/estimation.py on lines 945..946

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        D = (exp(gammaln(S + 1) - gammaln(S + 1.0 / 2.0)) / (2 * sqrt(pi))) * \
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 45 mins to fix
                src/wafo/kdetools/kernels.py on lines 904..904

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 13.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 16 locations. Consider refactoring.
                Open

                    v = np.arange(0, 8)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 15 other locations - About 40 mins to fix
                src/wafo/demos.py on lines 135..136
                src/wafo/doc/tutorial_scripts/rainflow_example.py on lines 141..141
                src/wafo/interpolate.py on lines 1330..1330
                src/wafo/kdetools/demo.py on lines 151..151
                src/wafo/spectrum/models.py on lines 2063..2063
                src/wafo/spectrum/models.py on lines 2069..2069
                src/wafo/spectrum/models.py on lines 2097..2097
                src/wafo/spectrum/models.py on lines 2098..2098
                src/wafo/spectrum/models.py on lines 2106..2106
                src/wafo/spectrum/tests/test_models.py on lines 26..26
                src/wafo/spectrum/tests/test_specdata1d.py on lines 58..58
                src/wafo/stats/_continuous_distns.py on lines 8534..8534
                src/wafo/transform/models.py on lines 575..575
                src/wafo/transform/tests/test_trdata.py on lines 11..11
                src/wafo/wavemodels.py on lines 18..18

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 12.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 16 locations. Consider refactoring.
                Open

                    Hm0 = np.arange(1, 11)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 15 other locations - About 40 mins to fix
                src/wafo/demos.py on lines 135..136
                src/wafo/doc/tutorial_scripts/rainflow_example.py on lines 141..141
                src/wafo/interpolate.py on lines 1330..1330
                src/wafo/kdetools/demo.py on lines 151..151
                src/wafo/spectrum/models.py on lines 2063..2063
                src/wafo/spectrum/models.py on lines 2069..2069
                src/wafo/spectrum/models.py on lines 2098..2098
                src/wafo/spectrum/models.py on lines 2106..2106
                src/wafo/spectrum/models.py on lines 2110..2110
                src/wafo/spectrum/tests/test_models.py on lines 26..26
                src/wafo/spectrum/tests/test_specdata1d.py on lines 58..58
                src/wafo/stats/_continuous_distns.py on lines 8534..8534
                src/wafo/transform/models.py on lines 575..575
                src/wafo/transform/tests/test_trdata.py on lines 11..11
                src/wafo/wavemodels.py on lines 18..18

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 12.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 16 locations. Consider refactoring.
                Open

                    w = np.linspace(0, 2.5)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 15 other locations - About 40 mins to fix
                src/wafo/demos.py on lines 135..136
                src/wafo/doc/tutorial_scripts/rainflow_example.py on lines 141..141
                src/wafo/interpolate.py on lines 1330..1330
                src/wafo/kdetools/demo.py on lines 151..151
                src/wafo/spectrum/models.py on lines 2063..2063
                src/wafo/spectrum/models.py on lines 2097..2097
                src/wafo/spectrum/models.py on lines 2098..2098
                src/wafo/spectrum/models.py on lines 2106..2106
                src/wafo/spectrum/models.py on lines 2110..2110
                src/wafo/spectrum/tests/test_models.py on lines 26..26
                src/wafo/spectrum/tests/test_specdata1d.py on lines 58..58
                src/wafo/stats/_continuous_distns.py on lines 8534..8534
                src/wafo/transform/models.py on lines 575..575
                src/wafo/transform/tests/test_trdata.py on lines 11..11
                src/wafo/wavemodels.py on lines 18..18

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 12.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 16 locations. Consider refactoring.
                Open

                    Hm0 = np.linspace(1, 20)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 15 other locations - About 40 mins to fix
                src/wafo/demos.py on lines 135..136
                src/wafo/doc/tutorial_scripts/rainflow_example.py on lines 141..141
                src/wafo/interpolate.py on lines 1330..1330
                src/wafo/kdetools/demo.py on lines 151..151
                src/wafo/spectrum/models.py on lines 2063..2063
                src/wafo/spectrum/models.py on lines 2069..2069
                src/wafo/spectrum/models.py on lines 2097..2097
                src/wafo/spectrum/models.py on lines 2098..2098
                src/wafo/spectrum/models.py on lines 2110..2110
                src/wafo/spectrum/tests/test_models.py on lines 26..26
                src/wafo/spectrum/tests/test_specdata1d.py on lines 58..58
                src/wafo/stats/_continuous_distns.py on lines 8534..8534
                src/wafo/transform/models.py on lines 575..575
                src/wafo/transform/tests/test_trdata.py on lines 11..11
                src/wafo/wavemodels.py on lines 18..18

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 12.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 16 locations. Consider refactoring.
                Open

                    w = np.linspace(0, 3.0)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 15 other locations - About 40 mins to fix
                src/wafo/demos.py on lines 135..136
                src/wafo/doc/tutorial_scripts/rainflow_example.py on lines 141..141
                src/wafo/interpolate.py on lines 1330..1330
                src/wafo/kdetools/demo.py on lines 151..151
                src/wafo/spectrum/models.py on lines 2069..2069
                src/wafo/spectrum/models.py on lines 2097..2097
                src/wafo/spectrum/models.py on lines 2098..2098
                src/wafo/spectrum/models.py on lines 2106..2106
                src/wafo/spectrum/models.py on lines 2110..2110
                src/wafo/spectrum/tests/test_models.py on lines 26..26
                src/wafo/spectrum/tests/test_specdata1d.py on lines 58..58
                src/wafo/stats/_continuous_distns.py on lines 8534..8534
                src/wafo/transform/models.py on lines 575..575
                src/wafo/transform/tests/test_trdata.py on lines 11..11
                src/wafo/wavemodels.py on lines 18..18

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 12.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 16 locations. Consider refactoring.
                Open

                    Tp = np.linspace(2, 16)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 15 other locations - About 40 mins to fix
                src/wafo/demos.py on lines 135..136
                src/wafo/doc/tutorial_scripts/rainflow_example.py on lines 141..141
                src/wafo/interpolate.py on lines 1330..1330
                src/wafo/kdetools/demo.py on lines 151..151
                src/wafo/spectrum/models.py on lines 2063..2063
                src/wafo/spectrum/models.py on lines 2069..2069
                src/wafo/spectrum/models.py on lines 2097..2097
                src/wafo/spectrum/models.py on lines 2106..2106
                src/wafo/spectrum/models.py on lines 2110..2110
                src/wafo/spectrum/tests/test_models.py on lines 26..26
                src/wafo/spectrum/tests/test_specdata1d.py on lines 58..58
                src/wafo/stats/_continuous_distns.py on lines 8534..8534
                src/wafo/transform/models.py on lines 575..575
                src/wafo/transform/tests/test_trdata.py on lines 11..11
                src/wafo/wavemodels.py on lines 18..18

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 12.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 7 locations. Consider refactoring.
                Open

                            print('Rps = %g Rpw = %g' % (Rps, Rpw))
                Severity: Major
                Found in src/wafo/spectrum/models.py and 6 other locations - About 40 mins to fix
                src/wafo/doc/tutorial_scripts/chapter2.py on lines 56..56
                src/wafo/spectrum/core.py on lines 2969..2971
                src/wafo/spectrum/models.py on lines 1045..1045
                src/wafo/spectrum/models.py on lines 1047..1047
                src/wafo/spectrum/models.py on lines 1048..1048
                src/wafo/stats/core.py on lines 1151..1151

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 12.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 7 locations. Consider refactoring.
                Open

                            print('Tps = %g Tpw = %g' % (Tps, Tpw))
                Severity: Major
                Found in src/wafo/spectrum/models.py and 6 other locations - About 40 mins to fix
                src/wafo/doc/tutorial_scripts/chapter2.py on lines 56..56
                src/wafo/spectrum/core.py on lines 2969..2971
                src/wafo/spectrum/models.py on lines 1045..1045
                src/wafo/spectrum/models.py on lines 1046..1046
                src/wafo/spectrum/models.py on lines 1047..1047
                src/wafo/stats/core.py on lines 1151..1151

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 12.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 7 locations. Consider refactoring.
                Open

                            print('gammas = %g gammaw = %g' % (gammas, gammaw))
                Severity: Major
                Found in src/wafo/spectrum/models.py and 6 other locations - About 40 mins to fix
                src/wafo/doc/tutorial_scripts/chapter2.py on lines 56..56
                src/wafo/spectrum/core.py on lines 2969..2971
                src/wafo/spectrum/models.py on lines 1046..1046
                src/wafo/spectrum/models.py on lines 1047..1047
                src/wafo/spectrum/models.py on lines 1048..1048
                src/wafo/stats/core.py on lines 1151..1151

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 12.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 7 locations. Consider refactoring.
                Open

                            print('Hps = %g Hpw = %g' % (Hps, Hpw))
                Severity: Major
                Found in src/wafo/spectrum/models.py and 6 other locations - About 40 mins to fix
                src/wafo/doc/tutorial_scripts/chapter2.py on lines 56..56
                src/wafo/spectrum/core.py on lines 2969..2971
                src/wafo/spectrum/models.py on lines 1045..1045
                src/wafo/spectrum/models.py on lines 1046..1046
                src/wafo/spectrum/models.py on lines 1048..1048
                src/wafo/stats/core.py on lines 1151..1151

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 12.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                    plt.plot(Tp, gam.T)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 40 mins to fix
                src/wafo/kdetools/tests/test_kdetools.py on lines 190..190
                src/wafo/kdetools/tests/test_kdetools.py on lines 194..194
                src/wafo/kdetools/tests/test_kdetools.py on lines 209..209
                src/wafo/kdetools/tests/test_kdetools.py on lines 213..213

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 12.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                    d1 = D2(theta, w)[0]
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 40 mins to fix
                src/wafo/stats/_continuous_distns.py on lines 4820..4820
                src/wafo/stats/_continuous_distns.py on lines 4821..4821
                src/wafo/stats/_continuous_distns.py on lines 4825..4825
                src/wafo/stats/_continuous_distns.py on lines 4826..4826

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 12.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                        if self.gamma is None or not isfinite(self.gamma) or self.gamma < 1:
                            self.gamma = jonswap_peakfact(Hm0, Tp)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 40 mins to fix
                src/wafo/kdetools/kdetools.py on lines 952..952
                src/wafo/kdetools/kdetools.py on lines 953..953
                src/wafo/kdetools/kdetools.py on lines 1199..1199
                src/wafo/kdetools/kernels.py on lines 559..559

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 12.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                    plt.contourf(Tp, Hm0, gam, v)
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 40 mins to fix
                src/wafo/spectrum/models.py on lines 2080..2080

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 12.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        jonswap = super(Tmaspec, self).__call__(w)
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 40 mins to fix
                src/wafo/containers.py on lines 553..553

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 12.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        D, phi0 = self(theta, w=w, wc=wc)
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 40 mins to fix
                src/wafo/kdetools/demo.py on lines 40..40

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 12.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                    plt.plot(w, k, w, k2)
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 40 mins to fix
                src/wafo/spectrum/models.py on lines 2111..2111

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 12.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 23 locations. Consider refactoring.
                Open

                        N = M + 1.0
                Severity: Major
                Found in src/wafo/spectrum/models.py and 22 other locations - About 35 mins to fix
                src/wafo/_misc_numba.py on lines 192..192
                src/wafo/gaussian.py on lines 364..364
                src/wafo/integrate.py on lines 348..348
                src/wafo/objects.py on lines 2572..2572
                src/wafo/spectrum/core.py on lines 2132..2132
                src/wafo/spectrum/core.py on lines 3472..3472
                src/wafo/stats/estimation.py on lines 1624..1624
                src/wafo/win32_utils.py on lines 15..15
                src/wafo/win32_utils.py on lines 16..16
                src/wafo/win32_utils.py on lines 17..17
                src/wafo/win32_utils.py on lines 18..18
                src/wafo/win32_utils.py on lines 19..19
                src/wafo/win32_utils.py on lines 20..20
                src/wafo/win32_utils.py on lines 21..21
                src/wafo/win32_utils.py on lines 22..22
                src/wafo/win32_utils.py on lines 23..23
                src/wafo/win32_utils.py on lines 24..24
                src/wafo/win32_utils.py on lines 25..25
                src/wafo/win32_utils.py on lines 26..26
                src/wafo/win32_utils.py on lines 27..27
                src/wafo/win32_utils.py on lines 28..28
                src/wafo/win32_utils.py on lines 29..29

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 11.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 16 locations. Consider refactoring.
                Open

                            K0[k1] = 0.0
                Severity: Major
                Found in src/wafo/spectrum/models.py and 15 other locations - About 35 mins to fix
                src/wafo/covariance/core.py on lines 408..408
                src/wafo/covariance/estimation.py on lines 137..137
                src/wafo/covariance/estimation.py on lines 164..164
                src/wafo/integrate_oscillating.py on lines 47..47
                src/wafo/integrate_oscillating.py on lines 401..401
                src/wafo/integrate_oscillating.py on lines 402..402
                src/wafo/interpolate.py on lines 784..784
                src/wafo/misc.py on lines 857..857
                src/wafo/misc.py on lines 1718..1719
                src/wafo/misc.py on lines 1740..1740
                src/wafo/misc.py on lines 2009..2009
                src/wafo/sg_filter/_core.py on lines 257..257
                src/wafo/sg_filter/_core.py on lines 350..350
                src/wafo/spectrum/models.py on lines 1874..1874
                src/wafo/spectrum/models.py on lines 1933..1933

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 11.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 16 locations. Consider refactoring.
                Open

                        s[k] = 0
                Severity: Major
                Found in src/wafo/spectrum/models.py and 15 other locations - About 35 mins to fix
                src/wafo/covariance/core.py on lines 408..408
                src/wafo/covariance/estimation.py on lines 137..137
                src/wafo/covariance/estimation.py on lines 164..164
                src/wafo/integrate_oscillating.py on lines 47..47
                src/wafo/integrate_oscillating.py on lines 401..401
                src/wafo/integrate_oscillating.py on lines 402..402
                src/wafo/interpolate.py on lines 784..784
                src/wafo/misc.py on lines 857..857
                src/wafo/misc.py on lines 1718..1719
                src/wafo/misc.py on lines 1740..1740
                src/wafo/misc.py on lines 2009..2009
                src/wafo/sg_filter/_core.py on lines 257..257
                src/wafo/sg_filter/_core.py on lines 350..350
                src/wafo/spectrum/models.py on lines 1856..1856
                src/wafo/spectrum/models.py on lines 1874..1874

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 11.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 16 locations. Consider refactoring.
                Open

                            B0[k1] = 0.0
                Severity: Major
                Found in src/wafo/spectrum/models.py and 15 other locations - About 35 mins to fix
                src/wafo/covariance/core.py on lines 408..408
                src/wafo/covariance/estimation.py on lines 137..137
                src/wafo/covariance/estimation.py on lines 164..164
                src/wafo/integrate_oscillating.py on lines 47..47
                src/wafo/integrate_oscillating.py on lines 401..401
                src/wafo/integrate_oscillating.py on lines 402..402
                src/wafo/interpolate.py on lines 784..784
                src/wafo/misc.py on lines 857..857
                src/wafo/misc.py on lines 1718..1719
                src/wafo/misc.py on lines 1740..1740
                src/wafo/misc.py on lines 2009..2009
                src/wafo/sg_filter/_core.py on lines 257..257
                src/wafo/sg_filter/_core.py on lines 350..350
                src/wafo/spectrum/models.py on lines 1856..1856
                src/wafo/spectrum/models.py on lines 1933..1933

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 11.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 14 locations. Consider refactoring.
                Open

                        tiny = 1. / realmax
                Severity: Major
                Found in src/wafo/spectrum/models.py and 13 other locations - About 35 mins to fix
                src/wafo/interpolate.py on lines 572..572
                src/wafo/padua.py on lines 277..277
                src/wafo/sg_filter/demos.py on lines 315..315
                src/wafo/stats/_continuous_distns.py on lines 1323..1323
                src/wafo/stats/_continuous_distns.py on lines 1636..1636
                src/wafo/stats/_continuous_distns.py on lines 1644..1644
                src/wafo/stats/_continuous_distns.py on lines 1649..1649
                src/wafo/stats/_continuous_distns.py on lines 1654..1654
                src/wafo/stats/_continuous_distns.py on lines 3168..3168
                src/wafo/stats/_continuous_distns.py on lines 3175..3175
                src/wafo/stats/_continuous_distns.py on lines 3967..3968
                src/wafo/stats/_continuous_distns.py on lines 6326..6326
                src/wafo/stats/_continuous_distns.py on lines 7372..7372

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 11.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 11 locations. Consider refactoring.
                Open

                        ix2 = ix ** 2
                Severity: Major
                Found in src/wafo/spectrum/models.py and 10 other locations - About 35 mins to fix
                src/wafo/integrate.py on lines 480..480
                src/wafo/kdetools/kernels.py on lines 342..342
                src/wafo/misc.py on lines 1984..1984
                src/wafo/sg_filter/demos.py on lines 163..163
                src/wafo/spectrum/core.py on lines 1995..1995
                src/wafo/spectrum/core.py on lines 2071..2071
                src/wafo/spectrum/core.py on lines 2147..2147
                src/wafo/stats/_continuous_distns.py on lines 8372..8372
                src/wafo/stats/estimation.py on lines 1211..1212
                src/wafo/stats/estimation.py on lines 1219..1219

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 11.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 10 locations. Consider refactoring.
                Open

                        self._check_parametric_ag(N, M, gammai)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 9 other locations - About 35 mins to fix
                src/wafo/interpolate.py on lines 623..623
                src/wafo/misc.py on lines 251..255
                src/wafo/sg_filter/_core.py on lines 1210..1210
                src/wafo/spectrum/core.py on lines 839..839
                src/wafo/stats/_continuous_distns.py on lines 6171..6171
                src/wafo/stats/_continuous_distns.py on lines 6178..6178
                src/wafo/stats/_continuous_distns.py on lines 7916..7916
                src/wafo/stats/_continuous_distns.py on lines 7921..7921
                src/wafo/stats/estimation.py on lines 398..398

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 11.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                        if chk_seastate:
                            self.chk_seastate()
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 35 mins to fix
                src/wafo/spectrum/models.py on lines 249..250
                src/wafo/spectrum/models.py on lines 548..549
                src/wafo/spectrum/models.py on lines 1189..1190
                src/wafo/stats/core.py on lines 247..248

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 11.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 4 locations. Consider refactoring.
                Open

                _EPS = finfo(float).eps
                Severity: Major
                Found in src/wafo/spectrum/models.py and 3 other locations - About 35 mins to fix
                src/wafo/spectrum/core.py on lines 1101..1101
                src/wafo/spectrum/core.py on lines 3509..3509
                src/wafo/spectrum/models.py on lines 1988..1988

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 11.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                            S = (self.Hm0 / 4.0) ** 2 / wp * _gengamspec(wn, self.N, self.M)
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 35 mins to fix
                src/wafo/spectrum/models.py on lines 572..572

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 11.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 4 locations. Consider refactoring.
                Open

                        self.Ag = (1 + f1NM * log(gammai) ** f2NM) / gammai
                Severity: Major
                Found in src/wafo/spectrum/models.py and 3 other locations - About 35 mins to fix
                src/wafo/stats/_continuous_distns.py on lines 1465..1465
                src/wafo/stats/_continuous_distns.py on lines 7976..7976
                src/wafo/stats/_continuous_distns.py on lines 7981..7981

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 11.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 4 locations. Consider refactoring.
                Open

                        realmax = finfo(float).max
                Severity: Major
                Found in src/wafo/spectrum/models.py and 3 other locations - About 35 mins to fix
                src/wafo/spectrum/core.py on lines 1101..1101
                src/wafo/spectrum/core.py on lines 3509..3509
                src/wafo/spectrum/models.py on lines 50..50

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 11.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                        if chk_seastate:
                            self.chk_seastate()
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 35 mins to fix
                src/wafo/spectrum/models.py on lines 249..250
                src/wafo/spectrum/models.py on lines 548..549
                src/wafo/spectrum/models.py on lines 904..905
                src/wafo/stats/core.py on lines 247..248

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 11.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                        if chk_seastate:
                            self.chk_seastate()
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 35 mins to fix
                src/wafo/spectrum/models.py on lines 548..549
                src/wafo/spectrum/models.py on lines 904..905
                src/wafo/spectrum/models.py on lines 1189..1190
                src/wafo/stats/core.py on lines 247..248

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 11.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 5 locations. Consider refactoring.
                Open

                        if chk_seastate:
                            self.chk_seastate()
                Severity: Major
                Found in src/wafo/spectrum/models.py and 4 other locations - About 35 mins to fix
                src/wafo/spectrum/models.py on lines 249..250
                src/wafo/spectrum/models.py on lines 904..905
                src/wafo/spectrum/models.py on lines 1189..1190
                src/wafo/stats/core.py on lines 247..248

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 11.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                        return Gf * _gengamspec(wn, self.N, self.M)
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 35 mins to fix
                src/wafo/spectrum/models.py on lines 259..259

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 11.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 3 locations. Consider refactoring.
                Open

                        return A.clip(min=1e-16)  # Avoid division by zero
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 2 other locations - About 35 mins to fix
                src/wafo/kdetools/kernels.py on lines 369..369
                src/wafo/kdetools/kernels.py on lines 395..395

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 11.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                    return 1.0 / cosh(x)
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 35 mins to fix
                src/wafo/wavemodels.py on lines 98..98

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 11.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        area1, unused_err1 = integrate.quad(self._localspec, 0, 1)
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 35 mins to fix
                src/wafo/spectrum/models.py on lines 1116..1116

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 11.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        isFreqDepDir = (Nt0 == Nw)
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 35 mins to fix
                src/wafo/misc.py on lines 1833..1833

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 11.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        spreadfun = self._spreadfun[self.type[0]]
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 35 mins to fix
                src/wafo/spectrum/models.py on lines 633..635

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 11.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                            M = 1.0 / optimize.fminbound(self._localoptfun, 0.01, 5)
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 35 mins to fix
                src/wafo/spectrum/models.py on lines 619..619

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 11.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                    def tospecdata2d(self, specdata, theta=None, wc=0.52, nt=51):
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 35 mins to fix
                src/wafo/markov.py on lines 102..102

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 11.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 7 locations. Consider refactoring.
                Open

                        ix = arange(1, Nt)
                Severity: Major
                Found in src/wafo/spectrum/models.py and 6 other locations - About 30 mins to fix
                src/wafo/objects.py on lines 2586..2586
                src/wafo/spectrum/core.py on lines 1954..1954
                src/wafo/spectrum/core.py on lines 2022..2022
                src/wafo/tests/test_padua.py on lines 67..67
                src/wafo/tests/test_padua.py on lines 76..76
                src/wafo/tests/test_padua.py on lines 88..88

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 10.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Identical blocks of code found in 2 locations. Consider refactoring.
                Open

                    D1 = Spreading(type='cos', theta0=th0, method=None) # frequency independent
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 30 mins to fix
                src/wafo/doc/tutorial_scripts/chapter1.py on lines 84..84

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 10.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 4 locations. Consider refactoring.
                Open

                    def tospecdata(self, w=None, wc=None, nw=257):
                Severity: Major
                Found in src/wafo/spectrum/models.py and 3 other locations - About 30 mins to fix
                src/wafo/sg_filter/demos.py on lines 88..88
                src/wafo/stats/core.py on lines 401..401
                src/wafo/stats/core.py on lines 541..541

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 10.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        w = maximum(atleast_1d(wn), 0.0)
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 30 mins to fix
                src/wafo/tests/test_gaussian.py on lines 68..68

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 10.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                Similar blocks of code found in 2 locations. Consider refactoring.
                Open

                        x = clip(2. * B, tiny, realmax)
                Severity: Minor
                Found in src/wafo/spectrum/models.py and 1 other location - About 30 mins to fix
                src/wafo/kdetools/kernels.py on lines 1111..1111

                Duplicated Code

                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                Tuning

                This issue has a mass of 10.

                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                Refactorings

                Further Reading

                There are no issues that match your filters.

                Category
                Status