qcodes.measure

class qcodes.measure.Measure(*actions)[source]

Bases: qcodes.utils.metadata.Metadatable

Create a DataSet from a single (non-looped) set of actions.

Parameters

*actions (Any) – sequence of actions to perform. Any action that is valid in a Loop can be used here. If an action is a gettable Parameter, its output will be included in the DataSet. Scalars returned by an action will be saved as length-1 arrays, with a dummy setpoint for consistency with other DataSets.

dummy_parameter = <qcodes.instrument.parameter.Parameter: single at 139839006054992>
run_temp(**kwargs)[source]

Wrapper to run this measurement as a temporary data set

get_data_set(*args, **kwargs)[source]
run(use_threads=False, quiet=False, station=None, **kwargs)[source]

Run the actions in this measurement and return their data as a DataSet

Parameters
  • quiet (Optional[bool]) – Set True to not print anything except errors. Default False.

  • station (Optional[Station]) – the Station this measurement pertains to. Defaults to Station.default if one is defined. Only used to supply metadata.

  • use_threads (Optional[bool]) – whether to parallelize get operations using threads. Default False.

  • location (Optional[Union[str, bool]]) – the location of the DataSet, a string whose meaning depends on formatter and io, or False to only keep in memory. May be a callable to provide automatic locations. If omitted, will use the default DataSet.location_provider

  • name (Optional[str]) – if location is default or another provider function, name is a string to add to location to make it more readable/meaningful to users

  • formatter (Optional[Formatter]) – knows how to read and write the file format. Default can be set in DataSet.default_formatter

  • io (Optional[io_manager]) – knows how to connect to the storage (disk vs cloud etc)

location, name formatter and io are passed to data_set.new_data along with any other optional keyword arguments.

Returns

a DataSet object containing the results of the measurement

snapshot_base(update: Optional[bool] = False, params_to_skip_update: Optional[Sequence[str]] = None)[source]

Override this with the primary information for a subclass.

load_metadata(metadata: Dict[Any, Any]) None

Load metadata into this classes metadata dictionary.

Parameters

metadata – Metadata to load.

snapshot(update: Optional[bool] = False) Dict[Any, Any]

Decorate a snapshot dictionary with metadata. DO NOT override this method if you want metadata in the snapshot instead, override snapshot_base().

Parameters

update – Passed to snapshot_base.

Returns

Base snapshot.