Defining new experiments

Experiment([name, protocol, plate_setup, ...])

A QuantStudio experiment / EDS file


A basic Protocol is generally made up of Stage s, which are made up of Step s. These are often compatible with AB’s software.

Protocol([stages, name, volume, runmode, ...])

A run protocol for the QuantStudio.

Stage(steps[, repeat, index, label, ...])

A Stage in a protocol, composed of Step s with a possible repeat.

Step(time, temperature[, collect, ...])

A normal protocol step, of a hold and possible collection.

While the parameters for these classes default to seconds and degrees Celsius, when using numbers as input, they also use the pint library to accept strings (or pint Quantity objects). Thus, you can use "1 hr" or "1 hour" instead of 3600, or "59 °C" or "59 degC" for a temperature. Note that for temperature increments, pint distinguishes between a temperature change and absolute temperature unit, so you would need to use, for example "-1 delta_degC".

QSLib also supports custom steps, which can contain arbitrary SCPI commands. For common commands, it also includes classes that allow more convenient use:

CustomStep(body[, identifier, repeat])

A protocol step composed of SCPI/protocol commands.

protocol.Exposure(settings[, state])

Modifies exposure settings.

protocol.Hold(time[, increment, ...])

A protocol hold (for a time) command.

protocol.Ramp(temperature[, increment, ...])

Ramps temperature to a new setting.

protocol.HACFILT(filters[, default_filters])

Sets filters for HoldAndCollect .

protocol.HoldAndCollect(time[, increment, ...])

A protocol hold (for a time) and collect (set by HACFILT) command.

scpi_commands.SCPICommand(command, *args[, ...])

A representation of an SCPI Command.

Once created, there are several useful methods:


Generate a (markdown) text protocol description.


A plot of the temperature and data collection points.


A DataFrame of the temperature protocol.


An array of all start and end times of each step, interleaved.


A list of all filters used at some point in the protocol.

Protocol.check_compatible(new, status)

Checks compatibility for changing a running protocol to a new one.


Returns a new copy (recursively) of the protocol.


PlateSetup([sample_wells, samples])

Loading and saving existing experiments



Load an experiment from an EDS file.

Experiment.from_machine(machine, name)

Create an experiment from data on a machine, checking the running experiment if any, the machine's public_run_complete storage, and the machine's uncollected storage.


Create an experiment from the one currently running on a machine.


Experiment.save_file([path_or_stream, ...])

Save an EDS file of the experiment.

Information, data access and plotting



Experiment name, also used as file name on the machine.


Return the status of the experiment, if currently running.


The run creation time.


The actual beginning of the first stage of the run, defined as the first "Run Stage" message in the log after "Stage PRERUN".


The run start time as a datetime.


The actual end of the main part of the run, indicated by "Stage POSTRun" or an abort.


The run end time as a datetime, taken from the log.


All filters used at some point in the experiment.


A dictionary of sample names to sample wells (convenience read/write access to the PlateSetup .

Experiment.info([format, plate])

Generate a summary of the experiment, with some formatting configuation.


Create a self-contained HTML summary (returned as a string, but very large) of the experiment.



A DataFrame with fluorescence reading information.


A DataFrame of temperature readings, at one second resolution, during the experiment (and potentially slightly before and after, if included in the message log).


Experiment.plot_anneal_melt([samples, ...])

Plots anneal/melt curves.

Experiment.plot_over_time([samples, ...])

Plots fluorescence over time, optionally with temperatures over time.


A plot of the temperature and data collection points in the experiment's protocol.

Experiment.plot_temperatures(*[, sel, ...])

Plot sample temperature readings.


NormToMeanPerWell([stage, step, cycle, ...])

A Processor that divides the fluorescence reading for each (filterset, well) pair by the mean value of that pair within a particular selection of data.

NormToMaxPerWell([stage, step, cycle, selection])

A Processor that divides the fluorescence reading for each (filterset, well) pair by the max value of that pair within a particular selection of data.


A Processor that takes no arguments, and simply passes through raw fluorescence values.

Running and controlling experiments

Experiment.run([machine, require_exclusive, ...])

Load the run onto a machine, and start it.

Experiment.change_protocol(new_protocol[, ...])

For a running experiment and an updated protocol, check compatibility with the current run, and if possible, update the protocol in the experiment file and on the machine, changing the current run.


If this experiment is running, pause it (immediately).


If this experiment is running, resume it.


If this experiment is running, stop it after the end of the current cycle.


If this experiment is running, abort it, stopping it immediately.