gui module
Define a GUI.
Todo
Export/Import settings
Todo
Add description at and of parameters Dynamic boxes for Parameters?
- class MainWindow(default_model='Vaughan', default_loader='PandasLoader', default_plotter='PandasPlotter')
Bases:
QMainWindowThis object holds the GUI.
Create the GUI.
- autofill_data_to_plot = True
If selecting Model in dropdown should automatically fill the appopriate data to plot checkbox
- autofill_nature_to_plot = True
If selecting Model in dropdown should automatically fill the appopriate emission data checkbox
- autofill_plotting_ranges = True
If loading data should automatically fill the energy/angle ranges with their maximum values
- _setup_file_selection_matrix()
Create the 4 * 3 matrix to select the files to load.
- Return type:
list[list[None|QListWidget]]
- _deactivate_unnecessary_file_widgets()
Grey out the files not needed by current model.
- Return type:
- _setup_loader_settings_dialog()
Give arguments to setup the loader setttings button.
- _setup_model_dropdown()
Set the
Modelrelated interface.Assign the
model_classesandmodel_dropdown.- Return type:
- _setup_model_settings_dialog()
Give arguments to setup the model setttings button.
- _setup_model_configuration()
Set the interface related to the model specific parameters.
- Return type:
- _populate_parameters_table_constants()
Print out the model parameters in dedicated table.
- Return type:
- _update_parameter_value_from_table(item)
Update
Parametervalue based on user input in table.- Return type:
- _populate_parameters_table_values()
Print out the values of the model parameters in dedicated table.
- Return type:
- _create_evaluators_table()
Create the two-column table that displays evaluation results.
- Return type:
- _set_reevaluation_button()
Create and return the ‘Re-evaluate’ button.
- Return type:
- _populate_evaluators_table()
Write the contents of
self.evaluationsinto the table.- Return type:
- _fill_plot_nature_and_population()
Check emission data type and population.
When model is updated, check the
Data to plotandPopulation to plotcheckboxes in thePlottab that are concerned by current model.- Return type:
- _set_up_data_to_plot_checkboxes()
Add checkbox to select which data should be plotted.
- Return type:
- _set_up_population_to_plot_checkboxes()
Add checkbox to select which population should be plotted.
- Return type:
- _get_emission_data_type_to_plot()
Read input to determine the emission data type to plot.
- _get_populations_to_plot()
Read input to determine the populations to plot.
- _gen_linspace(variable)
Take the desired input, check validity, create array of values.
- _fill_plotting_ranges()
Fill energy and angle plotting ranges to match data files values.
This method is called when the button
Loadis pressed.- Return type:
- _set_list_widget_state(widget, enabled)
Enable or disable a QListWidget based on
enabled.- Return type:
- main()