Commit 2b556af6 authored by Laurent Claustre's avatar Laurent Claustre

Merge branch '28-review-documentation' into 'master'

Resolve "Review documentation"

Closes #28

See merge request !51
parents 2aedb1b6 a0941256
Pipeline #3187 passed with stages
in 1 minute and 41 seconds
Subproject commit e056b619aa8312d11fea357bb857cdb2aeed3815
Subproject commit df3014650ef869e1af6e5ddca8b0b42171546c2b
Subproject commit 80b5117d2ac90df9d80acc12dc9a40ead08a99f5
Subproject commit e148a266a6689e9e1e5545a842e2f6ac6cc443c3
Subproject commit 7a9a501ae880c62c42f3b23467bed804936c6d62
Subproject commit 019824712a193bf67dac59f54551d8414f794f4c
Subproject commit 72e90d2e3c9a6a1d46ae18ddfe2bd073b2660ee5
Subproject commit 1ce68b1b5fc08ec93f66962738d6a0b24c96ad87
Subproject commit af6e64b3dbfee80173e800a0a8675fa4739c7456
Subproject commit 61ddfec995ab3ac369e12d2f20f78912d3b09502
Subproject commit eaebbbc34a83147ad47ba488f50eca408ae44e0f
Subproject commit 06f9aec3c7b902e25e95c591b6e741265e7f6c91
Subproject commit 6c4b4f71f86815acafacf72fc3e62d443c811f3e
Subproject commit 3bdc691009947d3e9fe711b36fdbf87688c42163
Subproject commit cd3709975e7f16c946a7cec418b2d07cb44b2ccf
Subproject commit 59235b8cd7793b589e62bf4722a2175bdad6bfc4
Subproject commit 6aaf5fcd3d32b7cdd4b6b2d7a6c131fa63043963
Subproject commit 2f3a081b6090bd4633d5bff8209c7f14065c9181
Subproject commit 62ee60e70ebd91aef78ecf0652716b331928c714
Subproject commit da6eb765610cad49da16ceb3a9e969e71e84b09a
Subproject commit 0bad3ed996093eeffbff7204a4141ef5a85d68bf
Subproject commit ac1afc7ea5651e294f1beb74536103aaf4e59411
Subproject commit d4c302e339f32d647bd6d2384fde5e862ec5c8b3
Subproject commit a9020398aba8ec80c999d4b6859925a916f3191e
Subproject commit 549b83af0756582476ad595d18e33d8815759ddf
Subproject commit 491b097a012c29168e3a097f937c42ddd398f88e
Subproject commit 5757c68f5b768cc5d747fa0b8c9713d1dd0cd882
Subproject commit 62df13167bf545911354e1d62f81261f9b8b5183
Subproject commit 9f6654c848858e72c292dfce49d039de801f883b
Subproject commit f6c02853450a9d4d2af6dc02fbcc7a0412081710
Subproject commit bf7a4d08e19fd06eaa9766af647848168ff3ba1c
Subproject commit 7c8d81ffe22d7f1a447eff0731279bd0fc297c9c
Subproject commit 497a3dc76121843fd1ec6924cc63d23696001e12
Subproject commit 83528e5d022e52d7163d66b53915ad285cac71b5
Subproject commit 043d7c06500792ca5075e39cf12b6f5673910e05
Subproject commit 8c77a01a45568bc8f719c96b282c9679615aa015
Subproject commit 3c82381c8c8ed85574b62a8b8da05f1ab083d237
Subproject commit d5fa92d2e8cb0ae86b8831b47d0acf24c52f7998
Subproject commit 35f498f4a8cedd70e8de91be69dddc76b7f41939
Subproject commit cea97188cd370bed6567a81cb6ef91b294084bc5
Subproject commit bb4599cd712b7bb53ff2c532457edd82cceb598b
Subproject commit 0febf5627ff76c08da68c93ad31fe1be4db22f8e
Subproject commit 783615bf4b39525f9804c3e82769ced9633fcc34
Subproject commit 9a30312ced87a53595b56ae673e6a98b132ab0bf
Subproject commit 003f9a8e4c430e8c9d0105441d42b7b15b64563d
Subproject commit dda475da96948630f05bf41d3dcb4c694fbcb869
Subproject commit 7ff1411a7a579e482d4b57dded421ee4903db12d
Subproject commit 2c94c24158d5d5e0cd4bfa39e7276a8f0523228f
Subproject commit d1c96281bb42bd53a26a8b9333be3f54d6cf20f4
Subproject commit 633172fa7a0c76121bb9f0fcaf0c4ebd4b703217
This diff is collapsed.
Subproject commit e0785f50e6e9b8d48869c923c4ea102cf0d41e28
Subproject commit fa940658b8a01ea26da67bee4250d70594f183f7
Subproject commit 7687bf98f4048e39ce4e6c36d1a219dab550f4dc
Subproject commit 0f2dcb4ae6084c2990a9ac52ea5c5363fa2a7c9a
Subproject commit edffbf3e8ba85b946deb73af743c1942a1176c44
Subproject commit 89f71186c51652daff86a08a0363b58a8818733d
Subproject commit b16ce8f24e1120f7101e14a2f1ae592f9157f0dc
Subproject commit 6c9654374f13d6a842cfef11143faa891b2d7643
Subproject commit 55fbbc342d88bf68a69f9e2d1e98ac0ef163e8e5
Subproject commit 9df8fdcf4f83f92bd890b16546c8f4bed6cdcb52
Subproject commit 9fdf83c4b1ba465ee00d842a846612ba9e501237
Subproject commit 53ba87c630aecbdf824b6288f8c6e7a09e40e4b4
.build
.doxygen
Thumbs.db
*~
*.bck
......@@ -3,6 +3,8 @@
Build and Install
-----------------
Two methods are provided to build Lima from source.
Using scripts
^^^^^^^^^^^^^
The ``install`` scripts will run cmake, compile and install.
......@@ -91,11 +93,10 @@ Then compile and install:
cmake --build
sudo cmake --build --target install
May you need to update your environment?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Environment Setup
^^^^^^^^^^^^^^^^^
If you have changed the default destination path for both libraries and python modules you should update
your environment variables.
If you have changed the default destination path for both libraries and python modules you should update your environment variables.
For Linux:
......@@ -111,7 +112,7 @@ For Windows:
set PATH=%PATH%;<my-new-install-dir>\Lima\lib
set PYTHONPATH=%PYTHONPATH%;<my-new-install-dir>
or update the system wide variables PATH for the libraries and PYTHONPATH for python.
or update the system wide variables ``PATH`` for the libraries and ``PYTHONPATH`` for python.
.. _PyTango: http://github.com/tango-cs/pytango
......@@ -3,21 +3,109 @@ C++ API
Unfortunately very limited documentation is available from the source doc...
Hello, Lima!
````````````
Let's start with a simple example of an image acquisition function using the simulator camera.
.. code-block:: c++
// A camera instance
Simulator::Camera simu;
// A hardware interface and the control object
Simulator::Interface hw(simu);
CtControl ct = CtControl(&hw);
// Get the saving control and set some properties
CtSaving *save = ct.saving();
save->setDirectory("./data");
save->setPrefix("test_");
save->setSuffix(".edf");
save->setNextNumber(100);
save->setFormat(CtSaving::EDF);
save->setSavingMode(CtSaving::AutoFrame);
save->setFramesPerFile(100);
// Set the binning or any other processing
Bin bin(2, 2);
CtImage *image = ct.image();
image->setBin(bin);
// Get the acquistion control and set some properties
CtAcquisition *acq = ct.acquisition();
acq->setAcqMode(Single);
acq->setAcqExpoTime(expo);
acq->setAcqNbFrames(nframe);
// Prepare acquistion (transfer properties to the camera)
ct.prepareAcq();
// Start acquistion
ct.startAcq();
std::cout << "SIMUTEST: acq started" << std::endl;
//
long frame = -1;
while (frame < (nframe - 1))
{
using namespace std::chrono;
high_resolution_clock::time_point begin = high_resolution_clock::now();
usleep(100000);
CtControl::ImageStatus img_status;
ct.getImageStatus(img_status);
high_resolution_clock::time_point end = high_resolution_clock::now();
auto duration = duration_cast<microseconds>(end - begin).count();
std::cout << "SIMUTEST: acq frame nr " << img_status.LastImageAcquired
<< " - saving frame nr " << img_status.LastImageSaved << std::endl;
if (frame != img_status.LastImageAcquired) {
unsigned int nb_frames = img_status.LastImageAcquired - frame;
std::cout << " " << duration << " usec for " << nb_frames << " frames\n";
std::cout << " " << 1e6 * nb_frames / duration << " fps" << std::endl;
frame = img_status.LastImageAcquired;
}
}
std::cout << "SIMUTEST: acq finished" << std::endl;
// Stop acquisition ( not really necessary since all frames where acquired)
ct.stopAcq();
std::cout << "SIMUTEST: acq stopped" << std::endl;
Main interfaces
```````````````
The control interface is the high level interface that lets your run an acquisition.
.. doxygenclass:: lima::CtControl
:project: control
:members:
.. doxygenclass:: lima::CtAcquisition
:project: control
:members:
.. doxygenclass:: lima::HwInterface
.. doxygenclass:: lima::HwFrameCallback
:project: hardware
:members:
.. doxygenclass:: lima::HwFrameCallback
The Hardware Interface is the low level interface that must be implemented by detector plugins.
.. doxygenclass:: lima::HwInterface
:project: hardware
:members:
Capabilities interfaces
```````````````````````
.. doxygenclass:: lima::HwDetInfoCtrlObj
:project: hardware
......@@ -31,7 +119,8 @@ Capabilities interfaces
:project: hardware
:members:
Implementations
Implementations Helpers
```````````````````````
.. doxygenclass:: lima::SoftBufferCtrlObj
:project: hardware
......
Future Cameras
^^^^^^^^^^^^^^
We have many contributors now for new camera plugins, main but not the least are:
ESRF, SOLEIL, DESY, ALBA, FRMII, ANKA.
During the coming year, several new detector plugins will be available.
Acknowledgement
===============
Many contributors contributed to new camera plugins, including:
- `ESRF <https://www.esrf.eu/>`_,
- `SOLEIL <https://www.synchrotron-soleil.fr/>`_,
- `DESY <http://www.desy.de/>`_,
- `ALBA <https://www.cells.es/en>`_,
- `FRMII <https://www.frm2.tum.de>`_,
- `ANKA <https://www.anka.kit.edu/>`_.
thank you for your support.
Under development
=================
During the coming year, several new detector plugins should be released:
- Hexitec
- SVCam HR (SVS-Vistek)
- Vieworks
- Eiger (PSI)
Foreseen
========
- Eiger (PSI)
- Rashpa
......@@ -7,17 +7,21 @@ As Lima is not packaged yet, the only way for now is to retrieve the source from
For both Linux and Windows we recommend to use the git tools:
- For Linux, install Git_ package if your linux distribution did not.
- For Windows, get and install Git_ first for the download section. Then use the git-bash tool with linux-like command line commands.
- For Windows, get and install Git_ first from the download section. Then use the git-bash tool with linux-like commands.
Command to get all sources
^^^^^^^^^^^^^^^^^^^^^^^^^^
All cameras
^^^^^^^^^^^
Here is the command to get the sources for all cameras:
.. code-block:: bash
git clone --recursive git://github.com/esrf-bliss/Lima.git
Commands for a minimum checkout to get all source needed for a particular camera
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For a specific camera
^^^^^^^^^^^^^^^^^^^^^
Here are the commands for a minimum checkout to get all source needed for a specific camera:
.. code-block:: bash
......@@ -29,7 +33,7 @@ Commands for a minimum checkout to get all source needed for a particular camera
In addition (but optional) you can get the **TANGO** python device servers, so update your git clone again:
.. code-block:: bash
.. code-block:: bash
git submodule init application/tango/python
git submodule update
......
......@@ -6,7 +6,7 @@ For collaborative development, we use the "Fork & Pull" model from Github. So an
.. note:: If you want to contribute with a new camera plug-in you should first request us (by email @ lima@esrf.fr) to get the new plug-in camera sub-module created. We will provide:
- a default structure of directories (<mycamera>/src /include sip/ doc/ python/ test/)
- the Makefile files (<mycamera>/Makefile, <mycamera>/src/Makefile, <mycamera>/test/Makefile)
- the build system file (<mycamera>/CMakeLists.txt)
- templates files (src and include) for the mandatory classes:
- <MyCamera>Interface
......@@ -16,14 +16,6 @@ For collaborative development, we use the "Fork & Pull" model from Github. So an
- a standard .gitignore file
- a template index.rst for the documentation
In addition we will update with new entries other files needed to compile the plugin library and the python module:
- Lima/config.inc_default
- Lima/camera/Makefile
- build/Makefile
- sip/Makefile
- sip/configure.py
As above do not forget to fork the new sub-module project.
Create a github account
......
......@@ -10,20 +10,13 @@ Lima ( **L** ibrary for **Im** age **A** cquisition) is a project for the unifie
Lima is a C++ library which can be used for many different cameras. The library is also available for Python_ and it provides a PyTango_ server for remote control.
The documentation is also available in `pdf`_ format.
The documentation is also available in `pdf`_ and `epub`_ format.
If you want to be in touch with LIMA community, please send email to lima@esrf.fr. You can also subscribe to the mailing-list by sending
a message to sympa@esrf.fr with as subject *subscribe lima*.
If you want to be in touch with the LIMA community, please send an email to lima@esrf.fr. You may also want to subscribe to our mailing list by sending a message to sympa@esrf.fr with `subscribe lima` as subject.
There is no binary package for lima yet but Lima is a very active project and many developments are ongoing and available from `Github <github.com/esrf-bliss/Lima>`_.
There is no binary package for lima yet but Lima is a very active project and many developments are ongoing and available from `GitHub <https://github.com/esrf-bliss/Lima>`_. However you can find stable version releases through git branches and tags on `Github releases <https://github.com/esrf-bliss/Lima/releases>`_.
However you can find stable versions track through git branches and tags on github.com.
The latest stable branch is **core-1.7** and the latest release tag is **core-1.7.2**.
Please, feel free to fork/clone or download Lima at http://github.com/esrf-bliss/Lima .
For latest changes, refers to the :download:`Release Notes <./ReleaseNotes.txt>` (Also available under the Git repository master branch as ReleaseNotes.txt text file).
For the latest changes, refers to the :download:`Release Notes <../ReleaseNotes.txt>` (Also available under the Git repository master branch as ReleaseNotes.txt text file).
.. _compilation:
......@@ -75,7 +68,8 @@ You may also want to check out the `doxygen documentation`_ extracted from the s
.. _`doxygen documentation`: doxygen/html/index.html
.. _pdf: ../latex/Lima.pdf
.. _pdf: http://readthedocs.org/projects/lima-doc/downloads/pdf/latest/
.. _epub: http://readthedocs.org/projects/lima-doc/downloads/epub/latest/
.. _release notes: ./ReleaseNotes.txt
.. _Python: http://python.org
......
.. _linux:
Linux
=====
Prerequisite
````````````
Before installing Lima on Linux platform, you need to install the following packages :
- Python 2.6 or more recent
- GCC
- Git
- Gnu Scientific Library, libgsl is available within most of the linux flavour
- sip tool (version >=4.2), used for generating the python binding
GetIt
`````
As Lima is not packaged,the only way for now is to retreive it from the git repository.
**Command to get all sources:**
.. code-block:: bash
seb@pcbliss01:~/$ git clone --recursive git://github.com/esrf-bliss/Lima.git
**Commands for a minimum checkout to get all source needed for a particular camera:**
.. code-block:: bash
seb@pcbliss01:~/$ git clone git://github.com/esrf-bliss/Lima.git
seb@pcbliss01:~/$ cd Lima
seb@pcbliss01:~/Lima$ git submodule init third-party/Processlib third-party/Sps third-party/libconfig
seb@pcbliss01:~/Lima$ git submodule init camera/CAMERA_YOU_WANT_TO_COMPILE
seb@pcbliss01:~/Lima$ git submodule update
In addition (but optional) you can get the **TANGO** python and/or C++ device servers, so update your git clone again:
.. code-block:: bash
seb@pcbliss01:~/Lima$ git submodule init application/tango/python
seb@pcbliss01:~/Lima$ git submodule update
OR
seb@pcbliss01:~/Lima$ git submodule init application/tango/cpp
seb@pcbliss01:~/Lima$ git submodule update
Particular version
``````````````````
Stable versions of lima are tracked via Git branches and Git tags. So you can retrieve any particular version using git tools.
Please refer to the release notes document `release notes`_ , for more information of the latest release and tags.
For instance if you want to get version 1.6.1 of Lima core, do:
.. code-block:: bash
seb@pcbliss01:~/Lima$ git checkout core-1.6.1
seb@pcbliss01:~/Lima$ git submodule init
seb@pcbliss01:~/Lima$ git submodule update
.. _git: http://git-scm.com/
.. _linux_compilation:
Compilation
```````````
Everything is managed by the root Makefile.
* So first generate the config.inc file.
.. code-block:: sh
make
* Edit the configuration file **config.inc**
.. code-block:: sh
COMPILE_CORE=1
COMPILE_SIMULATOR=1
COMPILE_SPS_IMAGE=1
COMPILE_ESPIA=0
COMPILE_FRELON=0
COMPILE_MAXIPIX=0
COMPILE_PILATUS=0
COMPILE_CBF_SAVING=0
COMPILE_CONFIG=1
export COMPILE_CORE COMPILE_SPS_IMAGE COMPILE_SIMULATOR \
COMPILE_ESPIA COMPILE_FRELON COMPILE_MAXIPIX COMPILE_PILATUS \
COMPILE_CBF_SAVING
* Configure all python modules (don't need if you just want C++ libraries)
.. code-block:: sh
make config
* Finally compile all C++ libraries
.. code-block:: sh
make
* If you need Python modules
.. code-block:: sh
make -C sip -j3
**That's all folks ;)**
.. _linux_installation:
Installation
````````````
Installation on Linux is pretty easy because it's managed by Makefile's.
But those Makefile's can only be used if you have compiled everything including Python modules. Otherwise It'll fail. See :ref:`linux_compilation`
.. code-block:: sh
make install
you can specify the destination path with this variable **INSTALL_DIR**
With your new installation you may need to update your environment for both python and library paths:
.. code-block:: sh
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<my-new-install-dir>/Lima/lib
export PYTHONPATH=$PYTHONPATH:<my-new-install-dir>
**WARNING**: *"make install"* only installed C++ libs and python modules, the application like the python Tango server (LimaCCDs) code remains under applications/tango. Please go to :ref:`tango_installation` for further instructions.
.. _release notes: ../../../ReleaseNotes.txt
......@@ -6,19 +6,20 @@ PyTango Device Server
Server setup
````````````
As PyTango_ (Tango_ for python) server is provided as python script, you just have to copy the application/tango/python directory where you want.
As PyTango_ (Tango_ for python) server is provided as Python script, you just have to copy the application/tango/python directory wherever you want.
- **camera directory:** contained all camera Tango device specifics so remove all none need script
- **doc directory:** contained plugins camera documentation (exhaustive list of properties, commands and attributes)
- **plugins directory:** contained all plugins device server like:
- ``camera`` directory: contained all camera Tango device specifics so remove all none need script
- ``doc`` directory: contained plugins camera documentation (exhaustive list of properties, commands and attributes)
- ``plugins`` directory: contained all plugins device server like:
- Roi counters
- Mask...
- **scripts directory:** contained a script use at ESRF to start Lima device server (can also be removed)
- **LimaCCDs.py file:** python script to start Lima device server
- **LimaViewer.py file:** python script to start LimaViewer device server to get image from Lima device server
- ``scripts`` directory: contained a script use at ESRF to start Lima device server (can also be removed)
- ``LimaCCDs.py`` file: python script to start Lima device server
- ``LimaViewer.py`` file: python script to start LimaViewer device server to get image from Lima device server
**Warning**: be sure your environment is properly set for python and library paths, see :ref:`linux_installation` for more information.
:: warning: Make sure your environment is properly set for python and library paths, see :ref:`build_installation` for more information.
Example of plugin server setup : Basler detector
......@@ -28,100 +29,102 @@ This procedure described the way to implement basler camera plugin. It is the sa
You need to create a device server for Lima and another for the camera plugin. Lima device will use basler device thanks to "LimaCameraType" property. This property corresponds to the name of the camera plugin.
- **Lima device server:**
- Run Jive and select "Tools->Server Wizard" menu. You must enter server and instance names
.. image:: installation/LimaDeviceServer_1.png
Click Next...
- Start the Lima device server. Open a terminal and execute the command "server_name instance_name"
.. image:: installation/LimaDeviceServer_2.png
Click Next on the "Tango Device Installation Wizard" window
- Declare a Lima device
The Lima device server, contained several classes. For Basler camera you need to configure LimaCCDs and Basler classes.
.. image:: installation/LimaDeviceServer_3.png
Select "LimaCCDs" class and click "Declare device" button. You must enter the device name with a string as "Domain/Family/member".
.. image:: installation/LimaDeviceServer_4.png
Click Next and configure all the properties. You can let the default property values except for "LimaCameraType". This property must contain the name of the Camera Plugin "Basler".
.. image:: installation/LimaDeviceServer_5.png
At the end of the configuration, click "New Class" button.
.. image:: installation/LimaDeviceServer_6.png
Select "Basler" class and click "Declare device" button. You must enter the device name with a string as "Domain/Family/member".
.. image:: installation/LimaDeviceServer_7.png
Click Next and configure all the properties. You can let the default property values except for "cam_ip_adress". This property must contain the IP adress of the Basler camera.
.. image:: installation/LimaDeviceServer_8.png
Configuration is now ended, click "Finish"
.. image:: installation/LimaDeviceServer_9.png
- **Lima Viewer:**
To test the Lima device server, you can use the LimaViewer. This is a device server which periodically get the last image from the buffer. It allows the user to check that Lima device server is operational. The procedure below describe how to install and configure the LimaViewer device server.
- Run Jive and select "Tools->Server Wizard" menu. You must enter server and instance names
.. image:: installation/LimaViewerDeviceServer_1.png
Click Next...
- Start the LimaViewer device server. Open a terminal and execute the command "server_name instance_name"
.. image:: installation/LimaViewerDeviceServer_2.png
Click Next on the "Tango Device Installation Wizard" window
- Declare a LimaViewer device
Select "LimaViewer" class and click "Declare device" button.
.. image:: installation/LimaViewerDeviceServer_3.png
Enter the device name with a string as "Domain/Family/Member".
.. image:: installation/LimaViewerDeviceServer_4.png
Click Next and configure the "Dev_Ccd_name" property. This property corresponds to the name of the Lima device created before.
.. image:: installation/LimaViewerDeviceServer_5.png
Configuration is now finished, click on "Finish"
.. image:: installation/LimaViewerDeviceServer_6.png
- **Test LimaCCDs device server with Jive:**
The LimaViewer device appears in the Device tab from Jive. Make a right click on the LimaViewer device server and select "Monitor Device"
.. image:: installation/LimaViewerDeviceServer_7.png
AtkPanel is now launched. You can configure exposure time and the number of frames to acquire.
.. image:: installation/LimaViewerDeviceServer_8.png
The camera image can be viewed by selecting the "image_ccd" tab
.. image:: installation/LimaViewerDeviceServer_9.png
Lima device server
^^^^^^^^^^^^^^^^^^
1. Run Jive and select "Tools->Server Wizard" menu. You must enter server and instance names
.. image:: installation/LimaDeviceServer_1.png
Click Next...
2. Start the Lima device server. Open a terminal and execute the command "server_name instance_name"