PLACE demo plugin

Demo instrument: a counter

This is meant as both a test and a working demo for PLACE. It can generate plots of “dummy data”, similar to the data produced by the AlazarTech module. It is great for showing how PLACE operates without setting up any hardware.

class place.plugins.place_demo.place_demo.PlaceDemo(config, plotter)[source]

Demo instrument.

The original idea for this device was to be a programming demo for the most basic device conceivable – a unit counter. However, it soon became apparent that this class was useful as a software test of the PLACE system and it is now used to test: configuration importing, data collection, plotting, and other subsystems in PLACE. It can also be used as a quick way to verify that a PLACE installation has been successful.

PlaceDemo requires sleep time for each phase, as well as number_of_points, and plot values. Simple metadata is recorded to verify the metadata code.

config(metadata, total_updates)[source]

Calculate basic values and record basic metadata.

Parameters:
  • metadata (dict) – metadata for the experiment
  • total_updates (int) – number of update that will be performed
update(update_number, progress)[source]

Increment the counter.

Additionally, this will generate a random trace, plot the trace, and return the trace in standard PLACE format. A sleep is performed between updates based on the user-provided sleep_time configuration.

Parameters:
  • update_number (int) – the count of the current update (0-indexed)
  • progress (dict) – A blank dictionary for sending data back to the frontend
Returns:

the current count (1-indexed) and a dummy trace in a numpy record array

Return type:

numpy.recarray

cleanup(abort=False)[source]

Stop the demo and cleanup.

Parameters:abort (bool) – True if the experiement is being aborted, in which case plotting should not occur