README.rst 6.13 KB
Newer Older
1 2
.. image:: http://lima.blissgarden.org/_static/lima-logo-2-40perc.png

3
=============================
4
Library for Image Acquisition
5
=============================
6

7 8
|Linux Status|
|Windows Status|
9

10 11 12 13 14 15 16 17 18
Description
-----------

Lima ( **L** ibrary for **Im** age **A** cquisition) is a project for the unified control of 2D detectors. The aim is to clearly separate hardware specific code from common software configuration and features, like setting standard acquisition parameters (exposure time, external trigger), file saving and image processing.

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.

Documentation:  http://lima.blissgarden.org

19 20 21
.. _requirements:


22 23 24
Requirements
------------

25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
You need to install some tools and libraries for building Lima for both windows and Linux.

Build dependencies:

- gcc for Linux
- Visual Studio 2008 for x86 or x64 for Python 2.7.x 
- Visual Studio 2008 Express for x86 only for Python 2.7.x 
- Visual Studio 2015 for x86 and x64 for Python >= 3.5 
- git_
- cmake_ >= 3
- gsl_: For windows, download the esrf binary package `gsl-windows`_ and install it under "c:\\program files\\" 
     

**Python** dependencies:

Lima_ can be compiled for python 2 and 3. The following packages must be installed, development versions with header files (include files) are mandatory.

- numpy_ >= 1.1
- sip_   <= 4.18

The following requirements are optional.

Saving format dependencies:

- tiff_
- zlib_: for windows, you can download the esrf binary package `zlib-windows`_ and install it under "c:\\program files\\"
- cbf_
- hdf5_
- ccfits_
- lz4_ = 1.7.x
- libconfig_: for windows you can download the ESRF binary package `libconfig-windows`_ and install it under "c:\\program files\\"

PyTango_ server dependencies:

The LimaCCDs PyTango server only works for Python 2, it will be updated for Python 3 soon !!

- PyTango_
- libtango_

.. _git: https://git-scm.com
.. _Python: http://python.org
.. _Lima: http://lima.blissgarden.org
.. _gsl: https://www.gnu.org/software/gsl
.. _gsl-windows:  http://ftp.esrf.fr/pub/bliss/lima/gsl-windows.zip
.. _zlib-windows:  http://ftp.esrf.fr/pub/bliss/lima/zlib-windows.zip
.. _libconfig-windows:  http://ftp.esrf.fr/pub/bliss/lima/libconfig-windows.zip
.. _cmake: https://cmake.org

.. _Tango: http://tango-control.org
.. _PyTango: http://github.com/tango-cs/pytango
.. _libtango: http://tango-controls.org/downloads/source

.. _numpy: http://pypi.python.org/pypi/numpy
.. _sip: https://www.riverbankcomputing.com/software/sip

.. _tiff: http://www.libtiff.org/
.. _zlib: https://zlib.net/
.. _cbf: http://www.bernstein-plus-sons.com/software/CBF
.. _hdf5: https://support.hdfgroup.org/HDF5
.. _ccfits: https://heasarc.gsfc.nasa.gov/fitsio/ccfits
.. _lz4: https://lz4.github.io/lz4
.. _libconfig: http://www.hyperrealm.com/libconfig


.. _build_installation:

Build and Install
-----------------

Using scripts
^^^^^^^^^^^^^
the **install** scripts will run cmake, compile and install. 

It accepts input arguments (see below) but it also uses a configuration file  **scripts/config.txt**. Feel free to update this file for setting a permanent configuration for your own installation.

Linux::

     [sudo] install.sh
     [--git]
     [--prefix=<desired installation path>]
     [--python-packages=<desired python installation path>]
     [options]

Windows::

  install.bat
  [--prefix=<desired installation path>]
  [--python-packages=<desired python installation path>]
  [options]
114

115
The **--git** (Linux only) option cab be used to clone the required submodules as a prerequisite. Otherwise you should install the submodules with git commands, for instance::
116

117 118 119 120
 $ git submodule init third-party/Processlib
 $ git submodule init camera/basler
 $ git submodule init applications/tango/python
 $ git submodule update
121

122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194

Options are <camera-name> <saving-format> python pytango-server:

- camera-name::

  andor|andor3|basler|prosilica|adsc|mythen3|ueye|xh|xspress3|ultra|
  xpad|mythen|pco|marccd|pointgrey|imxpad|dexela|merlin|v4l2|
  eiger|pixirad|hexitec|aviex|roperscientific|rayonixhs|espia|maxipix|frelon

- saving-format::

  cbf|nxs|fits|edfgz|edflz4|tiff|hdf5

- python: to compile python module

- pytango-server: to install the PyTango_ server

Example::

 $ sudo install.sh --git 
                 --prefix=./install 
                 --python-packages=./install/python
                 tiff basler python pytango-server

Using cmake
^^^^^^^^^^^

Install first the project submodules::

 $ git submodule init third-party/Processlib
 $ git submodule init camera/basler
 $ git submodule init applications/tango/python
 $ git submodule update

Run cmake in the build directory::

 $ mkdir build
 $ cd build
 $ cmake ..
     [-G "Visual Studio 9 2008 Win64" | -G "Visual Studio 9 2008" | -G "Unix Makefiles"] 
     [-DCMAKE_INSTALL_PREFIX=<desired installation path>]
     [-DPYTHON_SITE_PACKAGES_DIR=<desired python installation path>]     
     -DLIMA_ENABLE_TIFF=true
     -DLIMACAMERA_BASLER=true
     -DLIMA_ENABLE_PYTANGO_SERVER=true
     -DLIMA_ENABLE_PYTHON=true

Then compile and install::

 $ cmake --build
 $ sudo cmake --build --target install


May you need to update your environment?
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

If you have changed the default destination path for both libraries and python modules you should update
your environment variables.

For Linux:

.. code-block:: sh

  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:<my-new-install-dir>/Lima/lib
  
  export PYTHONPATH=$PYTHONPATH:<my-new-install-dir>

For Windows:

Update the system wide variables PATH for the libraries and PYTHONPATH for python.


.. _PyTango: http://github.com/tango-cs/pytango
195 196 197 198


Lima Team contact: lima@esrf.fr

199
.. |Linux Status| image:: https://travis-ci.org/esrf-bliss/Lima.svg?branch=cmake
200 201
                  :target: https://travis-ci.org/esrf-bliss/Lima
                  :alt:
202 203
.. |Windows Status| image:: https://ci.appveyor.com/api/projects/status/rk0yqwem1jqxwubu?svg=true 
                  :target: https://ci.appveyor.com/api/projects/status/rk0yqwem1jqxwubu/branch/cmake?svg=true
204

205
		     
206 207
.. _Python: http://python.org
.. _PyTango: http://github.com/tango-cs/pytango
208