epyr.isotope_gui

A Tkinter GUI module for displaying nuclear isotope data from a file.

Provides the IsotopesGUI class and a run_gui() function to launch the application. Expects isotope data in ‘sub/isotopedata.txt’ relative to this script’s location or the current working directory.

Functions

element_class(atomic_number)

Determines the period, group, and class of an element.

rgb_to_hex(rgb_tuple)

Converts an RGB tuple (values 0-255) to a Tkinter hex color string.

run_gui()

Creates the main Tkinter window and runs the IsotopesGUI application.

Classes

IsotopesGUI(root)

GUI application to display nuclear isotope data.

ToolTip(widget[, text])

Simple tooltip implementation for Tkinter widgets.

epyr.isotope_gui.rgb_to_hex(rgb_tuple)[source]

Converts an RGB tuple (values 0-255) to a Tkinter hex color string.

epyr.isotope_gui.element_class(atomic_number)[source]

Determines the period, group, and class of an element.

Parameters:

atomic_number (int) – The atomic number (Z) of the element.

Returns:

(period, group, element_category)

element_category: 0=main, 1=transition, 2=rare earth

Return type:

tuple

class epyr.isotope_gui.ToolTip(widget, text='widget info')[source]

Simple tooltip implementation for Tkinter widgets.

__init__(widget, text='widget info')[source]
enter(event=None)[source]

Display the tooltip window.

leave(event=None)[source]

Destroy the tooltip window.

class epyr.isotope_gui.IsotopesGUI(root)[source]

GUI application to display nuclear isotope data.

__init__(root)[source]

Initializes the Isotopes GUI.

Parameters:

root – The root Tkinter window (tk.Tk).

Raises:
  • FileNotFoundError – If the isotope data file cannot be found.

  • Exception – If there’s an error reading or processing the data file.

epyr.isotope_gui.run_gui()[source]

Creates the main Tkinter window and runs the IsotopesGUI application.