PLACE main¶
Run an experiment
-
exception
place.basic_experiment.
AbortExperiment
[source]¶ Bases:
Exception
Custom exceptions for aborting an experiment
-
class
place.basic_experiment.
BasicExperiment
(config)[source]¶ Bases:
object
Basic experiment class
This is the first (and so far, only) experiment class in PLACE. It takes in configuration data for a variety of instruments. Each instrument must have a priority value. This experiment uses the priority order to execute a specified number of updates on each instrument. Data is collected from the instruments and saved as a NumPy record array.
Even if the instruments used do not produce their own data, PLACE will still output a timestamp (with microsecond precision) into the experimental data:
Heading Type Meaning PLACE-time numpy.datetime64[us] timestamp from the system clock, taken at the beginning of each update -
init_phase
()[source]¶ Initialize the plugins
During this phase, all plugins receive their configuration data and should store it. The list of plugins being used by the experiment is created and sorted by their priority level. No physical configuration should occur during this phase.
-
config_phase
()[source]¶ Configure the instruments and post-processing plugins.
During the configuration phase, instruments and post-processing plugins are provided with their configuration data. Metadata is collected from all plugins and written to disk.
-
update_phase
()[source]¶ Perform all the updates on the plugins.
The update phase occurs N times, based on the user configuration for the experiment. This function loops over the instruments and post-processing plugins (based on their priority) and calls their update method.
One NumPy file will be written for each update. If the experiement completes normally, these files will be merged into a single NumPy file.
-