simudo.gui.panels package

Submodules

simudo.gui.panels.bands module

Simudo GUI — Bands panel.

class simudo.gui.panels.bands.BandsPanel(app: SimudoApp)[source]

Bases: object

view() panel.Column[source]

simudo.gui.panels.bcs module

Simudo GUI — Boundary Conditions panel.

Shows left and right contact cards. Each card has:
  • role (Select: swept / reference)

  • per-band BC (RadioButtonGroup: ohmic / zero_current / SRV)

  • when SRV selected: value + unit inputs for surface recombination velocity

class simudo.gui.panels.bcs.BCsPanel(app: SimudoApp)[source]

Bases: object

view() panel.Column[source]

simudo.gui.panels.layers module

Simudo GUI — Layers panel.

Uses the “update in place” pattern: persistent pn.Column/.pane objects whose .objects / .object attributes are mutated directly, giving immediate DOM updates without relying on Panel’s reactive parameter machinery.

class simudo.gui.panels.layers.LayersPanel(app: SimudoApp)[source]

Bases: object

Layers sidebar panel — builds layout once, updates components in place.

property project
rebuild()[source]

Refresh every dynamic component in place.

view() panel.Row[source]

simudo.gui.panels.mat_ast module

AST-based introspection of Python Material subclass files.

Imports nothing from dolfin/simudo so it runs on the host machine without the simulation environment installed.

class simudo.gui.panels.mat_ast.ClassInfo(class_name: 'str', file_path: 'str', material_name: 'Optional[str]' = None, properties: 'List[PropertyInfo]' = <factory>)[source]

Bases: object

class_name: str
property computed_properties: List[PropertyInfo]
property copyable_properties: List[PropertyInfo]
file_path: str
material_name: str | None = None
properties: List[PropertyInfo]
class simudo.gui.panels.mat_ast.PropertyInfo(key: 'str', display: 'str', copyable: 'bool', value: 'Optional[float]' = None, unit: 'str' = '', is_callable: 'bool' = False, callable_type: 'str' = '')[source]

Bases: object

callable_type: str = ''
copyable: bool
display: str
is_callable: bool = False
key: str
unit: str = ''
value: float | None = None
simudo.gui.panels.mat_ast.extract_classes_from_file(file_path: str) List[ClassInfo][source]

Parse a .py file and return a ClassInfo for every material class in it.

Non-material helper classes are skipped — see _is_material_base.

simudo.gui.panels.mat_ast.get_property_keys_for_material(mat, library_dirs: list) set[source]

Return the set of property keys provided by a Material model object. Works for inline materials and library/file references (via AST).

simudo.gui.panels.mat_ast.scan_library_dirs(library_dirs: list) List[ClassInfo][source]

Scan all .py files in library_dirs and return all ClassInfo objects found.

simudo.gui.panels.materials module

Simudo GUI — Materials panel.

Materials supply property defaults at PRIORITY_MATERIAL (lowest). Two kinds:
  • Inline — key/value/unit pairs stored directly in the YAML.

  • Library ref — source: library://ClassName, loaded by the runner.

The panel shows a browseable catalogue of classes found in library directories and a list of project-specific materials.

class simudo.gui.panels.materials.MaterialsPanel(app: SimudoApp)[source]

Bases: object

view() panel.Column[source]

simudo.gui.panels.opt_fields module

Simudo GUI — Optical Fields panel.

Lists optical fields with add / delete. Each field has:
  • name (TextInput)

  • direction (+x / −x radio)

  • photon_energy (value + unit)

  • intensity mode (Explicit | Blackbody)

    Explicit → value + unit Blackbody → T_source, concentration, E_min, E_max (∞ checkbox)

class simudo.gui.panels.opt_fields.OptFieldsPanel(app: SimudoApp)[source]

Bases: object

view() panel.Column[source]

simudo.gui.panels.output module

Simudo GUI — Output panel.

Sections:

1. Folder selector  (editable path + open-in-finder + refresh buttons)
2. J-V plot         (Bokeh interactive; linear / log|J| toggle)
3. Band diagram     (spatial data via spatial_extractor.py -> dolfin in
                     container)
     - layer schematic linked to band-diagram x-axis (Bokeh shared x_range)
     - band plot  (Ephi_* solid black, qfl_* dashed coloured)
4. Add-plot dashboards  (user-defined lines from any spatial quantity, each
                         with its own schematic linked via shared x_range)

Design notes:

- Each Bokeh figure is wrapped in a resizable pn.Column card
  (CSS resize:vertical).  The Bokeh figure inside uses
  sizing_mode="stretch_both" so it fills the card.
- Voltage-dropdown changes update the band diagram in-place (pane.object
  swap) rather than clearing/appending to a Column, to avoid page-scroll
  resets.
