Showing 176 of 354 total issues
Function _retrieve_phase
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _retrieve_phase(tomo, phase_filter, px, py, prj, pad):
Function distortion_correction_proj
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def distortion_correction_proj(tomo, xcenter, ycenter, list_fact,
Function c_vector
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def c_vector(tomo, center, recon1, recon2, theta, **kwargs):
Function _rs_large
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _rs_large(sinogram, snr, size, matindex, drop_ratio=0.1, norm=True):
Function _calc_proj_cnrs
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _calc_proj_cnrs(imgs,
Function _search_coarse
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _search_coarse(sino, smin, smax, ratio, drop, ncore=None):
Function _calculate_metric
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
Open
def _calculate_metric(shift_col, sino1, sino2, sino3, mask):
"""
Metric calculation.
"""
shift_col = 1.0 * np.squeeze(shift_col)
- 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 _rs_filter
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _rs_filter(sinogram, window, listsign, size, dim, pad):
Function pad
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def pad(arr, axis, npad=None, mode='constant', ncore=None, **kwargs):
Function find_ctest_token
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
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
Open
def build_name_append(item, separate=True, prefix="[", suffix="]", check=True, reset=False):
Function c_accel_sirt
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def c_accel_sirt(tomo, center, recon, theta, **kwargs):
Function astra
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def astra(tomo, center, recon, theta, **kwargs):
Function c_fbp
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def c_fbp(tomo, center, recon, theta, **kwargs):
Function c_ospml_hybrid
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def c_ospml_hybrid(tomo, center, recon, theta, **kwargs):
Function c_osem
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def c_osem(tomo, center, recon, theta, **kwargs):
Function _rs_fit
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def _rs_fit(sinogram, order, win2d, matsign, pad):
Function remove_stripe_based_fitting
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def remove_stripe_based_fitting(tomo,
Function remove_stripe_ti
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def remove_stripe_ti(tomo, nblock=0, alpha=1.5, ncore=None, nchunk=None):
Function ifft2
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Open
def ifft2(x, s=None, axes=(-2,-1), overwrite_input=False, extra_info=None):