lisa.notebook.interact_tasks#

lisa.notebook.interact_tasks(trace, tasks=None, kind=None)[source]#

Decorator to make a block of code parametrized on a task that can be selected from a dropdown.

Parameters:
  • trace (lisa.trace.Trace) – Trace object in use

  • tasks (list(int or str or lisa.analysis.tasks.TaskID) or None) – List of tasks that are available. See kind for alternative way of specifying tasks.

  • kind (str or None) –

    Alternatively to tasks, a kind can be provided and the tasks will be selected from the trace for you. It can be:

    • rtapp to select all rt-app tasks

    • all to select all tasks.

Example:

trace = Trace('trace.dat')

# Allow selecting any rtapp task
@interact_tasks(trace, kind='rtapp')
def do_plot(task):
    trace.ana.load_tracking.plot_task_signals(task)