GWeasy v3.0.1
No code GW analysis interface
 
Loading...
Searching...
No Matches
GWeasy.OmicronApp Class Reference

Public Member Functions

 __init__ (self, root)
 
 create_widgets (self)
 
 create_entry (self, label, key, frame=None, row=0, col=0)
 
 create_double_entry (self, label, key, frame=None, row=0, col=0)
 
 create_file_selector (self, label, key, is_directory=False, frame=None, row=0, column=0)
 
 create_folder_selector (self, label, key, is_directory=False, frame=None, row=0, column=0)
 
 create_output_products_selection (self, frame=None, row=0, column=0)
 
 create_dropdown (self, label, key, options, frame=None, row=0, column=0)
 
 create_editable_dropdown (self, label, key, options, frame=None, row=0, column=0)
 
 create_slider (self, label, key, min_val, max_val, frame=None, row=0, column=0)
 
 create_channel_dropdown (self, row=0)
 
 select_file (self, var, is_directory=False)
 
 load_config (self)
 
 save_config (self)
 
 run_omicron_script (self)
 
 start_omicron_process (self)
 
 append_output (self, text)
 
 open_custom_segs_dialog (self)
 
 generate_fin_ffl (self, channel_dir, selected_segments)
 

Public Attributes

 root = root
 
str config_path = "config.txt"
 
dict config_data = {}
 
dict entries = {}
 
dict output_products = {}
 
dict ui_elements = {}
 
 project_dir = os.getcwd().replace("\\", "/")
 
str wsl_project_dir = f"/mnt/{self.project_dir[0].lower()}/{self.project_dir[2:]}"
 
str GWFOUT_DIRECTORY = "./gwfout"
 
 canvas = tk.Canvas(root)
 
 scrollbar = ttk.Scrollbar(root, orient="vertical", command=self.canvas.yview)
 
 scrollable_frame = ttk.Frame(self.canvas)
 
 window_frame = self.canvas.create_window((0, 0), window=self.scrollable_frame, anchor="nw")
 
 terminal = TerminalFrame(self.root, row=4, column=0, columnspan=2, height=10, width=80)
 
 custom_segs_btn = tk.Button(button_frame, text="Custom Segs", command=self.open_custom_segs_dialog)
 
 save_button = tk.Button(button_frame, text="Save Config", command=self.save_config)
 
 start_button = tk.Button(button_frame, text="Start OMICRON", command=self.run_omicron_script)
 
 channel_dropdown
 

Detailed Description

Definition at line 106 of file GWeasy.py.

Constructor & Destructor Documentation

◆ __init__()

GWeasy.OmicronApp.__init__ ( self,
root )

Definition at line 107 of file GWeasy.py.

Member Function Documentation

◆ append_output()

GWeasy.OmicronApp.append_output ( self,
text )
Append output to the shared terminal frame.

Definition at line 513 of file GWeasy.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_channel_dropdown()

GWeasy.OmicronApp.create_channel_dropdown ( self,
row = 0 )
Creates an editable dropdown for selecting a channel, updating dynamically in the background.

Definition at line 307 of file GWeasy.py.

Here is the caller graph for this function:

◆ create_double_entry()

GWeasy.OmicronApp.create_double_entry ( self,
label,
key,
frame = None,
row = 0,
col = 0 )

Definition at line 190 of file GWeasy.py.

◆ create_dropdown()

GWeasy.OmicronApp.create_dropdown ( self,
label,
key,
options,
frame = None,
row = 0,
column = 0 )
Creates a dropdown menu inside a given frame.

Definition at line 275 of file GWeasy.py.

◆ create_editable_dropdown()

GWeasy.OmicronApp.create_editable_dropdown ( self,
label,
key,
options,
frame = None,
row = 0,
column = 0 )
Creates an editable dropdown menu inside a given frame.

Definition at line 284 of file GWeasy.py.

Here is the caller graph for this function:

◆ create_entry()

GWeasy.OmicronApp.create_entry ( self,
label,
key,
frame = None,
row = 0,
col = 0 )

Definition at line 182 of file GWeasy.py.

◆ create_file_selector()

GWeasy.OmicronApp.create_file_selector ( self,
label,
key,
is_directory = False,
frame = None,
row = 0,
column = 0 )
Creates a file/directory selector inside the given frame (or default to scrollable_frame).

Definition at line 203 of file GWeasy.py.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ create_folder_selector()

GWeasy.OmicronApp.create_folder_selector ( self,
label,
key,
is_directory = False,
frame = None,
row = 0,
column = 0 )
Creates a file/directory selector inside the given frame (or default to scrollable_frame).
Ensures paths are relative to the current working directory and creates the directory if missing.
Returns the selected relative path.

Definition at line 214 of file GWeasy.py.

Here is the call graph for this function:

◆ create_output_products_selection()

GWeasy.OmicronApp.create_output_products_selection ( self,
frame = None,
row = 0,
column = 0 )
Creates checkboxes for selecting output products inside a given frame.

Definition at line 262 of file GWeasy.py.

◆ create_slider()

