Showing 176 of 354 total issues
Function _rs_large
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _rs_large(sinogram, snr, size, matindex, drop_ratio=0.1, norm=True):
Function remove_outlier
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def remove_outlier(arr, dif, size=3, axis=0, ncore=None, out=None):
Function pad
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def pad(arr, axis, npad=None, mode='constant', ncore=None, **kwargs):
Function _retrieve_phase
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _retrieve_phase(tomo, phase_filter, px, py, prj, pad):
Avoid deeply nested control flow statements. Open
if not isinstance(kwargs[key], np.float32):
kwargs[key] = np.array(value, dtype='float32')
# Set kwarg defaults.
for kw in allowed_kwargs[algorithm]:
Function remove_stripe_based_filtering
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def remove_stripe_based_filtering(tomo,
Function _rs_filter
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def _rs_filter(sinogram, window, listsign, size, dim, pad):
Function median_filter_cuda
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def median_filter_cuda(arr, size=3, axis=0):
"""
Apply median filter to 3D array along 0 axis with GPU support.
The winAllow is for A6000, Tian X support 3 to 8
- Read upRead up
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 _remove_stripe_fw
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def _remove_stripe_fw(tomo, level, wname, sigma, pad):
dx, dy, dz = tomo.shape
nx = dx
if pad:
nx = dx + dx // 8
- Read upRead up
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 find_ctest_token
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def find_ctest_token():
"""
Add authentification token if it exists
"""
token_string = os.environ.get("CTEST_TOKEN")
- Read upRead up
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 build_name_append
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def build_name_append(item, separate=True, prefix="[", suffix="]", check=True, reset=False):
Function c_pml_hybrid
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def c_pml_hybrid(tomo, center, recon, theta, **kwargs):
Function _calc_pad
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _calc_pad(tomo, pixel_size, dist, energy, pad):
Function output_images
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def output_images(rec, fpath, format="jpeg", scale=1, ncol=1):
Function ufo_dfi
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def ufo_dfi(tomo, center, recon, theta, **kwargs):
Function ifft2
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def ifft2(x, s=None, axes=(-2,-1), overwrite_input=False, extra_info=None):
Function trim_sinogram
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def trim_sinogram(data, center, x, y, diameter):
Function ufo_fbp
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def ufo_fbp(tomo, center, recon, theta, **kwargs):
Function _init_recon
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _init_recon(shape, init_recon, val=1e-6, sharedmem=True, empty=False):
Function _remove_stripe_fw
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def _remove_stripe_fw(tomo, level, wname, sigma, pad):