ufo-kit/concert — pull request #63 by sensej (2013-09-23 10:02:54+00:00)
Title: Experiments

Discussion from #56 moved here. The base experiment is now a logging and folder creating wrapper around some data acquisition process which is passed in constructor as a callable. I dropped the `ImagingExperiment` base class completely because the experiments can diverge so much that it stops making sense posing any claims on some parent class. I would rather provide "standard" experiments which IMHO cover 99% of use cases (radiography and tomography).
To summarize, now one can do this:

```python
def daq():
LOGGER.info("Acquiring some fancy data")

ex = Experiment(daq, "/home/johndoe/fancyexperiment")
ex.run().wait()
ex.run().wait()
```
This results in a folder "/home/johndoe/fancyexperiment" with one file experiment.log.

or

```python
ex = Experiment(daq, "/home/johndoe/fancyexperiment/scan{:>02}")
ex.run().wait()
ex.run().wait()
```
This results in log files "/home/johndoe/fancyexperiment/scan00/experiment.log" and "/home/johndoe/fancyexperiment/scan01/experiment.log".

Simple radiography example:
```python
def take_radios(folder):
# Configure beam line
# Acquire data
# Readout
save_images(folder)

ex = Experiment(daq, "/home/johndoe/fancyexperiment")
ex.run(ex.folder).wait()
```