tomopy/tomopy

View on GitHub

Showing 306 of 306 total issues

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

    if "all" in args.algorithms:
        remove_entry("all", args.algorithms)
        args.algorithms.extend(available_algorithms)
Severity: Minor
Found in pyctest_tomopy.py and 1 other location - About 35 mins to fix
pyctest_tomopy.py on lines 231..233

Duplicated Code

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

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

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

Tuning

This issue has a mass of 33.

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

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

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

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

Refactorings

Further Reading

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

    def fft(x, n=None, axis=-1, overwrite_input=False, extra_info=None):
        return np.fft.fft(x, n=n, axis=axis)
Severity: Minor
Found in source/tomopy/util/misc.py and 1 other location - About 35 mins to fix
source/tomopy/util/misc.py on lines 144..145

Duplicated Code

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

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

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

Tuning

This issue has a mass of 33.

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

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

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

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

Refactorings

Further Reading

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

        sinosmooth[i] = np.real(
            ifft(fft(sinolist * listsign) * window) * listsign)[pad:ncol - pad]
Severity: Minor
Found in source/tomopy/prep/stripe.py and 1 other location - About 35 mins to fix
source/tomopy/prep/stripe.py on lines 607..607

Duplicated Code

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

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

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

Tuning

This issue has a mass of 33.

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

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

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

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

Refactorings

