Recorder API

Recorders are the Sardana plugins in charge of delivering scan data to its destinations, for example a file, the Spock output or a plot. This page is the reference of the recorder-writing API. For a step-by-step recipe on how to develop your own recorder see Writing recorders.

Base classes

Custom recorders are written by subclassing one of the base classes of the sardana.macroserver.scan.recorder package:

DataRecorder(*args, **kwargs)

Generic class for data recorder.

BaseFileRecorder(**pars)

DataHandler()

The data handler is the data recording center of a system.

  • DataRecorder – base class of all recorders. Implement its _startRecordList, _writeRecord and _endRecordList methods to process scan data records.

  • BaseFileRecorder – base class for recorders which write data to a file. File recorders are implicitly selected based on the extensions declared in their formats attribute (see ScanFile and ScanRecorder).

  • DataHandler – the fan-out object which dispatches each scan record to all the active recorders.

More specialized bases are also available in the same package: BaseNEXUS_FileRecorder and BaseNAPI_FileRecorder (defined in sardana.macroserver.scan.recorder.storage) for NeXus file recorders and BaseSharedMemoryRecorder (defined in sardana.macroserver.scan.recorder.sharedmemory) for shared memory recorders.

Module documentation

The full autogenerated documentation of the recorder package is available at recorder.