kromatography.app package

Subpackages

Submodules

kromatography.app.krom_app module

TaskApplication object and executable script to run the Reveal Chromatography application.

class kromatography.app.krom_app.KromatographyApp[source]

Bases: app_common.pyface.ui.tasks.task_gui_application.TaskGuiApplication

An application to run CADET simulations and confront to experiments.

app_name = Str()

Application name in CamelCase. Used to set ETSConfig.application_data

initial_files = Either(None, List(Str))

Files to load at start-up.

recent_files = List

Files to load at start-up.

max_recent_files = Int

Max number of project file paths to remember

initial_studies = List(Instance(Study))

Initial list of studies to launch on start

datasource = Instance(DataSource)

Source of default data objects for creating new studies.

job_manager = Instance(JobManager)

Manager for running CADET jobs

datasource_file = Str

File path to the user datasource that the app is using if applicable.

log_filepath = Str

File path to the log file in use.

license_manager = Instance(LicenseManager, ())

License manager to control access to the application

extra_actions = List(Instance('pyface.tasks.action.schema_addition.SchemaAddition'))

Global schema additions.

verbose = Bool(False)

Force show all logger calls in console? Read preferences otherwise.

confirm_on_window_close = Bool

Ask confirmation every time one closes a window?

warn_if_old_file = Bool(True)

Issue warning dialog

auto_close_empty_windows_on_open = Bool

Automatically close empty windows when opening a new one?

start()[source]

The application could be started with no argument, with files that should be open on start or with custom studies that should be opened on start. The application will build a task for any files or study passed at launch.

create_new_task_window(study=None)[source]

Create a new KromatographyProject, task and open a window with it.

Parameters:study (Study or None) – Create the task and window for the study passed.
Returns:window – Window that was created, containing the newly created task.
Return type:TaskWindow
new_study_from_experimental_study_file()[source]

Create new study from experimental study file from disk, prompting user for the path.

new_blank_project()[source]

Set the current study to non-blank so that the view updates to the editing mode.

build_study_from_file(filepath, allow_gui=True)[source]

Build a new task and window from loading an ExperimentalStudy file.

Returns:Returns the newly created TaskWindow around the provided study.
Return type:TaskWindow
request_project_from_file()[source]

Open a saved study from loading from file.

open_project_from_file(path)[source]

Open a saved task from a project file.

add_to_recent_files(path)[source]

Store the project files loaded.

activate_window_if_already_open(path)[source]

Returns if a project file has been opened already. If so, make its window active.

Parameters:path (str) – Absolute path to the project file we are testing.
Returns:Whether that path was already open.
Return type:bool
open_about_dialog()[source]
open_bug_report()[source]
open_documentation()[source]
open_tutorial_files()[source]
open_preferences()[source]
open_software_updater()[source]
open_recent_project()[source]
close_empty_windows()[source]
create_new_project_group()[source]
create_recent_project_group()[source]
create_close_group()[source]
create_undo_group()[source]
create_copy_group()[source]
create_preference_group()[source]
create_bug_report_group()[source]
create_documentation_group()[source]
create_update_group()[source]
check_license()[source]
skip_confirm_on_window_close(*args, **kwds)[source]

Utility to temporarily skip confirmation when closing a window.

kromatography.app.krom_app.instantiate_app(init_files=None, splash_duration=3, debug=False, user_ds=u'', **app_traits)[source]

Returns a KromatographyApp instance, optionally around the provided initial files.

Parameters:
  • init_files (list of strings [OPTIONAL]) – List of filenames to open on launch of the application.
  • splash_duration (float [OPTIONAL]) – Duration, in seconds, to show the splash screen. Set to .1 sec if debug=True. Defaults to 3 seconds.
  • debug (bool [OPTIONAL]) – Running in debug mode? If so, verbose is set to True, and splash_duration is set to DEBUG_SPLASH_DURATION seconds.
  • user_ds (str [OPTIONAL]) – File path to the user data file to load the application with. Leave blank to use the default user data file.
  • app_traits (dict [OPTIONAL]) – Additional Application traits to set: verbose, confirm_on_window_close, ...

kromatography.app.krom_driver module

Script similar to the Legacy script that runs a full cycle: load a study, create simulation from an experiment, run CADET and plot both the simulation and experiments together in a model calibration plot style.

kromatography.app.krom_driver.run_chromatography_simulation(input_file, output_file=None, expt_id='Run_1', skip_cadet=False, skip_plot=False, skip_animation=False, binding_model=None, transport_model=None, allow_gui=True)[source]

Run chromatography simulation for the inputs given in input_file and plot the results.

Parameters:
  • input_file (str (file path)) – The file path for the excel file containing the experiment/simulation input data.
  • output_file (str (file path)) – The file path for the CADET output h5 file. If None, then a default name is chosen based on the study and experiment ids.
  • expt_id (str) – The name of the exeperiment to use for intializing the CADET simulation. If None, the first experiment in the study is chosen.
  • skip_cadet (bool) – If True, the CADET simulation is not run but instead the output file is directly loaded (assuming one already exists). The main usecase here is for testing.
  • skip_plot (bool) – If True, the chromatogram plot is not generated. This is useful for testing.
Returns:

study – The Study instance containing the experiment and the simulation data.

Return type:

Study

kromatography.app.krom_driver.main()[source]

kromatography.app.main module

Module to update and launch the Reveal Chromatography application.

Since we want to be able to update the kromatography package, and its dependencies, we need to protect any import that is not stricly necessary for the update mechanism to be delayed until the last minute.

kromatography.app.main.create_and_run_app(debug=False)[source]

Create an application object, initialize it and run its GUI.

Parameters:debug (bool [OPTIONAL, default=False]) – Override debug argument and run as debug? By default, conforms to the -d command line argument.
kromatography.app.main.main(debug=False)[source]

Launch the application if it isn’t already running.

Parameters:debug (bool [OPTIONAL, default=False]) – Override debug argument and run as debug? By default, conforms to the -d command line argument.
kromatography.app.main.main_debug()[source]

Launch the application, forcing to be in debug mode.

kromatography.app.run_cadet_simulation module

Mini command line application to run CADET on an existing HDF5 input file.

kromatography.app.run_cadet_simulation.main()[source]