wafo-project/pywafo

View on GitHub
src/wafo/sg_filter/demos.py

Summary

Maintainability
F
1 wk
Test Coverage

Function demo_tide_filter has 40 lines of code (exceeds 25 allowed). Consider refactoring.
Open

def demo_tide_filter():
    """
    Examples
    --------
    >>> demo_tide_filter()
Severity: Minor
Found in src/wafo/sg_filter/demos.py - About 1 hr to fix

    Function demo_kalman_sine has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    def demo_kalman_sine():
        """Kalman Filter demonstration with sine signal.
    
        Examples
        --------
    Severity: Minor
    Found in src/wafo/sg_filter/demos.py - About 1 hr to fix

      Remove this commented out code.
      Open

          # smooth = HampelFilter(adaptive=50)
      Severity: Major
      Found in src/wafo/sg_filter/demos.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

          # y2 = lfilter(b, a, y)#, zi=y[0]*zi)  # standard filter
      Severity: Major
      Found in src/wafo/sg_filter/demos.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

          # Q = AB[:n, :] / AB[n:(2 * n), :]
      Severity: Major
      Found in src/wafo/sg_filter/demos.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

          # y2 = [lowess(y[max(i-60,0):i + 1], t[max(i-60,0):i + 1], frac=.3)[-1,1]
      Severity: Major
      Found in src/wafo/sg_filter/demos.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

          # import statsmodels.api as sa
      Severity: Major
      Found in src/wafo/sg_filter/demos.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

          # plt.plot(t, y2, 'b.-', linewidth=2, label='lowess @ %g Hz' % freq_filt)
      Severity: Major
      Found in src/wafo/sg_filter/demos.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"

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

          filt = Kalman(R=R, x=np.array([[tide[0]], [0]]), P=P, A=A, Q=Q, H=H, B=b)
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 3 hrs to fix
      src/wafo/sg_filter/demos.py on lines 334..334

      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

          filt2 = Kalman(R=R, x=np.array([[tide[0]], [0]]), P=P, A=A, Q=Q, H=H, B=b)
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 3 hrs to fix
      src/wafo/sg_filter/demos.py on lines 333..333

      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

          x0 = 2 * np.cos(t) * (1 - np.cos(t))
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 2 hrs to fix
      src/wafo/sg_filter/demos.py on lines 434..434

      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 35.

      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

          y0 = 2 * np.sin(t) * (1 - np.cos(t))
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 2 hrs to fix
      src/wafo/sg_filter/demos.py on lines 433..433

      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 35.

      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

          A, Q = lti_disc(F, L=None, Q=np.diag([0, q]), dt=dt)
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 2 hrs to fix
      src/wafo/sg_filter/demos.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 31.

      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

          A, Q = lti_disc(F, L=None, Q=np.diag([0, q]), dt=dt)
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 2 hrs to fix
      src/wafo/sg_filter/demos.py on lines 168..168

      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 31.

      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

          for i, zi in enumerate(z):
              x[i] = filt(zi, u)  # perform a Kalman filter iteration
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 2 hrs to fix
      src/wafo/sg_filter/tests/test_sg_filter.py on lines 30..31

      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 3 locations. Consider refactoring.
      Open

          y = y0 + np.random.randn(y0.size) * 0.1
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 2 other locations - About 1 hr to fix
      src/wafo/sg_filter/demos.py on lines 420..420
      src/wafo/sg_filter/demos.py on lines 435..435

      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 27.

      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

          x = x0 + np.random.randn(x0.size) * 0.1
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 2 other locations - About 1 hr to fix
      src/wafo/sg_filter/demos.py on lines 420..420
      src/wafo/sg_filter/demos.py on lines 436..436

      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 27.

      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

          fn = f + np.random.randn(*f.shape) * 0.5
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 2 other locations - About 1 hr to fix
      src/wafo/sg_filter/demos.py on lines 435..435
      src/wafo/sg_filter/demos.py on lines 436..436

      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 27.

      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

          T = np.arange(0, 30 + dt / 2, dt)
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 1 hr to fix
      src/wafo/objects.py on lines 279..279

      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 25.

      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

          YY, res = HampelFilter(dx=3, t=3, fulloutput=True)(Y)
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 1 hr to fix
      src/wafo/sg_filter/demos.py on lines 268..268

      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 24.

      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

          YY2, res2 = HampelFilter(dx=3, t=0, fulloutput=True)(Y)  # median
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 1 hr to fix
      src/wafo/sg_filter/demos.py on lines 266..266

      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 24.

      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

          dt = tvec[1] - tvec[0]
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 15 other locations - About 1 hr to fix
      src/wafo/covariance/estimation.py on lines 28..28
      src/wafo/covariance/estimation.py on lines 30..30
      src/wafo/kdetools/kdetools.py on lines 1125..1125
      src/wafo/kdetools/tests/test_gridding.py on lines 19..19
      src/wafo/kdetools/tests/test_gridding.py on lines 34..34
      src/wafo/kdetools/tests/test_gridding.py on lines 53..53
      src/wafo/kdetools/tests/test_gridding.py on lines 77..77
      src/wafo/misc.py on lines 2465..2465
      src/wafo/misc.py on lines 2541..2541
      src/wafo/objects.py on lines 1348..1348
      src/wafo/objects.py on lines 1350..1350
      src/wafo/spectrum/core.py on lines 1274..1274
      src/wafo/spectrum/core.py on lines 1289..1289
      src/wafo/spectrum/core.py on lines 1406..1406
      src/wafo/spectrum/core.py on lines 1712..1712

      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

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

          filt = Kalman(R=r, A=1, Q=q, H=h, B=b)
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 1 hr to fix
      src/wafo/sg_filter/tests/test_sg_filter.py on lines 15..15

      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 4 locations. Consider refactoring.
      Open

          if L is None:
              L = np.eye(n)
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 3 other locations - About 1 hr to fix
      src/wafo/kdetools/kdetools.py on lines 1090..1091
      src/wafo/objects.py on lines 348..349
      src/wafo/stats/estimation.py on lines 298..299

      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

          z = truth + np.random.randn(n) * np.sqrt(r)  # measurement
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 1 hr to fix
      src/wafo/sg_filter/demos.py on lines 73..73

      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

          truth = np.random.randn(n) * np.sqrt(q) + V0
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 1 hr to fix
      src/wafo/sg_filter/demos.py on lines 74..74

      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

          _hx = plt.plot(x[:, 0], 'b-', label='Kalman output')
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 1 hr to fix
      src/wafo/covariance/core.py on lines 727..727

      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 15 locations. Consider refactoring.
      Open

      if __name__ == '__main__':
          from wafo.testing import test_docstrings
          test_docstrings(__file__)
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 14 other locations - About 1 hr to fix
      src/wafo/bitwise.py on lines 85..87
      src/wafo/containers.py on lines 639..641
      src/wafo/dctpack.py on lines 435..437
      src/wafo/demos.py on lines 144..146
      src/wafo/gaussian.py on lines 1033..1035
      src/wafo/integrate.py on lines 1470..1472
      src/wafo/kdetools/demo.py on lines 328..330
      src/wafo/kdetools/gridding.py on lines 362..364
      src/wafo/markov.py on lines 1439..1441
      src/wafo/misc.py on lines 2928..2930
      src/wafo/padua.py on lines 529..531
      src/wafo/sg_filter/_core.py on lines 1221..1223
      src/wafo/transform/core.py on lines 214..216
      src/wafo/wave_theory/dispersion_relation.py on lines 206..208

      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 20.

      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

          F = np.atleast_2d([[0, 1],
                             [0, 0]])
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 3 other locations - About 1 hr to fix
      src/wafo/interpolate.py on lines 1283..1283
      src/wafo/interpolate.py on lines 1317..1317
      src/wafo/sg_filter/demos.py on lines 322..323

      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 20.

      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

          F = np.atleast_2d([[0, 1],
                             [0, 0]])
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 3 other locations - About 1 hr to fix
      src/wafo/interpolate.py on lines 1283..1283
      src/wafo/interpolate.py on lines 1317..1317
      src/wafo/sg_filter/demos.py on lines 166..167

      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 20.

      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

          YY1, res1 = HampelFilter(dx=1, t=3, adaptive=0.1, fulloutput=True)(Y)
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 1 hr to fix
      src/wafo/sg_filter/tests/test_sg_filter.py on lines 57..57

      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 20.

      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

          true_d_signal = (2 + tvec) * np.cos(tvec * (2.0 + tvec))
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 1 hr to fix
      src/wafo/sg_filter/demos.py on lines 21..21

      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

          xs, ys = smooth(x), smooth(y)
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 1 hr to fix
      src/wafo/misc.py on lines 227..227

      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

          X = 3 * np.sin(w * T)
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 1 hr to fix
      src/wafo/stats/_continuous_distns.py on lines 6787..6787

      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

          true_signal = np.sin(tvec * (2.0 + tvec))
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 1 hr to fix
      src/wafo/sg_filter/demos.py on lines 22..22

      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

          plt.plot(t, y, 'r.-', linewidth=2, label='raw data')
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 2 other locations - About 1 hr to fix
      src/wafo/sg_filter/demos.py on lines 365..365
      src/wafo/sg_filter/demos.py on lines 367..367

      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 3 locations. Consider refactoring.
      Open

          plt.plot(t, y4, 'k.-', linewidth=2, label='kalman')
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 2 other locations - About 1 hr to fix
      src/wafo/sg_filter/demos.py on lines 361..361
      src/wafo/sg_filter/demos.py on lines 367..367

      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 3 locations. Consider refactoring.
      Open

          plt.plot(t, tide, 'y-', linewidth=2, label='True tide')
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 2 other locations - About 1 hr to fix
      src/wafo/sg_filter/demos.py on lines 361..361
      src/wafo/sg_filter/demos.py on lines 365..365

      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 7 locations. Consider refactoring.
      Open

          d_signal = savgol1.smooth(signal) / dt
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 6 other locations - About 1 hr to fix
      src/wafo/interpolate.py on lines 625..625
      src/wafo/kdetools/kernels.py on lines 804..804
      src/wafo/kdetools/kernels.py on lines 1004..1004
      src/wafo/kdetools/kernels.py on lines 1108..1108
      src/wafo/kdetools/kernels.py on lines 1235..1235
      src/wafo/stats/_continuous_distns.py on lines 4458..4458

      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

          signal = true_signal + .15 * noise
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 4 other locations - About 1 hr to fix
      src/wafo/_misc_numba.py on lines 172..172
      src/wafo/_misc_numba.py on lines 182..182
      src/wafo/spectrum/core.py on lines 2991..2991
      src/wafo/stats/_continuous_distns.py on lines 5819..5819

      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

          plt.plot(X, res['UB'], 'r--')  # Upper Bounds on Hampel Filter
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 2 other locations - About 1 hr to fix
      src/wafo/sg_filter/demos.py on lines 284..284
      src/wafo/sg_filter/demos.py on lines 285..285

      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

          plt.plot(X, res['Y0'], 'b--')  # Nominal Data
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 2 other locations - About 1 hr to fix
      src/wafo/sg_filter/demos.py on lines 285..285
      src/wafo/sg_filter/demos.py on lines 286..286

      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.shape(F)[0]
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 2 other locations - About 1 hr to fix
      src/wafo/padua.py on lines 391..391
      src/wafo/padua.py on lines 516..516

      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

          plt.plot(X, res['LB'], 'r--')  # Lower Bounds on Hampel Filter
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 2 other locations - About 1 hr to fix
      src/wafo/sg_filter/demos.py on lines 284..284
      src/wafo/sg_filter/demos.py on lines 286..286

      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

          noise = np.random.normal(size=true_signal.shape)
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 2 other locations - About 1 hr to fix
      src/wafo/stats/_continuous_distns.py on lines 7024..7024
      src/wafo/stats/_continuous_distns.py on lines 7025..7025

      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

          y = np.exp(-t ** 2) + np.random.normal(0, 0.05, np.shape(t))
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 2 other locations - About 1 hr to fix
      src/wafo/sg_filter/tests/test_sg_filter.py on lines 41..41
      src/wafo/tests/test_integrate.py on lines 109..109

      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

          q = (0.1 * sd) ** 2   # variance of process noise s the car operates
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 1 hr to fix
      src/wafo/sg_filter/demos.py on lines 306..306

      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

          Phi = np.vstack((np.hstack((F, np.dot(np.dot(L, Q), L.T))),
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 1 hr to fix
      src/wafo/sg_filter/_core.py on lines 1018..1018

      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

          r = (100 * sd) ** 2  # variance of measurement error
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 1 hr to fix
      src/wafo/sg_filter/demos.py on lines 305..305

      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

          _hz = plt.plot(z, 'r.', label='observations')
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 4 other locations - About 1 hr to fix
      src/wafo/sg_filter/demos.py on lines 80..80
      src/wafo/sg_filter/demos.py on lines 82..82
      src/wafo/sg_filter/demos.py on lines 83..83
      src/wafo/sg_filter/demos.py on lines 193..193

      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 5 locations. Consider refactoring.
      Open

          _hx = plt.plot(x, 'b-', label='Kalman output')
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 4 other locations - About 1 hr to fix
      src/wafo/sg_filter/demos.py on lines 80..80
      src/wafo/sg_filter/demos.py on lines 83..83
      src/wafo/sg_filter/demos.py on lines 190..190
      src/wafo/sg_filter/demos.py on lines 193..193

      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 5 locations. Consider refactoring.
      Open

          _hz = plt.plot(z, 'r.', label='observations')
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 4 other locations - About 1 hr to fix
      src/wafo/sg_filter/demos.py on lines 82..82
      src/wafo/sg_filter/demos.py on lines 83..83
      src/wafo/sg_filter/demos.py on lines 190..190
      src/wafo/sg_filter/demos.py on lines 193..193

      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 5 locations. Consider refactoring.
      Open

          _ht = plt.plot(truth, 'g-', label='true voltage')
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 4 other locations - About 1 hr to fix
      src/wafo/sg_filter/demos.py on lines 80..80
      src/wafo/sg_filter/demos.py on lines 82..82
      src/wafo/sg_filter/demos.py on lines 83..83
      src/wafo/sg_filter/demos.py on lines 190..190

      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 5 locations. Consider refactoring.
      Open

          _ht = plt.plot(truth, 'g-', label='true voltage')
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 4 other locations - About 1 hr to fix
      src/wafo/sg_filter/demos.py on lines 80..80
      src/wafo/sg_filter/demos.py on lines 82..82
      src/wafo/sg_filter/demos.py on lines 190..190
      src/wafo/sg_filter/demos.py on lines 193..193

      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

          _h = plt.plot(x, y, 'r.', x, z, 'k', linewidth=2)
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 1 hr to fix
      src/wafo/sg_filter/demos.py on lines 405..405

      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

          plt.plot(x, y, 'r.', x, zr, 'k', linewidth=2)
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 1 hr to fix
      src/wafo/sg_filter/demos.py on lines 402..402

      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

          _fs, s = smoothn(fn, fulloutput=True)
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 1 hr to fix
      src/wafo/sg_filter/_core.py on lines 370..370

      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

          [x, y] = np.meshgrid(xp, xp)
      Severity: Major
      Found in src/wafo/sg_filter/demos.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/spectrum/models.py on lines 2099..2099
      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 10 locations. Consider refactoring.
      Open

          X = np.arange(len(YY))
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 9 other locations - About 55 mins to fix
      src/wafo/kdetools/gridding.py on lines 66..66
      src/wafo/kdetools/kdetools.py on lines 439..439
      src/wafo/kdetools/kdetools.py on lines 463..463
      src/wafo/markov.py on lines 120..120
      src/wafo/markov.py on lines 345..345
      src/wafo/markov.py on lines 367..367
      src/wafo/markov.py on lines 611..611
      src/wafo/stats/core.py on lines 438..439
      src/wafo/stats/core.py on lines 584..585

      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

          A = expm(F * dt)
      Severity: Major
      Found in src/wafo/sg_filter/demos.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/spectrum/models.py on lines 1709..1709

      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

              y5.append(tmp[1])
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 2 other locations - About 55 mins to fix
      src/wafo/sg_filter/demos.py on lines 355..355
      src/wafo/spectrum/models.py on lines 2153..2153

      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

          tide = 100 * np.sin(freq_tide * w * t + 2 * np.pi / 4) + 100
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 2 other locations - About 55 mins to fix
      src/wafo/tests/test_integrate_oscillating.py on lines 247..247
      src/wafo/tests/test_integrate_oscillating.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 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

          _PP = np.zeros((m, m, n))
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 2 other locations - About 55 mins to fix
      src/wafo/interpolate.py on lines 104..104
      src/wafo/kdetools/tests/test_gridding.py on lines 54..54

      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

              y4.append(tmp[0])
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 2 other locations - About 55 mins to fix
      src/wafo/sg_filter/demos.py on lines 356..356
      src/wafo/spectrum/models.py on lines 2153..2153

      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

              tmp = np.ravel(filt(j, u=u))
      Severity: Minor
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 55 mins to fix
      src/wafo/spectrum/core.py on lines 3364..3364

      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 35 locations. Consider refactoring.
      Open

          _MM = np.zeros((m, n))
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 34 other locations - About 50 mins to fix
      src/wafo/integrate.py on lines 1160..1160
      src/wafo/integrate_oscillating.py on lines 294..294
      src/wafo/kdetools/demo.py on lines 274..274
      src/wafo/kdetools/tests/test_gridding.py on lines 35..35
      src/wafo/markov.py on lines 62..62
      src/wafo/markov.py on lines 217..217
      src/wafo/markov.py on lines 273..273
      src/wafo/markov.py on lines 400..400
      src/wafo/markov.py on lines 498..498
      src/wafo/markov.py on lines 631..631
      src/wafo/markov.py on lines 800..800
      src/wafo/markov.py on lines 1170..1170
      src/wafo/markov.py on lines 1171..1171
      src/wafo/markov.py on lines 1175..1175
      src/wafo/markov.py on lines 1176..1176
      src/wafo/markov.py on lines 1185..1185
      src/wafo/markov.py on lines 1186..1186
      src/wafo/misc.py on lines 2300..2300
      src/wafo/misc.py on lines 2471..2471
      src/wafo/misc.py on lines 2477..2477
      src/wafo/misc.py on lines 2552..2552
      src/wafo/objects.py on lines 785..785
      src/wafo/objects.py on lines 1012..1012
      src/wafo/sg_filter/demos.py on lines 123..124
      src/wafo/sg_filter/demos.py on lines 185..185
      src/wafo/spectrum/core.py on lines 1707..1707
      src/wafo/stats/core.py on lines 965..965
      src/wafo/stats/core.py on lines 972..972
      src/wafo/stats/core.py on lines 1281..1281
      src/wafo/stats/core.py on lines 1314..1314
      src/wafo/stats/core.py on lines 1315..1315
      src/wafo/stats/estimation.py on lines 1225..1225
      src/wafo/wavemodels.py on lines 119..119
      src/wafo/wavemodels.py on lines 220..220

      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 35 locations. Consider refactoring.
      Open

          if Q is None:
              Q = np.zeros((n, n))
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 34 other locations - About 50 mins to fix
      src/wafo/integrate.py on lines 1160..1160
      src/wafo/integrate_oscillating.py on lines 294..294
      src/wafo/kdetools/demo.py on lines 274..274
      src/wafo/kdetools/tests/test_gridding.py on lines 35..35
      src/wafo/markov.py on lines 62..62
      src/wafo/markov.py on lines 217..217
      src/wafo/markov.py on lines 273..273
      src/wafo/markov.py on lines 400..400
      src/wafo/markov.py on lines 498..498
      src/wafo/markov.py on lines 631..631
      src/wafo/markov.py on lines 800..800
      src/wafo/markov.py on lines 1170..1170
      src/wafo/markov.py on lines 1171..1171
      src/wafo/markov.py on lines 1175..1175
      src/wafo/markov.py on lines 1176..1176
      src/wafo/markov.py on lines 1185..1185
      src/wafo/markov.py on lines 1186..1186
      src/wafo/misc.py on lines 2300..2300
      src/wafo/misc.py on lines 2471..2471
      src/wafo/misc.py on lines 2477..2477
      src/wafo/misc.py on lines 2552..2552
      src/wafo/objects.py on lines 785..785
      src/wafo/objects.py on lines 1012..1012
      src/wafo/sg_filter/demos.py on lines 172..172
      src/wafo/sg_filter/demos.py on lines 185..185
      src/wafo/spectrum/core.py on lines 1707..1707
      src/wafo/stats/core.py on lines 965..965
      src/wafo/stats/core.py on lines 972..972
      src/wafo/stats/core.py on lines 1281..1281
      src/wafo/stats/core.py on lines 1314..1314
      src/wafo/stats/core.py on lines 1315..1315
      src/wafo/stats/estimation.py on lines 1225..1225
      src/wafo/wavemodels.py on lines 119..119
      src/wafo/wavemodels.py on lines 220..220

      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 35 locations. Consider refactoring.
      Open

          x = np.zeros((n, m))
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 34 other locations - About 50 mins to fix
      src/wafo/integrate.py on lines 1160..1160
      src/wafo/integrate_oscillating.py on lines 294..294
      src/wafo/kdetools/demo.py on lines 274..274
      src/wafo/kdetools/tests/test_gridding.py on lines 35..35
      src/wafo/markov.py on lines 62..62
      src/wafo/markov.py on lines 217..217
      src/wafo/markov.py on lines 273..273
      src/wafo/markov.py on lines 400..400
      src/wafo/markov.py on lines 498..498
      src/wafo/markov.py on lines 631..631
      src/wafo/markov.py on lines 800..800
      src/wafo/markov.py on lines 1170..1170
      src/wafo/markov.py on lines 1171..1171
      src/wafo/markov.py on lines 1175..1175
      src/wafo/markov.py on lines 1176..1176
      src/wafo/markov.py on lines 1185..1185
      src/wafo/markov.py on lines 1186..1186
      src/wafo/misc.py on lines 2300..2300
      src/wafo/misc.py on lines 2471..2471
      src/wafo/misc.py on lines 2477..2477
      src/wafo/misc.py on lines 2552..2552
      src/wafo/objects.py on lines 785..785
      src/wafo/objects.py on lines 1012..1012
      src/wafo/sg_filter/demos.py on lines 123..124
      src/wafo/sg_filter/demos.py on lines 172..172
      src/wafo/spectrum/core.py on lines 1707..1707
      src/wafo/stats/core.py on lines 965..965
      src/wafo/stats/core.py on lines 972..972
      src/wafo/stats/core.py on lines 1281..1281
      src/wafo/stats/core.py on lines 1314..1314
      src/wafo/stats/core.py on lines 1315..1315
      src/wafo/stats/estimation.py on lines 1225..1225
      src/wafo/wavemodels.py on lines 119..119
      src/wafo/wavemodels.py on lines 220..220

      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

          plt.legend(frameon=False, fontsize=14)
      Severity: Minor
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 50 mins to fix
      src/wafo/kdetools/demo.py on lines 319..319

      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

          xp = np.arange(0, 1, 0.02)  # np.r_[0:1:0.02]
      Severity: Major
      Found in src/wafo/sg_filter/demos.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/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/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

          _h = plt.contourf(xp, xp, f)
      Severity: Major
      Found in src/wafo/sg_filter/demos.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/spectrum/models.py on lines 1582..1582
      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

          t = np.linspace(-4, 4, 500)
      Severity: Major
      Found in src/wafo/sg_filter/demos.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 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/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 17 locations. Consider refactoring.
      Open

          s2 = smoothn(signal, robust=True)
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 16 other locations - About 45 mins to fix
      src/wafo/containers.py on lines 611..611
      src/wafo/covariance/core.py on lines 632..632
      src/wafo/integrate.py on lines 1197..1197
      src/wafo/integrate.py on lines 1198..1198
      src/wafo/integrate.py on lines 1199..1199
      src/wafo/integrate.py on lines 1402..1402
      src/wafo/objects.py on lines 1655..1655
      src/wafo/sg_filter/demos.py on lines 400..400
      src/wafo/spectrum/core.py on lines 1428..1428
      src/wafo/spectrum/core.py on lines 1429..1429
      src/wafo/stats/core.py on lines 621..621
      src/wafo/stats/core.py on lines 624..624
      src/wafo/stats/estimation.py on lines 573..573
      src/wafo/stats/estimation.py on lines 578..578
      src/wafo/stats/estimation.py on lines 1399..1399
      src/wafo/transform/estimation.py on lines 444..444

      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

          _h = plt.contourf(xp, xp, fn)
      Severity: Major
      Found in src/wafo/sg_filter/demos.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 426..426
      src/wafo/sg_filter/demos.py on lines 428..428
      src/wafo/spectrum/models.py on lines 1582..1582
      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 36 locations. Consider refactoring.
      Open

          _h = plt.contourf(xp, xp, fs2)
      Severity: Major
      Found in src/wafo/sg_filter/demos.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 428..428
      src/wafo/spectrum/models.py on lines 1582..1582
      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 17 locations. Consider refactoring.
      Open

          zr = smoothn(y, robust=True)  # Robust smoothing
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 16 other locations - About 45 mins to fix
      src/wafo/containers.py on lines 611..611
      src/wafo/covariance/core.py on lines 632..632
      src/wafo/integrate.py on lines 1197..1197
      src/wafo/integrate.py on lines 1198..1198
      src/wafo/integrate.py on lines 1199..1199
      src/wafo/integrate.py on lines 1402..1402
      src/wafo/objects.py on lines 1655..1655
      src/wafo/sg_filter/demos.py on lines 37..37
      src/wafo/spectrum/core.py on lines 1428..1428
      src/wafo/spectrum/core.py on lines 1429..1429
      src/wafo/stats/core.py on lines 621..621
      src/wafo/stats/core.py on lines 624..624
      src/wafo/stats/estimation.py on lines 573..573
      src/wafo/stats/estimation.py on lines 578..578
      src/wafo/stats/estimation.py on lines 1399..1399
      src/wafo/transform/estimation.py on lines 444..444

      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

          tvec = np.arange(0, 6.28, .02)
      Severity: Major
      Found in src/wafo/sg_filter/demos.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 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/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 4 locations. Consider refactoring.
      Open

          _h = plt.subplot(132),
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 3 other locations - About 45 mins to fix
      src/wafo/sg_filter/demos.py on lines 401..401
      src/wafo/sg_filter/demos.py on lines 423..423
      src/wafo/sg_filter/demos.py on lines 427..427

      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

          y = np.cos(x / 10) + (x / 50) ** 2 + np.random.randn(np.size(x)) / 10
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 3 other locations - About 45 mins to fix
      src/wafo/misc.py on lines 1914..1914
      src/wafo/spectrum/models.py on lines 661..661
      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

          _h = plt.subplot(131),
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 3 other locations - About 45 mins to fix
      src/wafo/sg_filter/demos.py on lines 401..401
      src/wafo/sg_filter/demos.py on lines 425..425
      src/wafo/sg_filter/demos.py on lines 427..427

      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

          _h0 = plt.subplot(121),
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 3 other locations - About 45 mins to fix
      src/wafo/sg_filter/demos.py on lines 423..423
      src/wafo/sg_filter/demos.py on lines 425..425
      src/wafo/sg_filter/demos.py on lines 427..427

      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

          _h = plt.subplot(133),
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 3 other locations - About 45 mins to fix
      src/wafo/sg_filter/demos.py on lines 401..401
      src/wafo/sg_filter/demos.py on lines 423..423
      src/wafo/sg_filter/demos.py on lines 425..425

      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

          freq_tide = 1. / (12 * 60 * 60)
      Severity: Minor
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 45 mins to fix
      src/wafo/doc/tutorial_scripts/chapter5.py on lines 111..111

      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

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

          x, y, x0, y0 = _cardioid()
      Severity: Minor
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 40 mins to fix
      src/wafo/sg_filter/demos.py on lines 463..463

      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

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

          x, y, x0, y0 = _cardioid()
      Severity: Minor
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 40 mins to fix
      src/wafo/sg_filter/demos.py on lines 448..448

      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

          ysg = SavitzkyGolay(n, degree=1, diff_order=0)(y)
      Severity: Minor
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 40 mins to fix
      src/wafo/spectrum/core.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 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 14 locations. Consider refactoring.
      Open

          freq = 1. / dt
      Severity: Major
      Found in src/wafo/sg_filter/demos.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/spectrum/models.py on lines 1989..1989
      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 13 locations. Consider refactoring.
      Open

          fn = (freq / 2)
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 12 other locations - About 35 mins to fix
      src/wafo/integrate.py on lines 1213..1213
      src/wafo/integrate_oscillating.py on lines 304..304
      src/wafo/kdetools/demo.py on lines 32..32
      src/wafo/kdetools/kernels.py on lines 1110..1110
      src/wafo/sg_filter/demos.py on lines 313..313
      src/wafo/stats/_continuous_distns.py on lines 4978..4978
      src/wafo/stats/_continuous_distns.py on lines 6859..6859
      src/wafo/stats/core.py on lines 231..231
      src/wafo/stats/estimation.py on lines 318..318
      src/wafo/transform/models.py on lines 206..206
      src/wafo/transform/models.py on lines 207..207
      src/wafo/transform/models.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 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 13 locations. Consider refactoring.
      Open

          freq_filt = freq_wave / 10
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 12 other locations - About 35 mins to fix
      src/wafo/integrate.py on lines 1213..1213
      src/wafo/integrate_oscillating.py on lines 304..304
      src/wafo/kdetools/demo.py on lines 32..32
      src/wafo/kdetools/kernels.py on lines 1110..1110
      src/wafo/sg_filter/demos.py on lines 316..316
      src/wafo/stats/_continuous_distns.py on lines 4978..4978
      src/wafo/stats/_continuous_distns.py on lines 6859..6859
      src/wafo/stats/core.py on lines 231..231
      src/wafo/stats/estimation.py on lines 318..318
      src/wafo/transform/models.py on lines 206..206
      src/wafo/transform/models.py on lines 207..207
      src/wafo/transform/models.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 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

          R = sd ** 2
      Severity: Major
      Found in src/wafo/sg_filter/demos.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/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/spectrum/models.py on lines 1672..1672
      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

          freq_wave = 1. / 10
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 9 other locations - About 35 mins to fix
      src/wafo/graphutil.py on lines 139..139
      src/wafo/objects.py on lines 2507..2507
      src/wafo/stats/_continuous_distns.py on lines 515..515
      src/wafo/stats/_continuous_distns.py on lines 517..517
      src/wafo/stats/estimation.py on lines 1673..1673
      src/wafo/stats/estimation.py on lines 1683..1683
      src/wafo/transform/tests/test_models.py on lines 8..8
      src/wafo/transform/tests/test_models.py on lines 21..21
      src/wafo/transform/tests/test_models.py on lines 35..35

      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 6 locations. Consider refactoring.
      Open

          plt.plot(X, Y, 'b.')  # Original Data
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 5 other locations - About 35 mins to fix
      src/wafo/doc/tutorial_scripts/chapter3.py on lines 137..137
      src/wafo/integrate.py on lines 104..105
      src/wafo/sg_filter/demos.py on lines 283..283
      src/wafo/spectrum/core.py on lines 1160..1160
      src/wafo/spectrum/core.py on lines 1168..1168

      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 6 locations. Consider refactoring.
      Open

          plt.plot(X, YY, 'r')  # Hampel Filtered Data
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 5 other locations - About 35 mins to fix
      src/wafo/doc/tutorial_scripts/chapter3.py on lines 137..137
      src/wafo/integrate.py on lines 104..105
      src/wafo/sg_filter/demos.py on lines 282..282
      src/wafo/spectrum/core.py on lines 1160..1160
      src/wafo/spectrum/core.py on lines 1168..1168

      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 6 locations. Consider refactoring.
      Open

          smooth = HodrickPrescott(w=20000)
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 5 other locations - About 35 mins to fix
      src/wafo/spectrum/core.py on lines 1354..1354
      src/wafo/spectrum/tests/test_models.py on lines 53..53
      src/wafo/tests/test_gaussian.py on lines 63..63
      src/wafo/tests/test_misc.py on lines 313..313
      src/wafo/tests/test_misc.py on lines 320..320

      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

          r = 0.05 ** 2  # variance of measurement error
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 4 other locations - About 35 mins to fix
      src/wafo/kdetools/demo.py on lines 221..221
      src/wafo/kdetools/demo.py on lines 222..222
      src/wafo/misc.py on lines 2253..2253
      src/wafo/sg_filter/tests/test_sg_filter.py on lines 12..12

      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

          i = res['outliers']
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 3 other locations - About 35 mins to fix
      src/wafo/doc/tutorial_scripts/chapter3.py on lines 90..90
      src/wafo/doc/tutorial_scripts/chapter3.py on lines 129..129
      src/wafo/doc/tutorial_scripts/chapter3.py on lines 130..130

      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

          Q = np.linalg.solve(AB[n:(2 * n), :].T, AB[:n, :].T)
      Severity: Minor
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 35 mins to fix
      src/wafo/covariance/core.py on lines 486..486

      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

          plt.plot(true_d_signal, 'r--')
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 3 other locations - About 30 mins to fix
      src/wafo/sg_filter/demos.py on lines 40..40
      src/wafo/spectrum/core.py on lines 3280..3280
      src/wafo/tests/test_containers.py on lines 31..32

      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 lti_disc(F, L=None, Q=None, dt=1):
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 3 other locations - About 30 mins to fix
      src/wafo/spectrum/models.py on lines 132..132
      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 4 locations. Consider refactoring.
      Open

          plt.plot(true_signal, 'r--')
      Severity: Major
      Found in src/wafo/sg_filter/demos.py and 3 other locations - About 30 mins to fix
      src/wafo/sg_filter/demos.py on lines 51..51
      src/wafo/spectrum/core.py on lines 3280..3280
      src/wafo/tests/test_containers.py on lines 31..32

      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

          plt.plot(x0, y0, 'y',
                   x, y, 'r.',
                   xs, ys, 'k', linewidth=2)
      Severity: Minor
      Found in src/wafo/sg_filter/demos.py and 1 other location - About 30 mins to fix
      src/wafo/stats/core.py on lines 1409..1409

      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