pyarts.workspace.Workspace

class pyarts.workspace.Workspace(verbosity=0, agenda_verbosity=0)[source]

The Workspace class represents an ongoing ARTS simulation. Each Workspace object holds its own ARTS workspace and can be used to execute ARTS workspace methods or access workspace variables.

All workspace methods taken from workspace_methods in the methods module are added as attributed on creation and are thus available as class methods.

ptr

object pointing to the ArtsWorkspace instance of the ARTS C API

Type

ctypes.c_void_p

_vars

Dictionary holding local variables that have been created interactively using the one of Create ARTS WSMs.

Type

dict

__init__(verbosity=0, agenda_verbosity=0)[source]

The init function just creates an instance of the ArtsWorkspace class of the C API and sets the ptr attributed to the returned handle.

It also adds all workspace methods as attributes to the object.

Parameters
  • verbosity (int) – Verbosity level (0-3), 1 by default

  • agenda_verbosity (int) – Verbosity level for agendas (0-3), 0 by default

Methods

__init__([verbosity, agenda_verbosity])

The init function just creates an instance of the ArtsWorkspace class of the C API and sets the ptr attributed to the returned handle.

add_variable(var[, group])

This will try to copy a given python variable to the ARTS workspace and return a WorkspaceVariable object representing this newly created variable.

create_variable(group, name)

Create a workspace variable.

execute_agenda(agenda)

Execute agenda on workspace.

execute_controlfile(name)

Execute controlfile or agenda on workspace.

set_variable(wsv, value)

This will set a WSV to the given value.