avaframe/AvaFrame

View on GitHub
avaframe/out3Plot/outParticlesAnalysis.py

Summary

Maintainability
F
5 days
Test Coverage
F
37%

File outParticlesAnalysis.py has 489 lines of code (exceeds 300 allowed). Consider refactoring.
Open

# -*- coding: utf-8 -*-
"""

Tools to extract information on the avalanche simulations run in the Output files

Severity: Minor
Found in avaframe/out3Plot/outParticlesAnalysis.py - About 6 hrs to fix

    Function plotParticleMotionTracking has 67 lines of code (exceeds 30 allowed). Consider refactoring.
    Open

    def plotParticleMotionTracking(avalancheDir, simName, dictVelAltThalweg, trackedPartProp, dictVelEnvelope, demSim,
                                   modName, rasterTransfo, measuredData=''):
        """ Create plot showing particle properties over time and along avalanche thalweg
            in light blue envelope for all particles (filled between min and max values)
            in dark blue the values for tracked particles
    Severity: Major
    Found in avaframe/out3Plot/outParticlesAnalysis.py - About 2 hrs to fix

      Function velocityEnvelopeThalweg has 39 lines of code (exceeds 30 allowed). Consider refactoring.
      Open

      def velocityEnvelopeThalweg(particlesTimeArrays):
          """ function to generate the velocity envelope along the thalweg from simulated flows
      
              Parameters
              -----------
      Severity: Minor
      Found in avaframe/out3Plot/outParticlesAnalysis.py - About 1 hr to fix

        Function plotThalwegTimeAltitudes has 11 arguments (exceeds 6 allowed). Consider refactoring.
        Open

        def plotThalwegTimeAltitudes(avalancheDir, simIndex, simDF, rasterTransfo, pfvCrossMax, modName, demSim, mtiInfo,
        Severity: Major
        Found in avaframe/out3Plot/outParticlesAnalysis.py - About 1 hr to fix

          Function plotParticleMotionTracking has 9 arguments (exceeds 6 allowed). Consider refactoring.
          Open

          def plotParticleMotionTracking(avalancheDir, simName, dictVelAltThalweg, trackedPartProp, dictVelEnvelope, demSim,
          Severity: Major
          Found in avaframe/out3Plot/outParticlesAnalysis.py - About 50 mins to fix

            Function plotParticleThalwegAltitudeVelocity has 8 arguments (exceeds 6 allowed). Consider refactoring.
            Open

            def plotParticleThalwegAltitudeVelocity(avalancheDir, simIndex, simDF, rasterTransfo, dictVelAltThalweg, resTypePlots,
            Severity: Major
            Found in avaframe/out3Plot/outParticlesAnalysis.py - About 45 mins to fix

              Function addPeakFieldConstrained has 8 arguments (exceeds 6 allowed). Consider refactoring.
              Open

              def addPeakFieldConstrained(avaDir, modName, simName, resType, demData, ax, alpha, oneColor=''):
              Severity: Major
              Found in avaframe/out3Plot/outParticlesAnalysis.py - About 45 mins to fix

                Function addTrOrMe has 8 arguments (exceeds 6 allowed). Consider refactoring.
                Open

                def addTrOrMe(ax, pDict, prop1, prop2, cmap, label=False, zorder=1, lineStyle='-'):
                Severity: Major
                Found in avaframe/out3Plot/outParticlesAnalysis.py - About 45 mins to fix

                  Function plotParticleMotionTracking has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def plotParticleMotionTracking(avalancheDir, simName, dictVelAltThalweg, trackedPartProp, dictVelEnvelope, demSim,
                                                 modName, rasterTransfo, measuredData=''):
                      """ Create plot showing particle properties over time and along avalanche thalweg
                          in light blue envelope for all particles (filled between min and max values)
                          in dark blue the values for tracked particles
                  Severity: Minor
                  Found in avaframe/out3Plot/outParticlesAnalysis.py - About 45 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 addTrOrMe has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                  Open

                  def addTrOrMe(ax, pDict, prop1, prop2, cmap, label=False, zorder=1, lineStyle='-'):
                      """ add a line plot of x: prop1, y: prop2 and label if label=True
                  
                          Parameters
                          -----------
                  Severity: Minor
                  Found in avaframe/out3Plot/outParticlesAnalysis.py - About 35 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 2 locations. Consider refactoring.
                  Open

                      ax2.plot(rasterTransfo['avaPath']['x'], rasterTransfo['avaPath']['y'], '-y', zorder=20, linewidth=1.0,
                               path_effects=[pe.Stroke(linewidth=2, foreground='k'), pe.Normal()], label='thalweg')
                  Severity: Major
                  Found in avaframe/out3Plot/outParticlesAnalysis.py and 1 other location - About 3 hrs to fix
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 297..298

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 66.

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

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

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

                  See codeclimate-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(rasterTransfo['avaPath']['x'], rasterTransfo['avaPath']['y'], '-y', zorder=20, linewidth=1.0,
                               path_effects=[pe.Stroke(linewidth=2, foreground='k'), pe.Normal()], label='thalweg')
                  Severity: Major
                  Found in avaframe/out3Plot/outParticlesAnalysis.py and 1 other location - About 3 hrs to fix
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 195..196

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 66.

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

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

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

                  See codeclimate-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(trackedPartProp['t'][:], trackedPartProp['trajectoryLengthXYZ'][:, 0], zorder=1, linewidth=1.0,
                               color=cmap(0.25), label='tracked particles')
                  Severity: Major
                  Found in avaframe/out3Plot/outParticlesAnalysis.py and 1 other location - About 2 hrs to fix
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 344..344

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 52.

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

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

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

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

                      ax4.plot(trackedPartProp['t'][:], trackedPartProp['uAcc'][:, 0], zorder=1, linewidth=1.0, color=cmap(0.25),
                  Severity: Major
                  Found in avaframe/out3Plot/outParticlesAnalysis.py and 1 other location - About 2 hrs to fix
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 316..317

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 52.

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

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

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

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

                          ax[1].plot(dictVelAltThalweg['sXYThalweg'], dictVelAltThalweg['medianVelocity'], linestyle='dotted',
                                   color=cmap(1.0), markersize=0.7, label='Median velocity', linewidth=0.7)  # median
                  Severity: Major
                  Found in avaframe/out3Plot/outParticlesAnalysis.py and 1 other location - About 1 hr to fix
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 92..93

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 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

                          ax[1].plot(dictVelAltThalweg['sXYThalweg'], dictVelAltThalweg['meanVelocity'], linestyle='dashed',
                                   color=cmap(0.7), markersize=0.5, label='Mean velocity', linewidth=0.5)  # mean
                  Severity: Major
                  Found in avaframe/out3Plot/outParticlesAnalysis.py and 1 other location - About 1 hr to fix
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 94..95

                  Duplicated Code

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

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

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

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

                  Duplicated Code

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

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

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

                          if partFileP.is_file() is False:
                              message = 'measured particle file: %s does not exist' % (str(partFileP))
                              log.error(message)
                              raise FileNotFoundError(message)
                  Severity: Major
                  Found in avaframe/out3Plot/outParticlesAnalysis.py and 1 other location - About 1 hr to fix
                  avaframe/in1Data/getInput.py on lines 111..114

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 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 4 locations. Consider refactoring.
                  Open

                      ax5.fill_between(dictVelAltThalweg['sXYThalweg'], dictVelAltThalweg['minSxyz'],
                                       dictVelAltThalweg['maxSxyz'], color=cmap(0.2), alpha=0.2, zorder=0)
                  Severity: Major
                  Found in avaframe/out3Plot/outParticlesAnalysis.py and 3 other locations - About 1 hr to fix
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 320..321
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 333..334
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 382..383

                  Duplicated Code

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

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

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

                      ax3.fill_between(dictVelEnvelope['Time'], dictVelEnvelope['Min'],
                                      dictVelEnvelope['Max'], color=cmap(0.2), alpha=0.2, zorder=0)
                  Severity: Major
                  Found in avaframe/out3Plot/outParticlesAnalysis.py and 3 other locations - About 1 hr to fix
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 320..321
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 356..357
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 382..383

                  Duplicated Code

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

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

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

                      ax2.fill_between(dictVelEnvelope['Time'], dictVelEnvelope['SxyzMin'],
                                      dictVelEnvelope['SxyzMax'], color=cmap(0.2), alpha=0.2, zorder=0)
                  Severity: Major
                  Found in avaframe/out3Plot/outParticlesAnalysis.py and 3 other locations - About 1 hr to fix
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 333..334
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 356..357
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 382..383

                  Duplicated Code

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

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

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

                      ax7.fill_between(dictVelAltThalweg['sXYThalweg'], dictVelAltThalweg['maxAcc'],
                                       dictVelAltThalweg['minAcc'], color=cmap(0.2), alpha=0.2, zorder=0)
                  Severity: Major
                  Found in avaframe/out3Plot/outParticlesAnalysis.py and 3 other locations - About 1 hr to fix
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 320..321
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 333..334
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 356..357

                  Duplicated Code

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

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

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

                      ax4.plot(trackedPartProp['t'], trackedPartProp['uAcc'], zorder=1, linewidth=1.0, color=cmap(0.25))
                  Severity: Minor
                  Found in avaframe/out3Plot/outParticlesAnalysis.py and 1 other location - About 50 mins to fix
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 315..315

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 36.

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

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

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

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

                  Refactorings

                  Further Reading

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

                      ax2.plot(trackedPartProp['t'], trackedPartProp['trajectoryLengthXYZ'], zorder=2, linewidth=1.0, color=cmap(0.25))
                  Severity: Minor
                  Found in avaframe/out3Plot/outParticlesAnalysis.py and 1 other location - About 50 mins to fix
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 346..346

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 36.

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

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

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

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

                  Refactorings

                  Further Reading

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

                      ax5.plot(trackedPartProp['sAimec'], trackedPartProp['trajectoryLengthXYZ'], color=cmap(0.25), zorder=1)
                  Severity: Minor
                  Found in avaframe/out3Plot/outParticlesAnalysis.py and 2 other locations - About 35 mins to fix
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 370..370
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 384..384

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 33.

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

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

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

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

                  Refactorings

                  Further Reading

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

                      ax7.plot(trackedPartProp['sAimec'], trackedPartProp['uAcc'], color=cmap(0.25), zorder=1)  # max
                  Severity: Minor
                  Found in avaframe/out3Plot/outParticlesAnalysis.py and 2 other locations - About 35 mins to fix
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 358..358
                  avaframe/out3Plot/outParticlesAnalysis.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 33.

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

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

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

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

                  Refactorings

                  Further Reading

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

                      ax6.plot(trackedPartProp['sAimec'], trackedPartProp['velocityMag'], color=cmap(0.25), zorder=1)
                  Severity: Minor
                  Found in avaframe/out3Plot/outParticlesAnalysis.py and 2 other locations - About 35 mins to fix
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 358..358
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 384..384

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 33.

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

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

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

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

                  Refactorings

                  Further Reading

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

                          Mean[j] = np.mean(particlesTimeArrays['velocityMag'][j, :])
                  Severity: Major
                  Found in avaframe/out3Plot/outParticlesAnalysis.py and 5 other locations - About 30 mins to fix
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 505..505
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 506..506
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 508..508
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 509..509
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 510..510

                  Duplicated Code

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

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

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

                          Max[j] = np.amax(particlesTimeArrays['velocityMag'][j, :])
                  Severity: Major
                  Found in avaframe/out3Plot/outParticlesAnalysis.py and 5 other locations - About 30 mins to fix
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 506..506
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 507..507
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 508..508
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 509..509
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 510..510

                  Duplicated Code

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

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

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

                          SxyzMin[j] = np.nanmin(particlesTimeArrays['trajectoryLengthXYZ'][j, :])
                  Severity: Major
                  Found in avaframe/out3Plot/outParticlesAnalysis.py and 5 other locations - About 30 mins to fix
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 505..505
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 506..506
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 507..507
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 508..508
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 509..509

                  Duplicated Code

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

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

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

                          SxyzMax[j] = np.nanmax(particlesTimeArrays['trajectoryLengthXYZ'][j, :])
                  Severity: Major
                  Found in avaframe/out3Plot/outParticlesAnalysis.py and 5 other locations - About 30 mins to fix
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 505..505
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 506..506
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 507..507
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 508..508
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 510..510

                  Duplicated Code

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

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

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

                          Median[j] = np.median(particlesTimeArrays['velocityMag'][j, :])
                  Severity: Major
                  Found in avaframe/out3Plot/outParticlesAnalysis.py and 5 other locations - About 30 mins to fix
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 505..505
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 506..506
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 507..507
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 509..509
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 510..510

                  Duplicated Code

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

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

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

                          Min[j] = np.amin(particlesTimeArrays['velocityMag'][j, :])
                  Severity: Major
                  Found in avaframe/out3Plot/outParticlesAnalysis.py and 5 other locations - About 30 mins to fix
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 505..505
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 507..507
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 508..508
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 509..509
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 510..510

                  Duplicated Code

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

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

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

                      fig = plt.figure(figsize=(pU.figW+10, pU.figH+3))
                  Severity: Minor
                  Found in avaframe/out3Plot/outParticlesAnalysis.py and 1 other location - About 30 mins to fix
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 275..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 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

                      fig = plt.figure(figsize=(pU.figW+15, pU.figH+3))
                  Severity: Minor
                  Found in avaframe/out3Plot/outParticlesAnalysis.py and 1 other location - About 30 mins to fix
                  avaframe/out3Plot/outParticlesAnalysis.py on lines 176..176

                  Duplicated Code

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

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

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