GWeasy.OmicronApp.create_slider ( self,
label,
key,
min_val,
max_val,
frame = None,
row = 0,
column = 0 )
Creates a slider for selecting a numerical value.

Definition at line 298 of file GWeasy.py.

◆ create_widgets()

GWeasy.OmicronApp.create_widgets ( self)

Definition at line 143 of file GWeasy.py.

Here is the call graph for this function:

◆ generate_fin_ffl()

GWeasy.OmicronApp.generate_fin_ffl ( self,
channel_dir,
selected_segments )
 Generates fin.ffl file with correctly formatted paths and timestamps, then preselects it in the UI. 

Definition at line 582 of file GWeasy.py.

Here is the caller graph for this function:

◆ load_config()

GWeasy.OmicronApp.load_config ( self)

Definition at line 392 of file GWeasy.py.

Here is the call graph for this function:

◆ open_custom_segs_dialog()

GWeasy.OmicronApp.open_custom_segs_dialog ( self)
Opens a GUI window to select a channel and time segments with scrolling and dynamic layout.

Definition at line 517 of file GWeasy.py.

Here is the call graph for this function:

◆ run_omicron_script()

GWeasy.OmicronApp.run_omicron_script ( self)
Start the OMICRON script in a separate process and update the output in real-time.

Definition at line 449 of file GWeasy.py.

Here is the call graph for this function:

◆ save_config()

GWeasy.OmicronApp.save_config ( self)

Definition at line 402 of file GWeasy.py.

Here is the call graph for this function:

◆ select_file()

GWeasy.OmicronApp.select_file ( self,
var,
is_directory = False )

Definition at line 385 of file GWeasy.py.

Here is the caller graph for this function:

◆ start_omicron_process()

GWeasy.OmicronApp.start_omicron_process ( self)
Run the OMICRON command dynamically in WSL.

Definition at line 457 of file GWeasy.py.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ canvas

GWeasy.OmicronApp.canvas = tk.Canvas(root)

Definition at line 121 of file GWeasy.py.

◆ channel_dropdown

GWeasy.OmicronApp.channel_dropdown
Initial value:
= ttk.Combobox(
self.scrollable_frame,
textvariable=self.ui_elements["DATA CHANNELS"],
values=[], # Start empty, will be populated dynamically
state="normal" # Allows manual input
)

Definition at line 317 of file GWeasy.py.

◆ config_data

dict GWeasy.OmicronApp.config_data = {}

Definition at line 110 of file GWeasy.py.

◆ config_path

GWeasy.OmicronApp.config_path = "config.txt"

Definition at line 109 of file GWeasy.py.

◆ custom_segs_btn

GWeasy.OmicronApp.custom_segs_btn = tk.Button(button_frame, text="Custom Segs", command=self.open_custom_segs_dialog)

Definition at line 156 of file GWeasy.py.

◆ entries

dict GWeasy.OmicronApp.entries = {}

Definition at line 111 of file GWeasy.py.

◆ GWFOUT_DIRECTORY

str GWeasy.OmicronApp.GWFOUT_DIRECTORY = "./gwfout"

Definition at line 118 of file GWeasy.py.

◆ output_products

dict GWeasy.OmicronApp.output_products = {}

Definition at line 112 of file GWeasy.py.

◆ project_dir

GWeasy.OmicronApp.project_dir = os.getcwd().replace("\\", "/")

Definition at line 115 of file GWeasy.py.

◆ root

GWeasy.OmicronApp.root = root

Definition at line 108 of file GWeasy.py.

◆ save_button

GWeasy.OmicronApp.save_button = tk.Button(button_frame, text="Save Config", command=self.save_config)

Definition at line 158 of file GWeasy.py.

◆ scrollable_frame

GWeasy.OmicronApp.scrollable_frame = ttk.Frame(self.canvas)

Definition at line 123 of file GWeasy.py.

◆ scrollbar

GWeasy.OmicronApp.scrollbar = ttk.Scrollbar(root, orient="vertical", command=self.canvas.yview)

Definition at line 122 of file GWeasy.py.

◆ start_button

GWeasy.OmicronApp.start_button = tk.Button(button_frame, text="Start OMICRON", command=self.run_omicron_script)

Definition at line 160 of file GWeasy.py.

◆ terminal

GWeasy.OmicronApp.terminal = TerminalFrame(self.root, row=4, column=0, columnspan=2, height=10, width=80)

Definition at line 139 of file GWeasy.py.

◆ ui_elements

dict GWeasy.OmicronApp.ui_elements = {}

Definition at line 113 of file GWeasy.py.

◆ window_frame

GWeasy.OmicronApp.window_frame = self.canvas.create_window((0, 0), window=self.scrollable_frame, anchor="nw")

Definition at line 130 of file GWeasy.py.

◆ wsl_project_dir

str GWeasy.OmicronApp.wsl_project_dir = f"/mnt/{self.project_dir[0].lower()}/{self.project_dir[2:]}"

Definition at line 116 of file GWeasy.py.


The documentation for this class was generated from the following file: