ihavalyova/DiAtomic

View on GitHub

Showing 129 of 135 total issues

Function _arange_levels has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

    def _arange_levels(self, jrotn, par, iso, evalues, evecs, shift_enr=[0.0]):
Severity: Minor
Found in diatomic/hamiltonian.py - About 45 mins to fix

    Function plot_eigenfunctions has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

        def plot_eigenfunctions(self, nlevels, show=False, fname=None,
    Severity: Minor
    Found in diatomic/hamiltonian.py - About 45 mins to fix

      Function optimize_intensity_by_svd has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

          def optimize_intensity_by_svd(self, niter=1, derivative='n', tol=0.1,
      Severity: Minor
      Found in diatomic/optimizer.py - About 45 mins to fix

        Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
        Open

            def __init__(self, model, filep, rotc=0.0, shift_by=0.0, cfunc=None):
        Severity: Minor
        Found in diatomic/diatomic_data.py - About 45 mins to fix

          Function plot_hamiltonian_colormesh has 6 arguments (exceeds 4 allowed). Consider refactoring.
          Open

              def plot_hamiltonian_colormesh(self, rows=None, cols=None, show=False,
          Severity: Minor
          Found in diatomic/hamiltonian.py - About 45 mins to fix

            Function _calculate_numerical_derivatives has 6 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                def _calculate_numerical_derivatives(self, ypar, yfixed, calculate_data,
            Severity: Minor
            Found in diatomic/optimizer.py - About 45 mins to fix

              Function optimize_levels_by_svd has 6 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                  def optimize_levels_by_svd(self, niter=1, derivative='n', tol=0.1,
              Severity: Minor
              Found in diatomic/optimizer.py - About 45 mins to fix

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

                        d = self.calculate_coeff_D(xgrid, self.x[inds], self.x[inds-1])
                Severity: Major
                Found in diatomic/interpolator.py and 3 other locations - About 45 mins to fix
                diatomic/interpolator.py on lines 148..148
                diatomic/interpolator.py on lines 149..149
                diatomic/interpolator.py on lines 150..150

                Duplicated Code

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

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

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

                Function form_tridiag_matrix has 6 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    def form_tridiag_matrix(self, u, v, w, k1=-1, k2=0, k3=1):
                Severity: Minor
                Found in diatomic/interpolator.py - About 45 mins to fix

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

                          a = self.calculate_coeff_A(xgrid, self.x[inds], self.x[inds-1])
                  Severity: Major
                  Found in diatomic/interpolator.py and 3 other locations - About 45 mins to fix
                  diatomic/interpolator.py on lines 149..149
                  diatomic/interpolator.py on lines 150..150
                  diatomic/interpolator.py on lines 151..151

                  Duplicated Code

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

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

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

                  Tuning

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

                          c = self.calculate_coeff_C(xgrid, self.x[inds], self.x[inds-1])
                  Severity: Major
                  Found in diatomic/interpolator.py and 3 other locations - About 45 mins to fix
                  diatomic/interpolator.py on lines 148..148
                  diatomic/interpolator.py on lines 149..149
                  diatomic/interpolator.py on lines 151..151

                  Duplicated Code

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

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

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

                  Tuning

                  This issue has a mass of 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 self.solver == 'sinc':
                              self.rgrid, self.rstep = np.linspace(
                                  self.rmin, self.rmax, num=self.ngrid,
                  Severity: Minor
                  Found in diatomic/grid.py and 1 other location - About 45 mins to fix
                  diatomic/grid.py on lines 20..27

                  Duplicated Code

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

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

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

                  Avoid deeply nested control flow statements.
                  Open

                                          if j not in memoize:
                                              elem = self._get_dydp_elem(iprm[:4], sk, sk_grid,
                                                                        sk_coef, j, evecs_found)
                                          dydp[countj, prm] = elem[countj]
                  Severity: Major
                  Found in diatomic/optimizer.py - About 45 mins to fix

                    Function calculate_partition_functions has 5 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                        def calculate_partition_functions(self, Ia=0, Ib=0, T=296,
                    Severity: Minor
                    Found in diatomic/spectrum.py - About 35 mins to fix

                      Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                          def __init__(self, objs, eig_decomp='lapack', lapack_driver='evr',
                      Severity: Minor
                      Found in diatomic/hamiltonian.py - About 35 mins to fix

                        Function calculate_Einstein_coefficients has 5 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                            def calculate_Einstein_coefficients(self, wavens, dmfs=None, ninter=1000,
                        Severity: Minor
                        Found in diatomic/spectrum.py - About 35 mins to fix

                          Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                              def __init__(self, npoints, rgrid, solver='sinc', alpha=0.0, rbar=0.0):
                          Severity: Minor
                          Found in diatomic/grid.py - About 35 mins to fix

                            Function _get_default_jrange has 5 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                                def _get_default_jrange(self, uterms, uj, lterms, lj):
                            Severity: Minor
                            Found in diatomic/spectrum.py - About 35 mins to fix

                              Function __init__ has 5 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                                  def __init__(self, molecule, masses=None, niso=None, refj=None, ref_enr=None):
                              Severity: Minor
                              Found in diatomic/diatomic_data.py - About 35 mins to fix

                                Function _write_pointwise_data has 5 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                    def _write_pointwise_data(self, fname, xpoints, ypoints, fixed):
                                Severity: Minor
                                Found in diatomic/optimizer.py - About 35 mins to fix
                                  Severity
                                  Category
                                  Status
                                  Source
                                  Language