## Submodules¶

class kromatography.ui.tasks.data_source_pane.DataSourceDockPane(**traits)[source]

Bases: pyface.tasks.traits_dock_pane.TraitsDockPane

View on a DataSource object.

datasource = Instance(DataSource)

Global container for all data to explore

requested_data_item = Any

Item last double-clicked on in the tree view

traits_view()[source]

The view used to construct the dock pane’s widget.

class kromatography.ui.tasks.kromatography_task.KromatographyTask[source]

Bases: pyface.tasks.task.Task

Task providing central pane & dock panes to view a KromatographyProject

command_stack = Instance(ICommandStack)

The task’s command stack for Undo/Redo

undo_manager = Instance(IUndoManager)

The global undo manager for the application

project_filepath = Unicode

‘Project’ filepath storing the current task (to store UI elements too)

project = Instance(KromatographyProject)

Project to support the GUI.

central_pane = Instance(SplitEditorAreaPane)

hook to the central pane

central_pane_editor_map = Dict

Map between the object displayed in the central pane and editors for it

simulations_exist = Property(Bool, depends_on='project.study.simulations[]')

Flags to analyze if certain objects exist

create_central_pane()[source]

Create an DataViews pane as the main task UI.

create_dock_panes()[source]

Create all dock panes for the main task UI

activated()[source]

Actions to be taken once the task panes have been created and the window has been created: 1. Ensure that the command stack is the active command stack 2. Open a view on the project’s study

prepare_destroy()[source]
edit_object_in_central_pane(obj, factory=None, uuid_to_map=None)[source]

Select appropriate editor to visualize/edit Traits object in the central pane.

Parameters: obj (any) – Object to be edited in the central pane. factory (type [OPTIONAL]) – Class used to build the editor. uuid_to_map (UUID) – UUID of the object to track as holding the data for the resulting editor. If/when that object gets deleted, the corresponding editor will get closed.
close_central_pane_for_object(obj_info)[source]

Close the central pane editor(s) for specified edited_object.

save_request()[source]

Save current project to a new file.

save_project_as(path='')[source]

Store the current task to the filepath provided and set project file path.

save()[source]

Store the current task to its file path.

save_user_ds()[source]

Store the user datasource to a new timed local file.

request_export_user_ds()[source]

Store the user datasource to a new timed local file.

new_simulation_from_datasource()[source]

Create a new simulation from DataSource data.

new_simulation_from_experiments()[source]

Add new simulations mirroring experiment(s) in the current study.

new_simulation_grid()[source]

Build a SimulationGroup around a center point simulation

open_strip_fraction_editor()[source]

Open the editor for strip fractions.

run_simulations(sims=None)[source]

Submit the selected simulations to CADET and update them with its output.

run_simulation_groups(group=None)[source]

Submit the selected SimulationGroup to CADET and update its simulations with output once run.

run_optimizer(optimizer)[source]

Submit passed optimizer to run.

new_optimizer()[source]

Create a new optimizer.

new_animation_plot()[source]
new_model_calibration_plot()[source]

Open a general chromatogram window to compare simulations and experiments to each other.

request_run_python_script()[source]

Prompt the user to select a python script, and run it if dialog isn’t cancelled.

run_python_script(path='', code='')[source]

Run the content of the python file in-process.

Parameters: path (str [OPTIONAL]) – Path to the script file. Cannot be empty if the code is empty. code (str [OPTIONAL]) – Content of the script file. Cannot be empty if the path is empty.
request_launch_python_console(confirm_on_exit=True)[source]

Launch the qt_console as a separate process.

TODO: Make this an in-process, in-app terminal.

trigger_plot_simulation(obj, name, new)[source]

Open chromatogram for simulation/SimulationGroup that was requested

trigger_run_simulation(obj, name, new)[source]
trigger_run_simulation_group(obj, name, new)[source]
trigger_run_optimizer(obj, name, new)[source]
update_central_pane_tabs(obj, attr, _, deleted_obj_info)[source]
open_proj_file()[source]
open_recent_projects()[source]
show_hide_legend()[source]
show_hide_plot_controls()[source]
update_name()[source]
kromatography.ui.tasks.kromatography_task.is_task_blank(task)[source]

Has the task provided been modified in any way by the GUI?

We check if the project_filepath has been set, if new tabs have been opened, and if the task’s components has been modified in any way.

NOTE: this is not bullet proof to be used in a scripting layers, as there are many ways to modify a task without this function detecting it. This is to be used to detect any changes that a user can make to a task USING THE APPLICATION’s GRAPHICAL INTERFACE.

kromatography.ui.tasks.performance_param_pane.build_performance_data_table_editor()[source]

Build a table editor to display a list of PerformanceParameters of Simulations modeling the provided product.

class kromatography.ui.tasks.performance_param_pane.PerformanceParamPane[source]

Bases: pyface.tasks.traits_dock_pane.TraitsDockPane

View on a Performance Parameter Data and JobManager object

study = Instance(Study)

Study monitored

product = Property(Instance(Product), depends_on='study.product')

Target product

traits_view()[source]

The view used to construct the dock pane’s widget.

class kromatography.ui.tasks.plot_editors.PlotEditor[source]

Bases: pyface.ui.qt4.tasks.editor.Editor

Interface for a plot editor.

Subclasses should specify the plot_model in obj, and implement the _create_control method

create(parent)[source]

Create and set the toolkit-specific control that represents the editor.

class kromatography.ui.tasks.plot_editors.ChromatogramPlotEditor[source]

Editor for viewing and modifying a ChromatogramModel object using the TraitsUI view it provides. It invokes the view factories it knows to create the control it needs to display.

This could have been done using pyface.tasks.traits_editor.TraitsEditor. Using this custom one because the create method in our case will invoke edit_traits on the obj being edited.

obj_view = Any

The obj adapter to build a ModelView

class kromatography.ui.tasks.plot_editors.AnimationPlotEditor[source]

Editor for viewing and modifying a AnimationPlotModel object using the TraitsUI view it provides. It invokes the view factories it knows to create the control it needs to display.

This could have been done using pyface.tasks.traits_editor.TraitsEditor. Using this custom one because the create method in our case will invoke edit_traits on the obj being edited.

class kromatography.ui.tasks.study_browser_pane.StudyDataDockPane(**traits)[source]

Bases: pyface.tasks.traits_dock_pane.TraitsDockPane

View on a Study object

study = Instance(Study)

Global container for all data to explore

requested_data_item = Any

Item last double-clicked on in the tree view

traits_view()[source]

The view used to construct the dock pane’s widget.