avaframe/AvaFrame

View on GitHub
avaframe/out3Plot/outDistanceTimeAnalysis.py

Summary

Maintainability
F
1 wk
Test Coverage
B
81%

File outDistanceTimeAnalysis.py has 718 lines of code (exceeds 300 allowed). Consider refactoring.
Open

""" functions to plot range-time diagrams """

import numpy as np
from matplotlib import pyplot as plt
import logging
Severity: Major
Found in avaframe/out3Plot/outDistanceTimeAnalysis.py - About 1 day to fix

    Function animationPlot has 96 lines of code (exceeds 30 allowed). Consider refactoring.
    Open

    def animationPlot(demData, data, cellSize, resType, cfgRangeTime, mtiInfo, timeStep):
        """3 panel plot: result in x,y, result in s, l, tt diagram
    
        Parameters
        -----------
    Severity: Major
    Found in avaframe/out3Plot/outDistanceTimeAnalysis.py - About 3 hrs to fix

      Function radarFieldOfViewPlot has 51 lines of code (exceeds 30 allowed). Consider refactoring.
      Open

      def radarFieldOfViewPlot(radarFov, radarRange, cfgRangeTime, rangeGates, dem):
          """Create radar field of view plot
      
          Parameters
          -----------
      Severity: Major
      Found in avaframe/out3Plot/outDistanceTimeAnalysis.py - About 1 hr to fix

        Function animationPlot has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
        Open

        def animationPlot(demData, data, cellSize, resType, cfgRangeTime, mtiInfo, timeStep):
            """3 panel plot: result in x,y, result in s, l, tt diagram
        
            Parameters
            -----------
        Severity: Minor
        Found in avaframe/out3Plot/outDistanceTimeAnalysis.py - About 1 hr to fix

        Cognitive Complexity

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

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

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

        Further reading

        Function addRangeTimePlotToAxes has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
        Open

        def addRangeTimePlotToAxes(mtiInfo, cfgRangeTime, ax):
            """add plot range-time diagram with avalanche front and colorcoded average values of result parameter
        
            Parameters
            -----------
        Severity: Minor
        Found in avaframe/out3Plot/outDistanceTimeAnalysis.py - About 55 mins to fix

        Cognitive Complexity

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

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

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

        Further reading

        Function addVelocityValues has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
        Open

        def addVelocityValues(ax, dataPoint, point, first=True, inititalNrOfTextElements=np.nan):
            """add velocity values as labels
        
            Parameters
            -----------
        Severity: Minor
        Found in avaframe/out3Plot/outDistanceTimeAnalysis.py - About 55 mins to fix

        Cognitive Complexity

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

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

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

        Further reading

        Function addTitleBox has 7 arguments (exceeds 6 allowed). Consider refactoring.
        Open

        def addTitleBox(ax, width, height, lw, point, textsize, maxVel=True):
        Severity: Major
        Found in avaframe/out3Plot/outDistanceTimeAnalysis.py - About 35 mins to fix

          Function animationPlot has 7 arguments (exceeds 6 allowed). Consider refactoring.
          Open

          def animationPlot(demData, data, cellSize, resType, cfgRangeTime, mtiInfo, timeStep):
          Severity: Major
          Found in avaframe/out3Plot/outDistanceTimeAnalysis.py - About 35 mins to fix

            Function rangeTimeVelocityLegend has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
            Open

            def rangeTimeVelocityLegend(ax, maxVel, width, height, lw, textsize):
                """set legend in range time diagram for velocity in terms of steepness of front position
                    connects to figure callback to react to zoom/pan events
            
                Parameters
            Severity: Minor
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py - About 25 mins to fix

            Cognitive Complexity

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

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

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

            Further reading

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

                ax.plot(
                    [point[1][0], point[5][0]],
                    [point[1][1], point[5][1]],
                    color="k",
                    linewidth=lw,
            Severity: Major
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 3 other locations - About 4 hrs to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 523..528
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 537..542
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 544..549

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 76.

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

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

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

            See codeclimate-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

                ax.plot(
                    [point[5][0], point[9][0]],
                    [point[5][1], point[9][1]],
                    color="k",
                    linewidth=lw,
            Severity: Major
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 3 other locations - About 4 hrs to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 523..528
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 530..535
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 544..549

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 76.

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

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

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

            See codeclimate-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

                ax.plot(
                    [point[0][0], point[1][0]],
                    [point[0][1], point[1][1]],
                    color="k",
                    linewidth=lw,
            Severity: Major
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 3 other locations - About 4 hrs to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 530..535
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 537..542
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 544..549

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 76.

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

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

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

            See codeclimate-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

                ax.plot(
                    [point[9][0], point[0][0]],
                    [point[9][1], point[0][1]],
                    color="k",
                    linewidth=lw,
            Severity: Major
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 3 other locations - About 4 hrs to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 523..528
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 530..535
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 537..542

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 76.

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

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

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

            See codeclimate-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 = np.linspace(xllc, xllc + (demData["header"]["ncols"]-1) * cellSize, demData["header"]["ncols"])
            Severity: Major
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 1 other location - About 2 hrs to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 738..738

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 55.

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

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

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

            See codeclimate-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

                y = np.linspace(yllc, yllc + (demData["header"]["nrows"]-1) * cellSize, demData["header"]["nrows"])
            Severity: Major
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 1 other location - About 2 hrs to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 737..737

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 55.

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

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

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

            See codeclimate-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

                ref2, im2 = pU.NonUnifIm(
                    ax1, l, s, maskResType, "l [m]", "s [m]", extent=[l.min(), l.max(), s.min(), s.max()], cmap=cmapRes
            Severity: Major
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 1 other location - About 1 hr to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 274..275

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 47.

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

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

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

            See codeclimate-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

                ref0, im1 = pU.NonUnifIm(
                    ax1, l, s, rangeRaster, "l [m]", "s [m]", extent=[l.min(), l.max(), s.min(), s.max()], cmap=cmapRange
            Severity: Major
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 1 other location - About 1 hr to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 302..303

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 47.

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

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

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

            See codeclimate-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

                demField = np.where(
                    demData["rasterData"] == demData["header"]["nodata_value"], np.nan, demData["rasterData"]
            Severity: Major
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 2 other locations - About 1 hr to fix
            avaframe/out1Peak/outPlotAllPeak.py on lines 49..56
            avaframe/out3Plot/outParticlesAnalysis.py on lines 459..460

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 45.

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

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

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

            See codeclimate-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

                        lVmax.set_data([point[0][0], maxVelPoint[0]], [point[0][1], maxVelPoint[1]])
            Severity: Major
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 1 other location - About 1 hr to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 564..566

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 45.

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

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

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

            See codeclimate-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

                    lVmax = ax.plot(
                        [point[0][0], pVmax[0]],
                        [point[0][1], pVmax[1]],
            Severity: Major
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 1 other location - About 1 hr to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 475..475

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 45.

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

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

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

            See codeclimate-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

                y1 = headerInfo["yllcenter"] + headerInfo["cellsize"] * (bmaskRange.shape[0] - 1)
            Severity: Major
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 1 other location - About 1 hr to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 337..337

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 43.

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

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

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

            See codeclimate-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

                outFileName = mtiInfo["type"] + "_" + rangeTimeResType + "_" + cfgRangeTime["GENERAL"]["simHash"]
            Severity: Major
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 1 other location - About 1 hr to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 970..970

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 43.

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

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

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

            See codeclimate-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

                x1 = headerInfo["xllcenter"] + headerInfo["cellsize"] * (bmaskRange.shape[1] - 1)
            Severity: Major
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 1 other location - About 1 hr to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 338..338

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 43.

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

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

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

            See codeclimate-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

                    mtiInfo["type"] + "_" + resType + "_" + cfgRangeTime["GENERAL"]["simHash"] + "_%08.3f" % timeStep
            Severity: Major
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 1 other location - About 1 hr to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 44..44

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 43.

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

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

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

            See codeclimate-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

                points.append([xMax - width / 4 * xinterval, yMax - height * yinterval])  # p6 0.75*right, bottom
            Severity: Major
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 1 other location - About 1 hr to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 682..682

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 42.

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

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

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

            See codeclimate-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

                points.append([xMax - width / 2 * xinterval, yMax - height * yinterval])  # p7 0.5*right, bottom
            Severity: Major
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 1 other location - About 1 hr to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 681..681

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 42.

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

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

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

            See codeclimate-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

                ax2.axhline(
                    y=s[indStartOfRunout],
                    color="b",
                    linestyle="--",
                    label="beta point (%.1f°)" % mtiInfo["betaPointAngle"],
            Severity: Major
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 1 other location - About 1 hr to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 278..282

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 38.

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

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

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

            See codeclimate-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

                ax1.axhline(
                    y=s[indStartOfRunout],
                    color="w",
                    linestyle="--",
                    label="start of run-out area point : %.1f °" % rasterTransfo["startOfRunoutAreaAngle"],
            Severity: Major
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 1 other location - About 1 hr to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 838..842

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 38.

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

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

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

            See codeclimate-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

                elif sType.lower() == "projected":
                    s = rasterTransfo["s"] - rasterTransfo["s"][indStartOfRunout]
                    sLabel = "Projected distance to beta point [m]"
            Severity: Minor
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 1 other location - About 45 mins to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 829..831

            Duplicated Code

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

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

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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

                if sType.lower() == "parallel":
                    s = rasterTransfo["sParallel"] - rasterTransfo["sParallel"][indStartOfRunout]
                    sLabel = "Parallel distance to beta point [m]"
            Severity: Minor
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 1 other location - About 45 mins to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 832..834

            Duplicated Code

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

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

            When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both 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 4 locations. Consider refactoring.
            Open

                    x1 = [point[0][0], point[j][0]]
            Severity: Major
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 3 other locations - About 30 mins to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 554..554
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 555..555
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 604..604

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 32.

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

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

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

            See codeclimate-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

                    x1 = [point[0][0], point[j][0]]
            Severity: Major
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 3 other locations - About 30 mins to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 555..555
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 603..603
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 604..604

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 32.

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

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

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

            See codeclimate-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

                    y1 = [point[0][1], point[j][1]]
            Severity: Major
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 3 other locations - About 30 mins to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 554..554
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 555..555
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 603..603

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 32.

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

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

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

            See codeclimate-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

                    y1 = [point[0][1], point[j][1]]
            Severity: Major
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 3 other locations - About 30 mins to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 554..554
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 603..603
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 604..604

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 32.

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

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

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

            See codeclimate-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

                ax1.plot(radarFov[0], radarFov[1], marker="o", color="k", zorder=1)
            Severity: Minor
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 1 other location - About 30 mins to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 219..219

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 32.

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

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

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

            See codeclimate-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

                ax2.plot(radarFov[0], radarFov[1], marker="o", color="k", zorder=1)
            Severity: Minor
            Found in avaframe/out3Plot/outDistanceTimeAnalysis.py and 1 other location - About 30 mins to fix
            avaframe/out3Plot/outDistanceTimeAnalysis.py on lines 178..178

            Duplicated Code

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

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

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

            Tuning

            This issue has a mass of 32.

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

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

            If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ 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