Sequencer.vi - ad3ller/oskar GitHub Wiki

A tool for conducting experimental series.


Overview

The basic premise of Sequencer.vi is to read sequence files, which describe how hardware parameters should be changed during an experiment. The program ensures that the requested conditions (VARS) are met at the right time, and that any data acquisition software is informed of how to save data so that it can be mapped back to these conditions. Because hardware control is delegated to VAR vi's, extending control to new instruments relatively painless.

Sequence files

The .jsq files are stored as json and contain an array called SEQs. Each of the elements of this array are called lines, and these lines are clusters with two fields:

  • Comment (string). Displayed by sequencer.vi and can be used to add information to the attribute record (e.g., "ignore this point").
  • VAR Array (two column array of strings). The first column contains every VAR name relevant to a given experiment and the second column lists the corresponding values.

Running sequences

The execution of a sequence constitutes an experimental run, identified by the RID. The execution of each sequence line is identified by its sequence ID (SQUID), which iterates during the course of a run. A sequence file is loaded into Sequencer.vi by entering its file path into SEQ File on the Run/Sequencer tab.

When Run is pressed a time-stamp is used to create the RID (%Y%m%d_%H%M%S). The sequencer then proceeds by demanding that the desired experimental conditions of the first line (SQUID = 1) are met, after-which it waits for the acquisition period to complete (Elapsed > Acquire), then it continues to the following line (SQUID = 2), and so on.

If Shuffle is selected then the lines are randomly reordered at the start of every loop.

If SEQ File is empty, the sequencer will not attempt to set any VARS but will otherwise run as normal.

The History tab contains a list of all sequence file names and the times they were run. You can cycle SEQ File (*.osq) over previously ran files by hovering over it and scrolling your mouse wheel (press Refresh to reload the sequence).

sequencer

Saving data

Data is saved to the directory listed in the in the Save Base array on the Settings tab of Sequencer.vi. If more than one base is listed the data will be duplicated.

For each run a HDF5 file ./[YYYY]/[MM]/[DD]/[RID]/[RID]_raw.h5 is created. The path is distributed by Sequencer.vi using the global variable H5. When a run is started it will raise a dialogue that allows the user to record information regarding the Author and Description. This information is saved as attributes of the file.

For each line of the sequence a group will be created in the HDF5 file, identified by the SQUID. The VAR values corresponding to the SQUID are saved as attributes of the group. Measurements made during the SQUID acquisition period are saved inside of the SQUID group. Attributes can also be written to these datasets, e.g., to record camera settings. For further information see the data acquisition page.

To prevent read/ write conflicts data acquisition programs must acquire the semaphore hdf5 before opening the H5 file. If you want to open and view the acquired data (e.g., using HDFView) without aborting a run, use PAUSE. This will halt the run after setting the VARS but before starting the next acquisition period.