- Schematic figures share x_range with their companion data figure so that
  pan/zoom on the data figure automatically updates the schematic.
class simudo.gui.panels.output.OutputPanel(app: SimudoApp)[source]

Bases: object

refresh()[source]
set_folder(path: str)[source]
view() panel.Column[source]

simudo.gui.panels.processes module

Simudo GUI — Processes panel.

Each process has:
  • name

  • class (Select — discovered by AST-parsing electro_optical_process.py)

  • lower-energy band (src_band in YAML)

  • higher-energy band (dst_band in YAML)

  • trap_band (conditional — TrapEOPMixin subclasses only)

  • Include radiative recombination: Yes/No (conditional — optical classes only)

EOP class discovery:

The panel scans electro_optical_process.py at startup using ast.parse() (no
import, no dolfin) to find all concrete subclasses of ElectroOpticalProcess
and determine:
  - optical classes: inherit AbsorptionAndRadiativeRecombinationEOPMixin
                     -> show radiative toggle
  - trap classes:    inherit TrapEOPMixin
                     -> show trap band selector
Cross-reference: see those mixin classes in electro_optical_process.py.
gui_hint attribute:
Any EOP class may define a class-level string attribute:

gui_hint = “Brief description visible in the GUI.”

The AST extractor reads this at startup and displays it as a styled note below the class selector whenever that class is selected. Classes without gui_hint show no note. This is how per-class usage instructions are added without modifying the GUI code. The hint is plain text, not markup: it is escaped before display, so a placeholder like ‘<name>/alpha_function’ survives.

class simudo.gui.panels.processes.ProcessesPanel(app: SimudoApp)[source]

Bases: object

view() panel.Column[source]

simudo.gui.panels.shared module

Simudo GUI — shared widget stylesheets and small utilities.

Import from here rather than duplicating definitions across panel modules.

simudo.gui.panels.shared.already_computed_values(run_folder: str, parameter_name: str) set[source]

Return the set of parameter_name values already recorded in <run_folder>/sim_<parameter_name>.csv (mirrors simudo_1d_runner._already_computed_values, independently implemented here for the same dolfin-free-environment reason as read_checkpoint_metadata()).

simudo.gui.panels.shared.card(title: str, *content, collapsed: bool = False) panel.Card[source]
simudo.gui.panels.shared.label(text: str, width: int = 70) panel.pane.HTML[source]
simudo.gui.panels.shared.read_checkpoint_metadata(checkpoint_yaml_path: str)[source]

Return (param_name, param_value) for a checkpoint yaml, or None if it can’t be read.

Deliberately independent of simudo.io.h5yaml / simudo_1d_runner (both import dolfin at module level, which the GUI’s own conda environment does not have) – the metadata file itself is plain key/string pairs (see AdaptiveStepper.write_xdmf_checkpoint), so a bare yaml.safe_load is sufficient here.

simudo.gui.panels.shared.row_gap(items, gap: str = '6px') panel.Row[source]
simudo.gui.panels.shared.scan_checkpoint_dir(abs_dir: str) list[tuple[str, str]][source]

Return [(label, relative_filename), …] for checkpoints in abs_dir.

Labels are human-readable (e.g. “V = 0.4 (voltage sweep)”); the value stored in resume_from is just the bare filename, matching what simudo_1d_runner.py expects (a path relative to the output folder — checkpoints live in a subdirectory of it, so we include that segment).

simudo.gui.panels.shared.sec_header(title: str) panel.pane.HTML[source]
simudo.gui.panels.shared.value_already_computed(value: float, computed: set) bool[source]

simudo.gui.panels.simulation module

Simudo GUI — Simulation panel.

Sections:
  • Simulation mode (4-way Select: Equilibrium / Dark J-V / Illuminated / Illuminated J-V)

  • Intensity ramp (selfconsistent_optics, step_size — shown when mode includes ramp)

  • Voltage sweep (values list / linspace helper, selfconsistent_optics, step_size)

  • Checkpoints (at_end flags, directory)

  • Resume-from path

  • Spatially resolved output (xdmf_mesh, spatial_profiles, output folder)

  • Execution (backend type + settings; collapsed card)

  • Run button

On Run: saves project, builds the appropriate RunnerBackend from the execution

profile, launches the runner, and streams stdout into the log panel.

class simudo.gui.panels.simulation.SimulationPanel(app: SimudoApp)[source]

Bases: object

set_actual_output_dir(abs_path: str)[source]

Show the directory the runner actually used below the configured Folder field.

view() panel.Column[source]

simudo.gui.panels.stub module

Placeholder panels for sections not yet implemented.

class simudo.gui.panels.stub.StubPanel(*args: Any, **kwargs: Any)[source]

Bases: Parameterized

view()[source]

Module contents