Showing 5 of 41 total issues
Function load_exfor
has a Cognitive Complexity of 26 (exceeds 8 allowed). Consider refactoring. Confirmed
def load_exfor(log=False, basic=-1, mode="neutrons", filters=False, max_en=2.0E7): """Load the EXFOR dataset in its varius forms. This function helps load ML-ready EXFOR datasets for different particle induce reactions or all of them.
- Read upRead up
- Create a ticketCreate a ticket
Function ml_results_plotly
has a Cognitive Complexity of 20 (exceeds 8 allowed). Consider refactoring. Confirmed
def ml_results_plotly(results_dict, order_dict={}, save=False, render_browser=False, show=False): """Plot the machine learning predictions from the dictionary generated by the. Args: results_dict (dict): Generated dictionary from the .
- Read upRead up
- Create a ticketCreate a ticket
Function plot_exfor_w_references
has a Cognitive Complexity of 18 (exceeds 8 allowed). Consider refactoring. Confirmed
def plot_exfor_w_references(df, Z, A, MT, nat_iso="I", new_data=empty_df, endf=empty_df, error=False, get_endf=True, reverse_log=False, legend_size=21, save=False, interpolate=False, legend=False, alpha=0.7, one_hot=False, log_plot=False, path='', ref=False, new_data_label="Additional Data", dpi=300, figure_size=(14, 10)): """Plot Cross Section for a particular Isotope with or without references.
- Read upRead up
- Create a ticketCreate a ticket
Function _parse_and_format_numerical_columns
has a Cognitive Complexity of 16 (exceeds 8 allowed). Consider refactoring. Confirmed
def _parse_and_format_numerical_columns(df): # Defining Numerical Columns to Fix and casting them as strings cols = ["Energy", "dEnergy", "Data", "dData", "Cos/LO", "dCos/LO", "ELV/HL", "dELV/HL"] df[cols] = df[cols].astype(str) df[cols] = df[cols].replace(to_replace=" ", value=np.nan)
- Read upRead up
- Create a ticketCreate a ticket
Function generate_bench_ml_xs
has a Cognitive Complexity of 12 (exceeds 8 allowed). Consider refactoring. Confirmed
def generate_bench_ml_xs(df, models_df, bench_name, to_scale, raw_saving_dir, template_dir=template_path, comp_threshold=0.10): """Generate cross section files using ML-generated values.""" to_scale_copy = to_scale.copy() results_df = models_df.copy()
- Read upRead up
- Create a ticketCreate a ticket