madgui.core.session module

This module defines the toplevel context that is used in madgui to keep track of current model, config, online control, and mainwindow.

Classes

Session([config])

Context variables and top-level application logic for a madgui session, i.e.

class madgui.core.session.Session(config=None)[source]

Bases: object

Context variables and top-level application logic for a madgui session, i.e. the interaction between user and different parts of the computer program. This object keeps track and coordinates the use of the currently opened model, GUI window, user variables, control system connection, and configuration data.

Methods

configure()

find_model(name)

load_default([model])

load_model(name, **madx_args)

model_args(filename)

Please OVERRIDE to provide custom model arguments.

on_model_changed(old, new)

save(filename)

Save session state to file.

session_data()

set_interpolate(points_per_meter)

terminate()

Attributes

known_extensions

list() -> new empty list

configure()[source]
find_model(name)[source]
known_extensions = ['.cpymad.yml', '.madx']
load_default(model=None)[source]
load_model(name, **madx_args)[source]
model_args(filename)[source]

Please OVERRIDE to provide custom model arguments.

on_model_changed(old, new)[source]
save(filename)[source]

Save session state to file.

session_data()[source]
set_interpolate(points_per_meter)[source]
terminate()[source]