pyampp.gxbox.gxampp

Attributes

app

base_dir

Classes

CustomQLineEdit

PyAmppGUI

Main application GUI for the Solar Data Model.

Functions

main([debug])

Entry point for the PyAmppGUI application.

Module Contents

pyampp.gxbox.gxampp.app[source]
pyampp.gxbox.gxampp.base_dir[source]
class pyampp.gxbox.gxampp.CustomQLineEdit[source]

Bases: PyQt5.QtWidgets.QLineEdit

setTextL(text)[source]

Sets the text of the QLineEdit and moves the cursor to the beginning.

Parameters:

text – str The text to set.

class pyampp.gxbox.gxampp.PyAmppGUI[source]

Bases: PyQt5.QtWidgets.QMainWindow

Main application GUI for the Solar Data Model.

This class creates the main window and sets up the user interface for managing solar data and model configurations.

central_widget

The central widget of the main window.

Type:

QWidget

main_layout

The main layout for the central widget.

Type:

QVBoxLayout

initUI():

Initializes the user interface.

add_data_repository_section():

Adds the data repository section to the UI.

update_sdo_data_dir():

Updates the SDO data directory path.

update_gxmodel_dir():

Updates the GX model directory path.

update_external_box_dir():

Updates the external box directory path.

update_dir(new_path, default_path):

Updates the specified directory path.

open_sdo_file_dialog():

Opens a file dialog for selecting the SDO data directory.

open_gx_file_dialog():

Opens a file dialog for selecting the GX model directory.

open_external_file_dialog():

Opens a file dialog for selecting the external box directory.

add_model_configuration_section():

Adds the model configuration section to the UI.

add_options_section():

Adds the options section to the UI.

add_cmd_display():

Adds the command display section to the UI.

add_cmd_buttons():

Adds command buttons to the UI.

add_status_log():

Adds the status log section to the UI.

update_command_display():

Updates the command display with the current command.

update_hpc_state(checked):

Updates the UI when Helioprojective coordinates are selected.

update_hgc_state(checked):

Updates the UI when Heliographic Carrington coordinates are selected.

get_command():

Constructs the command based on the current UI settings.

execute_command():

Executes the constructed command.

save_command():

Saves the current command.

refresh_command():

Refreshes the current session.

clear_command():

Clears the status log.

info_only_box = None[source]
model_time_orig = None[source]
rotate_revert_button = None[source]
coords_center = None[source]
coords_center_orig = None[source]
initUI()[source]

Sets up the initial user interface for the main window.

on_reset_to_test_defaults_clicked()[source]
on_restore_last_saved_clicked()[source]
on_open_fov_selector_clicked()[source]
closeEvent(event)[source]
add_data_repository_section()[source]
update_sdo_data_dir()[source]

Updates the SDO data directory path based on the user input.

update_gxmodel_dir()[source]

Updates the GX model directory path based on the user input.

update_refmaps_path()[source]
update_jsoc_notify_email()[source]

Updates the JSOC notify email via the PYAMPP_JSOC_NOTIFY_EMAIL environment variable.

read_external_box()[source]

Reads the external box path based on the user input.

update_external_box_dir()[source]

Updates the external box directory path based on the user input.

update_dir(new_path, default_path, target_edit=None)[source]

Updates the specified directory path.

Parameters:
  • new_path (str) – The new directory path.

  • default_path (str) – The default directory path.

open_sdo_file_dialog()[source]

Opens a file dialog for selecting the SDO data directory.

open_gx_file_dialog()[source]

Opens a file dialog for selecting the GX model directory.

open_external_file_dialog()[source]

Opens a file dialog for selecting the external box directory.

open_refmaps_path_dialog()[source]
add_model_configuration_section()[source]
add_options_section()[source]

Adds the options section to the main layout.

add_cmd_display()[source]

Adds the command display section to the main layout.

add_cmd_buttons()[source]

Adds the command buttons to the main layout.

add_status_log()[source]

Adds the status log section to the main layout.

on_coord_x_input_return_pressed(widget)[source]
on_coord_y_input_return_pressed(widget)[source]
on_grid_x_input_return_pressed(widget)[source]
on_grid_y_input_return_pressed(widget)[source]
on_grid_z_input_return_pressed(widget)[source]
on_res_input_return_pressed(widget)[source]
on_padding_size_input_return_pressed(widget)[source]
on_time_input_changed()[source]
on_rotate_revert_button_clicked()[source]
rotate_revert()[source]
on_rotate_model_to_time()[source]

Rotates the model to the specified time.

update_command_display(widget=None)[source]

Updates the command display with the current command.

apply_geometry_selection(selection: pyampp.gxbox.selector_api.BoxGeometrySelection) None[source]

Apply an accepted geometry selection (e.g., from a future standalone FOV selector) to the existing pyAMPP GUI input fields.

apply_selector_result(result: pyampp.gxbox.selector_api.SelectorDialogResult) None[source]

Apply a full selector dialog result to GUI-visible and hidden state.

update_hpc_state(checked, coords_center=None)[source]

Updates the UI when Helioprojective coordinates are selected.

Parameters:

checked (bool) – Whether the Helioprojective radio button is checked.

update_hgc_state(checked, coords_center=None)[source]

Updates the UI when Heliographic Carrington coordinates are selected.

Parameters:

checked (bool) – Whether the Heliographic Carrington radio button is checked.

update_hgs_state(checked, coords_center=None)[source]

Updates the UI when Heliographic Stonyhurst coordinates are selected.

Parameters:

checked (bool) – Whether the Heliographic Stonyhurst radio button is checked.

update_coords_center(revert=False)[source]
get_command()[source]

Constructs the command based on the current UI settings.

Returns:

The command as a list of strings.

Return type:

list

execute_command()[source]

Executes the constructed command.

stop_command()[source]

Stops the running GXbox process if any.

save_command()[source]

Saves the current gx-fov2box command as a shell script.

copy_command()[source]

Copies the current gx-fov2box command line to the clipboard.

refresh_command()[source]

Refreshes the current session.

clear_command()[source]

Clears the status log.

clear_console()[source]

Clears the console panel.

copy_console()[source]

Copies the full console text to clipboard.

save_console()[source]

Saves the console output to a text file.

send_to_gxbox_view()[source]
pyampp.gxbox.gxampp.main(debug: bool = typer.Option(False, '--debug', help='Enable debug mode with an interactive IPython session.'))[source]

Entry point for the PyAmppGUI application.

This function initializes the PyQt application and displays the main GUI window. Session/default field state is established inside PyAmppGUI during startup.

Parameters:

debug (bool, optional) – Enable debug mode with an interactive IPython session, defaults to False

Raises:

SystemExit – Exits the application loop when the GUI is closed

Returns:

None

Return type:

NoneType

Examples

pyampp