.. _sardana-acquisition: =========== Acquisition =========== Sardana provides advanced solutions for data acquisition. In the data acquisition process controlled by sardana there is always involved at least one experimental channel. The data acquisition model is built from two layers of abstraction. The *experimental channels* (:ref:`counter/timer `, :ref:`0D `, :ref:`1D `, :ref:`2D ` and :ref:`pseudo counter `) are the elements which produce data: each of them acquires a value (scalar, spectrum or image) over a given integration time. The :ref:`measurement group ` is the acquisition orchestrator: it groups an arbitrary set of channels, prepares them together, decides which channel acts as timer or monitor, starts the channels in a coordinated way according to the configured :ref:`synchronization ` (software or hardware) and collects their results as a single, consistent operation. Two different ways of acquisition exist in Sardana: :ref:`sardana-acquisition-expchannel` and :ref:`sardana-acquisition-measgrp`. .. _sardana-acquisition-expchannel: Experimental channel acquisition -------------------------------- :ref:`Counter/timer `, :ref:`1D ` and :ref:`2D ` experimental channels can be directly involved in data acquisition without being included in a :ref:`measurement group acquisition `. This can be useful for simple use cases like a single image capture, testing purposes or for implementation of your own measurement procedures. The relevant :term:`API` for this feature is documented in the API of each of the elements, for example, :ref:`sardana-countertimer-api`. The single acquisition of these channels can be also done with the macro :class:`~sardana.macroserver.macros.standard.ct`, giving the name of the channel as last argument. .. _sardana-acquisition-measgrp: Measurement group acquisition ----------------------------- Measurement group acquisition allows much more complex measurement processes than the :ref:`sardana-acquisition-expchannel`. These could be, for example, multiple channel, multiple repetitions or hardware synchronized acquisitions. .. important:: Sardana does not allow that the elements involved in one operation are used in another one simultaneously. This rule applies to the data acquisition operations as well. For example, if you try to use a channel or synchronizer element that is participating in another acquisition sardana will raise an error. So elements can not participate concurrently in two :ref:`measurement group acquisitions ` neither in :ref:`experimental channel acquisition `. Other acquisition features: * synchronized start of multiple axes acquisition * hardware/software synchronized acquisition (see :ref:`sardana-explanation-synchronization`) * measurement preparation