f4enix.output.fispact_legacy_out.FispactOutput#

class f4enix.output.fispact_legacy_out.FispactOutput(filepath: Path | str | PathLike, cooling_times: list[str], parse_sddr: bool = True, parse_decay_heat: bool = True, parse_pathways: bool = True)#

Bases: object

Store data parsed from FISPACT legacy output files

Parameters:
  • filepath (PathLike) – path to the fispact output

  • cooling_times (list[str]) – list of labels associated to the different cooling times. No check is performed on the correct length of the label list, the last len(cooling_times) timesteps in the inventory data will be associated to these labels.

  • parse_sddr (bool, optional) – whether to parse the SDDR data, by default True

  • parse_decay_heat (bool, optional) – whether to parse the decay heat data, by default True

  • parse_pathways (bool, optional) – whether to parse the pathways data, by default True

Variables:
  • filepath (Path) – path to the fispact output

  • name (str) – name of the fispact output file without extension

  • inventory_data (list[pp.TimeStep]) – inventory data parsed from the fispact output file. This is a pypact object.

  • sddr (pd.DataFrame) – SDDR data extracted from the inventory data.

  • decay_heat (pd.DataFrame) – Decay heat data extracted from the inventory data.

  • pathways_collection (PathwayCollection) – PathwayCollection object containing the pathways extracted from the fispact output file.

Methods

__init__(filepath, cooling_times[, ...])

Store data parsed from FISPACT legacy output files

add_pathways_rows(df[, who])

Add pathways rows to a SDDR dataframe.

filter_by_cum_dose(perc, label[, add_pathways])

Filter the SDDR output (at a certain cooling time) to get at least a certain percent of the cumulative dose.

filter_by_cum_heating(perc, label[, ...])

Filter the decay heating output (at a certain cooling time) to get at least a certain percent of the cumulative heat.

add_pathways_rows(df: DataFrame, who='dose') DataFrame#

Add pathways rows to a SDDR dataframe.

Parameters:
  • df (pd.DataFrame) – filtered dataframe

  • who (str, optional) – whether to add pathways rows for ‘dose’ or ‘heat’ dataframe, by default ‘dose’.

Returns:

dataframe with pathways rows added

Return type:

pd.DataFrame

filter_by_cum_dose(perc: float, label: str, add_pathways: bool = False) DataFrame#

Filter the SDDR output (at a certain cooling time) to get at least a certain percent of the cumulative dose.

Parameters:
  • perc (float) – percent of cumulative dose to filter at

  • label (str) – cooling time label to filter at

  • add_pathways (bool, optional) – whether to add pathways rows, by default False

Returns:

filtered dataframe

Return type:

pd.DataFrame

filter_by_cum_heating(perc: float, label: str, add_pathways: bool = False) DataFrame#

Filter the decay heating output (at a certain cooling time) to get at least a certain percent of the cumulative heat.

Parameters:
  • perc (float) – percent of cumulative heat to filter at

  • label (str) – cooling time label to filter at

  • add_pathways (bool, optional) – whether to add pathways rows, by default False

Returns:

filtered dataframe

Return type:

pd.DataFrame