nucml.evaluation package

Submodules

nucml.evaluation.data_utilities module

nucml.evaluation.data_utilities.get_for_exfor(Z, A, MT, mode='neutrons', library='endfb8.0', mev_to_ev=True, mb_to_b=True, log=True, drop_u=True)[source]

Gets the queried ENDF data for EXFOR functions.

Note: Internal Function.

Parameters
  • Z (int) – Number of protons

  • A (int) – Mass number

  • MT (int) – Reaction type as an ENDF MT code integer.

  • mode (str) – Projectile of the reaction of interest. Only “neutrons” and “protons” is allowed for now.

  • library (str) – Evaluation library to query. Allowed options include endfb8.0, jendl4.0, jeff3.3, and tendl.2019.

  • mev_to_ev (bool) – If True, it converts the energy from MeV to eV.

  • mb_to_b (bool) – If True, it converts the cross sections from millibarns to barns.

  • log (bool, optional) – Apply log transformation to the Energy and Data features. Defaults to True.

Returns

Contains the evaluation dataframe.

Return type

DataFrame

nucml.evaluation.data_utilities.load_new(datapath, mev_to_ev=False)[source]

Loads new ENDF data from a given filepath. The function assumes the file is readable with pd.read_csv() and that the new ENDF file contains a column named “Energy”.

Parameters
  • datapath (str) – Path-like string to new ENDF data file.

  • mev_to_ev (bool, optional) – Converts the energy column to eV. Defaults to False.

Returns

Contains the new ENDF data.

Return type

DataFrame

nucml.evaluation.plot module

nucml.evaluation.plot.plot(isotope, MT, exfor=None, exclude=[], new_data=None, new_data_label='', save=False, save_dir='', z_order_dict={'endf': 1, 'exfor': 3, 'jeff': 6, 'jendl': 5, 'new_data': 2, 'tendl': 4}, mode='neutrons', mev_to_ev=True, mb_to_b=True)[source]

Plots all evaluations for a specific reaction and a given isotope. It is possible to exclude some evaluations if needed. New data can also be added. The avaliable evaluations include endfb8.0, jendl4.0, jeff3.3, and tendl.2019

Parameters
  • isotope (str) – Isotope to query (i.e. Cl35, u235).

  • MT ([type]) – Reaction channel to extract as an integer (ENDF MT codes).

  • exfor (DataFrame, optional) – EXFOR DataFrame to plot along the evaluations. Defaults to None.

  • exclude (list, optional) – List of evaluations to exclude from plot. Defaults to [].

  • new_data (DataFrame, optional) – DataFrame containing new data or extra data to plot. Defaults to None.

  • new_data_label (str, optional) – If new_data is being provided, a label for the legend needs to be provided. Defaults to “”.

  • save (bool, optional) – If True, the figure will be saved. Defaults to False.

  • save_dir (str, optional) – Directory where the figure will be saved. Defaults to “”.

  • z_order_dict (dict, optional) – Dictionary containing the order on which to plot the evaluations. For example, z_order_dict = {“endf”:1, “new_data”:2, “exfor”:3, “tendl”:4, “jendl”:5, “jeff”:6} will plot the endf first followed by the new data if avaliable and so on. Defaults to {“endf”:1, “new_data”:2, “exfor”:3, “tendl”:4, “jendl”:5, “jeff”:6}.

  • mode (str, optional) – Which type of projectile is to be extracted. The only options are “neutrons” and “protons”. Defaults to “neutrons”.

  • mev_to_ev (bool, optional) – Converts energy from MeV to eV. Defaults to True.

  • mb_to_b (bool, optional) – Converts cross section from millibarns to barns. Defaults to True.

Returns

None

Module contents