Further Reading

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

        if isinstance(implementation, str):
            # Check whether we have a known implementation
            if implementation not in known_implementations:
                raise ValueError(
                    'Keyword "implementation" must be one of %s, \
Severity: Minor
Found in source/tomopy/recon/acceleration.py and 1 other location - About 35 mins to fix
source/tomopy/recon/algorithm.py on lines 268..271

Duplicated Code

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

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

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

Tuning

This issue has a mass of 33.

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

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

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

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

Refactorings

Further Reading

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

    if "all" in args.phantoms:
        remove_entry("all", args.phantoms)
        args.phantoms.extend(available_phantoms)
Severity: Minor
Found in pyctest_tomopy.py and 1 other location - About 35 mins to fix
pyctest_tomopy.py on lines 227..229

Duplicated Code

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

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

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

Tuning

This issue has a mass of 33.

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

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

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

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

Refactorings

Further Reading

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

    if len(listxmiss) > 0:
        sinogram[:, listxmiss] = finter(listxmiss, listy)
Severity: Minor
Found in source/tomopy/prep/stripe.py and 1 other location - About 35 mins to fix
source/tomopy/prep/stripe.py on lines 930..931

Duplicated Code

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

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

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

Tuning

This issue has a mass of 33.

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

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

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

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

Refactorings

Further Reading

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

    def ifft(x, n=None, axis=-1, overwrite_input=False, extra_info=None):
        return np.fft.ifft(x, n=n, axis=axis)
Severity: Minor
Found in source/tomopy/util/misc.py and 1 other location - About 35 mins to fix
source/tomopy/util/misc.py on lines 140..141

Duplicated Code

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

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

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

    recon_shape = (tomo1.shape[0], tomo1.shape[2], tomo1.shape[2])
Severity: Minor
Found in source/tomopy/recon/vector.py and 2 other locations - About 35 mins to fix
source/tomopy/recon/vector.py on lines 79..79
source/tomopy/recon/vector.py on lines 126..126

Duplicated Code

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

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

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

Tuning

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

        assert_allclose(
            recon(self.prj, self.ang, algorithm='gridrec', filter_name='cosine'),
            read_file('gridrec_cosine.npy'), rtol=1e-2)
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 7 other locations - About 30 mins to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 107..109
test/test_tomopy/test_recon/test_algorithm.py on lines 110..112
test/test_tomopy/test_recon/test_algorithm.py on lines 116..118
test/test_tomopy/test_recon/test_algorithm.py on lines 119..121
test/test_tomopy/test_recon/test_algorithm.py on lines 122..124
test/test_tomopy/test_recon/test_algorithm.py on lines 125..127
test/test_tomopy/test_recon/test_algorithm.py on lines 128..131

Duplicated Code

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

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

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

        assert_allclose(
            recon(self.prj, self.ang, algorithm='gridrec', filter_name='none'),
            read_file('gridrec_none.npy'), rtol=1e-2)
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 7 other locations - About 30 mins to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 110..112
test/test_tomopy/test_recon/test_algorithm.py on lines 113..115
test/test_tomopy/test_recon/test_algorithm.py on lines 116..118
test/test_tomopy/test_recon/test_algorithm.py on lines 119..121
test/test_tomopy/test_recon/test_algorithm.py on lines 122..124
test/test_tomopy/test_recon/test_algorithm.py on lines 125..127
test/test_tomopy/test_recon/test_algorithm.py on lines 128..131

Duplicated Code

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

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

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

        assert_allclose(
            recon(self.prj, self.ang, algorithm='gridrec', filter_name='shepp'),
            read_file('gridrec_shepp.npy'), rtol=1e-2)
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 7 other locations - About 30 mins to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 107..109
test/test_tomopy/test_recon/test_algorithm.py on lines 113..115
test/test_tomopy/test_recon/test_algorithm.py on lines 116..118
test/test_tomopy/test_recon/test_algorithm.py on lines 119..121
test/test_tomopy/test_recon/test_algorithm.py on lines 122..124
test/test_tomopy/test_recon/test_algorithm.py on lines 125..127
test/test_tomopy/test_recon/test_algorithm.py on lines 128..131

Duplicated Code

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

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

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

        assert_allclose(
            recon(self.prj, self.ang, algorithm='gridrec', filter_name='hamming'),
            read_file('gridrec_hamming.npy'), rtol=1e-2)
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 7 other locations - About 30 mins to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 107..109
test/test_tomopy/test_recon/test_algorithm.py on lines 110..112
test/test_tomopy/test_recon/test_algorithm.py on lines 113..115
test/test_tomopy/test_recon/test_algorithm.py on lines 116..118
test/test_tomopy/test_recon/test_algorithm.py on lines 122..124
test/test_tomopy/test_recon/test_algorithm.py on lines 125..127
test/test_tomopy/test_recon/test_algorithm.py on lines 128..131

Duplicated Code

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

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

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

        assert_allclose(
            recon(self.prj, self.ang, algorithm='gridrec', filter_name='parzen'),
            read_file('gridrec_parzen.npy'), rtol=1e-2)
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 7 other locations - About 30 mins to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 107..109
test/test_tomopy/test_recon/test_algorithm.py on lines 110..112
test/test_tomopy/test_recon/test_algorithm.py on lines 113..115
test/test_tomopy/test_recon/test_algorithm.py on lines 116..118
test/test_tomopy/test_recon/test_algorithm.py on lines 119..121
test/test_tomopy/test_recon/test_algorithm.py on lines 122..124
test/test_tomopy/test_recon/test_algorithm.py on lines 128..131

Duplicated Code

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

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

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

        assert_allclose(
            recon(self.prj, self.ang, algorithm='gridrec', filter_name='ramlak'),
            read_file('gridrec_ramlak.npy'), rtol=1e-2)
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 7 other locations - About 30 mins to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 107..109
test/test_tomopy/test_recon/test_algorithm.py on lines 110..112
test/test_tomopy/test_recon/test_algorithm.py on lines 113..115
test/test_tomopy/test_recon/test_algorithm.py on lines 116..118
test/test_tomopy/test_recon/test_algorithm.py on lines 119..121
test/test_tomopy/test_recon/test_algorithm.py on lines 125..127
test/test_tomopy/test_recon/test_algorithm.py on lines 128..131

Duplicated Code

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

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

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

        assert_allclose(
            recon(self.prj, self.ang, algorithm='gridrec',
                  filter_name='butterworth'),
            read_file('gridrec_butterworth.npy'), rtol=1e-2)
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 7 other locations - About 30 mins to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 107..109
test/test_tomopy/test_recon/test_algorithm.py on lines 110..112
test/test_tomopy/test_recon/test_algorithm.py on lines 113..115
test/test_tomopy/test_recon/test_algorithm.py on lines 116..118
test/test_tomopy/test_recon/test_algorithm.py on lines 119..121
test/test_tomopy/test_recon/test_algorithm.py on lines 122..124
test/test_tomopy/test_recon/test_algorithm.py on lines 125..127

Duplicated Code

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

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

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

        assert_allclose(
            recon(self.prj, self.ang, algorithm='gridrec', filter_name='hann'),
            read_file('gridrec_hann.npy'), rtol=1e-2)
Severity: Major
Found in test/test_tomopy/test_recon/test_algorithm.py and 7 other locations - About 30 mins to fix
test/test_tomopy/test_recon/test_algorithm.py on lines 107..109
test/test_tomopy/test_recon/test_algorithm.py on lines 110..112
test/test_tomopy/test_recon/test_algorithm.py on lines 113..115
test/test_tomopy/test_recon/test_algorithm.py on lines 119..121
test/test_tomopy/test_recon/test_algorithm.py on lines 122..124
test/test_tomopy/test_recon/test_algorithm.py on lines 125..127
test/test_tomopy/test_recon/test_algorithm.py on lines 128..131

Duplicated Code

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

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

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

    def test_remove_stripe_ti(self):
        assert_allclose(
            srm.remove_stripe_ti(read_file('proj.npy')),
            read_file('remove_stripe_ti.npy'), rtol=1e-2)
Severity: Minor
Found in test/test_tomopy/test_prep/test_stripe.py and 1 other location - About 30 mins to fix
test/test_tomopy/test_prep/test_stripe.py on lines 72..75

Duplicated Code

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

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

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

                ne.evaluate("vec", local_dict={'vec': arr[slc_r_v]},
                            out=out[slc_r])
Severity: Minor
Found in source/tomopy/misc/morph.py and 1 other location - About 30 mins to fix
source/tomopy/misc/morph.py on lines 150..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 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

                ne.evaluate("vec", local_dict={'vec': arr[slc_l_v]},
                            out=out[slc_l])
Severity: Minor
Found in source/tomopy/misc/morph.py and 1 other location - About 30 mins to fix
source/tomopy/misc/morph.py on lines 152..153

Duplicated Code

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

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

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

def get_nproc():
    """ Get the number of processes """
    try:
        from mpi4py import MPI
        comm_w = MPI.COMM_WORLD
Severity: Minor
Found in source/tomopy/util/mproc.py and 1 other location - About 30 mins to fix
source/tomopy/util/mproc.py on lines 84..91

Duplicated Code

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

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

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

Severity
Category
Status
Source
Language