Skip to content

Commit

Permalink
added type hints to plot_xs
Browse files Browse the repository at this point in the history
  • Loading branch information
shimwell authored Oct 24, 2024
1 parent 049f297 commit 818a2b5
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions openmc/plotter.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from itertools import chain
from numbers import Integral, Real
from typing import Dict, Iterable, List

import numpy as np

Expand Down Expand Up @@ -120,10 +121,21 @@ def _get_title(reactions):
return 'Cross Section Plot'


def plot_xs(reactions, divisor_types=None, temperature=294., axis=None,
sab_name=None, ce_cross_sections=None, mg_cross_sections=None,
enrichment=None, plot_CE=True, orders=None, divisor_orders=None,
energy_axis_units="eV", **kwargs):
def plot_xs(
reactions: Dict[str, openmc.Material | List[str]],
divisor_types: Iterable[str] | None = None,
temperature: float = 294.0,
axis: "plt.Axes" | None = None,
sab_name: str | None = None,
ce_cross_sections: str | None = None,
mg_cross_sections: str | None = None,
enrichment: float | None = None,
plot_CE: bool = True,
orders: Iterable[int] | None = None,
divisor_orders: Iterable[int] | None = None,
energy_axis_units: str = "eV",
**kwargs,
) -> "plt.Figure":
"""Creates a figure of continuous-energy cross sections for this item.
Parameters
Expand Down

0 comments on commit 818a2b5

Please sign in to comment.