class, meas_gen, overwrite=False)

A data-taking session.

Useful for organizing, saving, and live-plotting data while (automatically or manually) taking it.

__init__(name, meas_gen, overwrite=False)

Create a DataSession.

  • name (str) – The name of the session. Used for naming the saved data file.
  • meas_gen (generator) – A generator that, when iterated through, returns individual measurements as dicts. Each dict key is a string that is the name of what’s being measured, and its matching value is the corresponding quantity. Most often you’ll want to create this generator by writing a generator function.
  • overwrite (bool) – If True, data with the same filename will be overwritten. Defaults to False.
create_plot(vars, **kwargs)

Create a plot of the DataSession.

This plot is live-updated with data points as you take them.

  • vars (list of tuples) – vars to plot. Each tuple corresponds to a data series, with x-data, y-data, and optional format string. This is meant to be reminiscent of matplotlib’s plot function. The x and y data can each either be a string (representing the variable in the measurement dict with that name) or a function that takes kwargs with the name of those in the measurement dict and returns its computed value.
  • **kwargs (keyword arguments) – used for formatting the plot. These are passed directly to the plot function. Useful for e.g. setting the linewidth.

Start collecting data.

This function blocks until all data has been collected., base_dir=None), channel=1, FSR=None)'', trace_num=0, base_dir=None)

Read a trace from the scope, save it and fit a ringdown curve.

  • subdir (string) – Subdirectory in which to save the data file.
  • trace_num (int) – An index indicating which trace it is.
  • base_dir (string) – The path of the toplevel data directory., scope, channel=1), subdir='', trace_num=0, base_dir=None), delimiter='\t'), values, axis=None)

Append values to the end of an array-valued Quantity.