Showing 24 of 26 total issues
Function chunk_wavelengths_cia
has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring. Open
def chunk_wavelengths_cia(file, ref_file_base, numfiles):
"""
Performs chunking based on the reference file's wavelength chunking.
Inputs
-------
- 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 fit_neural_net
has 13 arguments (exceeds 4 allowed). Consider refactoring. Open
def fit_neural_net(
Function calc_metrics
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def calc_metrics(fitter, tp_undersample_factor=1, wl_under_sample_factor=8, plot=False):
"""
calculates the mean and percent error associated with the fit.
.
Inputs
- 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 chunk_wavelengths
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
def chunk_wavelengths(
file,
nchunks=None,
wav_per_chunk=None,
adjust_wavelengths=False,
- 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 eval_pca
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def eval_pca(
Function eval_neural_net
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def eval_neural_net(
Function optimize_neural_net
has 9 arguments (exceeds 4 allowed). Consider refactoring. Open
def optimize_neural_net(
Function __init__
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function eval_polynomial
has 8 arguments (exceeds 4 allowed). Consider refactoring. Open
def eval_polynomial(
Function get_lams_and_opacities
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def get_lams_and_opacities(self, file):
"""
Takes in an opacity file and returns an array of all wavelengths within the file.
Returns the opacities, as well — so that the file is only iterated through once.
- 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 interpolate_cia
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def interpolate_cia(
cia_file, reference_file, outfile=None, loader="exotransmit", load_kwargs=None
):
"""
Interpolates a CIA file to a higher resolution, using the wavelength grid
- 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 add_lams
has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring. Open
def add_lams(max_lam_to_add_ind, file, next_file):
"""
Takes the first `max_lam_to_add_ind` opacities from next_file and appends them to file.
Inputs:
- 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 optimize_pca
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def optimize_pca(
Function chunk_wavelengths
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def chunk_wavelengths(
Function fit_pca
has 6 arguments (exceeds 4 allowed). Consider refactoring. Open
def fit_pca(cross_section, P, T, prep_res, fit_axis="pressure", **kwargs):
Function join_cross_section
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def join_cross_section(self, opac):
"""
joins another opacity's cross-section data to this one.
:param opac:
:return:
- 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 __init__
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def __init__(
Function prep_pca
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def prep_pca(
Function interpolate_cia
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def interpolate_cia(
Function fit_polynomial
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
def fit_polynomial(