Plotting
- class divHretention.plot_Tc_map_with_subplots(filenames=[], filetypes=[], time=10000000.0, T_bounds=[320, 1200], c_bounds=[1e+20, 1e+23], figsize=(8, 8), **kwargs)
Bases:
objectPlots the (T, concentration) map with distribution plots on the side. This class works with csv files (see
Exposition())- Parameters
filenames (list, optional) – The CSV file names. Defaults to [].
filetypes (list, optional) – The CSV file types (“WEST” or “ITER”). Defaults to [].
T_bounds (list, optional) – The limits for T (K). Defaults to [320, 1200].
c_bounds (list, optional) – The limits for concentration (H m-3). Defaults to [1e20, 1e23].
figsize (tuple, optional) – The size of the figure. Defaults to (8, 8).
- add_case(filename, filetype)
Adds a new exposure case to the plot.
- Parameters
filename (str) – The CSV file name.
filetype (str) – The CSV file type (“WEST” or “ITER”).
- show()
Similar to matplotlib.pyplot.show()
- class divHretention.plot_along_divertor(filenames=[], filetypes=[], quantities=['stdev_inv'], figsize=(8, 8), plot_sigma=True, overlap_ions_atoms=True, colors=None, **kwargs)
Bases:
objectPlots some quantities along the divertor arc length. This class works with csv files (see
Exposition()).- Parameters
filenames (list, optional) – The CSV file names. Defaults to [].
filetypes (list or str, optional) – The CSV file types (“WEST” or “ITER”). Defaults to [].
quantities (list, optional) – The quantities to be plotted (see
correspondance_dict()inplot_along_divertor). Defaults to [“stdev_inv”].figsize (tuple, optional) – The size of the figure. Defaults to (8, 8).
plot_sigma (bool, optional) – If true, the 95% confidence interval will be plotted. Defaults to True.
overlap_ions_atoms (bool, optional) – If True, energies, fluxes and angles of ions and atoms will be plotted on the same plot. Defaults to True.
colors (list, optional) – List of matplotlib colors. The length of colors must be the same as filetypes. Defaults to None.
- Raises
ValueError – if missing the filetypes argument
- add_case(filename, filetype, color)
Adds a new exposure case to the plot.
- Parameters
filename (str) – The CSV file name.
filetype (str) – The CSV file type (“WEST” or “ITER”).
color (str) – the color of the line.
- Raises
ValueError – If a quantity is unknown.
- compute_nrows()
Compute the number of rows needed
- Returns
number of rows, list of axes
- Return type
int, list
- show()
Similar to matplotlib.pyplot.show()
- divHretention.create_correspondance_dict(filename, filetype)
Creates a correspondance dictionary link for the case
- Parameters
filename (str) – The CSV file name.
filetype (str) – The CSV file type (“WEST” or “ITER”).
- Returns
correspondance dictionary with a “var” key for each quantity
- Return type
dict
- class divHretention.plot_T_c_inv_along_divertor(**kwargs)
Bases:
divHretention.plotting.plot_along_divertor.plot_along_divertorPlots the temperature, concentration and inventory distribution along the divertor
- class divHretention.plot_particle_exposure_along_divertor(**kwargs)
Bases:
divHretention.plotting.plot_along_divertor.plot_along_divertorPlots the exposure condition (particle fluxes, energies and angles) along the divertor
- divHretention.plot_inv_with_uncertainty(x, y, stdev, zscore=2, alpha_fill=0.3, **kwargs)
Plots the inventory along the divertor with the associated uncertainity filled
- Parameters
x (numpy.array) – Arc length (m) along the divertor
y (numpy.array) – Inventory per unit thickness (H/m)
stdev (numpy.array) – standard deviation
zscore (float) – userdefined zscore corresponding to a confidence interval. Defaults to 2.
alpha_fill (float, optional) – Opacity of the filled region between 0 and 1. Defaults to 0.3.