GUIBRUSHR.GUI.Input_Output_Panels.Input_Panels.TabPanels.FrameManualModel.FrameManualModel module

FrameManualModel module provides a GUI panel for manual model creation and visualization. This module allows users to: - Configure atmospheric parameters - Set up molecular compositions - Generate and visualize spectral models - Save model results and plots

class GUIBRUSHR.GUI.Input_Output_Panels.Input_Panels.TabPanels.FrameManualModel.FrameManualModel.FrameManualModel(parent, row, column, color, path_default, frame_input, width, height, window, **kwargs)[source]

Bases: MyPanel

A GUI panel for manual model creation and visualization.

This class provides a comprehensive interface for: - Configuring atmospheric parameters and molecular compositions - Generating spectral models with different radiative transfer codes - Visualizing and comparing model results - Saving model outputs and plots

The panel includes controls for: - Target selection and basic parameters - Temperature-pressure profile configuration - Molecular composition setup - Model calculation and visualization - Results saving and export

__init__(parent, row, column, color, path_default, frame_input, width, height, window, **kwargs)[source]

Initialize the manual model frame.

Parameters:
  • parent – Parent widget

  • row – Row position in parent

  • column – Column position in parent

  • color – Background color

  • path_default – Default path for file operations

  • frame_input – Input frame containing target information

  • width – Frame width

  • height – Frame height

  • window – Main window

  • **kwargs – Additional keyword arguments

update_molec_textfield()[source]

Update the molecule text field with the currently selected molecule information. Adds a new line with molecule formula, isotope, sub-isotope, presence flag, mass, value, VMR flag, and formula.

update_elem_textfield()[source]

Update the elements text field with currently selected element information. Adds element for hybrid chemical equilibrium.

update_condensed_molec_textfield()[source]

Update the condensed molecules text field with currently selected molecule information. Adds condensed molecule for cloud/aerosol modeling.

get_param_index(param_name)[source]

Get the index of a parameter in the parameters list.

Parameters:

param_name – Name of the parameter to find

Returns:

Index of the parameter in the list

Return type:

int

update_params_vmr_func()[source]

Update VMR (Volume Mixing Ratio) parameters based on selected molecules. Collects information about molecules and updates the corresponding parameter fields.

update_hydrogen_menus_btn()[source]

Update hydrogen-related parameter values.

This method calculates and updates the values for H, H-, and e- parameters based on the current H2 and He values.

update_LR()[source]

Update low resolution parameters based on resolution selection. Enables/disables low resolution offset parameter based on resolution mode.

update_frame()[source]

Update the frame based on chemistry selection. Enables/disables appropriate parameters based on the selected chemistry mode.

update_target()[source]

Update target-specific parameters based on selected target. Updates parameters like Kp, temperature, and radius based on target information.

update_atmo()[source]

Update atmospheric parameters based on T-P profile selection. Enables/disables appropriate temperature and pressure parameters.

scattering_check()[source]

Update scattering parameters based on scattering checkbox. Enables/disables scattering-related parameters.

create_plot(nome_filef, vmr_mean)[source]

Create and save a plot of the model spectrum.

Parameters:
  • nome_filef – Base filename for saving plot

  • vmr_mean – Volume mixing ratio information to include in plot

Returns:

(png_file_path, pickle_file_path, string_values)

Return type:

tuple

plot()[source]

Generate and display a plot of the model spectrum. Handles model calculation, plot creation, and display updates.

return_value_tp(name)[source]

Get temperature-pressure parameter value with error handling.

Parameters:

name – Name of the parameter

Returns:

Parameter value with error handling

Return type:

ValueErrorTP

Toggle between two plots for comparison (currently disabled).

Stop the plot blinking animation.

Display blinking animation between plots (currently disabled).

display_imm()[source]

Display plot switching animation (currently disabled).

divide_instrument(inst_str, resolution)[source]

Process instrument string based on resolution.

Parameters:
  • inst_str – Instrument string to process

  • resolution – Resolution mode (HR/LR)

Returns:

Processed instrument string

Return type:

str

calc_model()[source]

Calculate the model spectrum based on current parameters.

Returns:

(not_retrieval_obj, dict_params)

Return type:

tuple

save_model()[source]

Save the current model results and plots. Creates necessary directories and saves data in various formats.

modify_target_list(target_list)[source]

Update the target dropdown list.

Parameters:

target_list – List of available targets

include_h_m()[source]

Handle H- inclusion in the model. Updates continuum opacity and parameter states based on H- checkbox.