Application API

Main Application Module

PhysPlot main application module.

This module implements the complete PhysPlot desktop GUI application: table-based data entry/import, column transformations, plotting with matplotlib, and optional curve fitting.

Input data structure:

The main table stores numeric data in a QTableWidget. Row 0 contains column-role combo boxes; rows 1..N contain numeric data. Plot generation reads that table into OutPut_Table as a two-dimensional NumPy array. File loaders return the same rectangular 2D array structure.

Return type:

GUI classes do not return data directly. Plot windows render matplotlib figures, transformation functions write values back into table columns, and loaders/configuration helpers update global GUI state used by the active plot.

Optional main/runtime behavior:

This module can be imported by physplot.runner or run directly. When run directly it delegates to physplot.runner.run_app().

Original metadata: - File name: PhysPlot.py - Authors: Muhammad Shiraz Ahmad and Sabieh Anwar - Date created: 8/20/2019 - Date last modified: 5/15/2026 - Script Version: 2.0.0 - Python Version: 3.7.3

class Plot_Window(*args: Any, **kwargs: Any)[source]

Bases: QDialog

Plot dialog that renders data, errors, legend, and optional fits.

refresh_plot(self) None[source]

Redraw the existing plot canvas using current table and config state.

Parameters:

self (Plot_Window): Active plot dialog instance.

Returns:

None

class SaveFile(*args: Any, **kwargs: Any)[source]

Bases: QWidget

Save dialog wrapper that exports the current output table to text.

initUI(self) None[source]

Initui.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

saveFileDialog(self) None[source]

Savefiledialog.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

class Ui_ConfigWindow[source]

Bases: object

Plot configuration window for styling and curve-fit display options.

definePlotParameters(self) None[source]

Persist current plot settings and refresh or open the plot window.

Parameters:

self (Ui_ConfigWindow): Active configuration window instance.

Returns:

None

onClicked_radioButton_Equation_crvft_1(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_Equation_crvft_10(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_Equation_crvft_11(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_Equation_crvft_2(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_Equation_crvft_3(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_Equation_crvft_4(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_Equation_crvft_5(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_Equation_crvft_6(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_Equation_crvft_7(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_Equation_crvft_8(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_Equation_crvft_9(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_Label_crvft_1(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_Label_crvft_10(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_Label_crvft_11(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_Label_crvft_2(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_Label_crvft_3(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_Label_crvft_4(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_Label_crvft_5(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_Label_crvft_6(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_Label_crvft_7(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_Label_crvft_8(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_Label_crvft_9(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_off_crvft_1(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_off_crvft_10(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_off_crvft_11(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_off_crvft_2(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_off_crvft_3(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_off_crvft_4(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_off_crvft_5(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_off_crvft_6(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_off_crvft_7(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_off_crvft_8(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

onClicked_radioButton_off_crvft_9(self) None[source]

Handle a legacy curve-fit radio-button click.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

readFitType(self) None[source]

Update curve-fit enable flags from the configuration checkboxes.

Parameters:

self (Ui_ConfigWindow): Active configuration window instance.

Returns:

None

retranslateUi(self, ConfigWindow) None[source]

Configure generated Qt user-interface widgets and signals.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

setupUiConfigWindow(self, ConfigWindow) None[source]

Configure generated Qt user-interface widgets and signals.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

sourceScript(self) None[source]

Configure generated Qt user-interface widgets and signals.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

class Ui_MainWindow[source]

Bases: object

Primary PhysPlot window for table editing, transforms, and plot launch.

about_gui_command(self) None[source]

About gui command.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

btn_CM(self) None[source]

Handle the matching GUI button action.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

btn_CP(self) None[source]

Handle the matching GUI button action.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

btn_ClearTable(self) None[source]

Reset table dimensions/content and recreate axis-role combobox headers.

Parameters:

self (Ui_MainWindow): Active main window UI instance.

Returns:

None

btn_GeneratePlot(self) None[source]

Validate axis selections and open configuration and plot windows.

Parameters:

self (Ui_MainWindow): Active main window UI instance.

Returns:

None

btn_LoadData(self) None[source]

Load a selected dataset file and print values to the table.

Parameters:

self (Ui_MainWindow): Active main window UI instance.

Returns:

None

btn_RM(self) None[source]

Handle the matching GUI button action.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

btn_RP(self) None[source]

Handle the matching GUI button action.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

btn_SaveTable(self) None[source]

Read the current table and open the export save-file dialog.

Parameters:

self (Ui_MainWindow): Active main window UI instance.

Returns:

None

btn_combobox_changed(self, value, column) None[source]

Handle the matching GUI button action.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

btn_combobox_index(self, value) None[source]

Handle the matching GUI button action.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

delRows(self) None[source]

Delrows.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

errMessage(self, Text, InformativeText) None[source]

Errmessage.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

keyPressEvent(self, e) None[source]

Keypressevent.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

open_home_page(self) None[source]

Open home page.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

pltConfigWindow(self) None[source]

Pltconfigwindow.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

printTOTable(self, table_data) None[source]

Printtotable.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

readRow(self) None[source]

Read transform input/output column choices and apply the transform.

Parameters:

self (Ui_MainWindow): Active main window UI instance.

Returns:

None

readTable(self) None[source]

Readtable.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

readTableRow(self) None[source]

Readtablerow.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

retranslateUi(self, MainWindow) None[source]

Configure generated Qt user-interface widgets and signals.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

setupUi(self, MainWindow) None[source]

Configure generated Qt user-interface widgets and signals.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

shiftVal(self) None[source]

Shiftval.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

writeTableRow(self) None[source]

Writetablerow.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

class about_gui(*args: Any, **kwargs: Any)[source]

Bases: QWidget

Modal about dialog showing app version, authors, links, and license.

initUI(self) None[source]

Initui.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

class pick_file_to_append(*args: Any, **kwargs: Any)[source]

Bases: QWidget

File picker dialog used to select an input dataset for import.

initUI(self) None[source]

Initui.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

openFileNamesDialog(self) None[source]

Openfilenamesdialog.

Parameters:

See function signature.

Returns:

None: Result described by the method name and GUI side effects.

Runner Module

Application startup for PhysPlot.

Input data structure:

Uses sys.argv from the current Python process. No custom command-line options are currently parsed by PhysPlot.

Return type:

run_app starts the Qt event loop and returns the integer exit code from QApplication.exec_().

Optional main/runtime behavior:

Sets the application icon, installs an exception logger, creates the main window, centers it, and activates it on macOS when possible.

run_app() int[source]

Create and show the PhysPlot QApplication and main window.

Parameters:

None

Returns:

int: Qt event-loop exit code.

Package Entry Points

PhysPlot application package.

Input data structure:

No external input is consumed at import time.

Return type:

Exposes run_app as the public package entry point.

Optional main/runtime behavior:

Importing this package does not start the GUI. Call run_app() or run python -m physplot to launch PhysPlot.

run_app() int[source]

Create and show the PhysPlot QApplication and main window.

Parameters:

None

Returns:

int: Qt event-loop exit code.

Run PhysPlot with python -m physplot.

Input data structure:

Uses command-line arguments already present in sys.argv; no custom arguments are currently parsed.

Return type:

No Python value is returned. The process exits when the Qt event loop finishes.

Optional main/runtime behavior:

When executed as a module, calls run_app() to launch the GUI.