index.rst 3.3 KB
Newer Older
1 2
.. _camera-frelon:

Laurent Claustre's avatar
Laurent Claustre committed
3 4
Frelon camera
--------------
Laurent Claustre's avatar
Laurent Claustre committed
5 6 7 8 9

.. image:: FReLoN-2k.jpg

Introduction
````````````
10 11

The FReLoN camera is a 14 bit dynamic CCD camera, with a 2048*2048 pixel chip. This camera has been developped by the awesome people with the 'Analog and Transient Electronic' ESRF group.
Laurent Claustre's avatar
Laurent Claustre committed
12 13 14 15 16

Prerequisite
````````````

Installation & Module configuration
17
```````````````````````````````````
Laurent Claustre's avatar
Laurent Claustre committed
18

19
Follow the generic instructions in :ref:`build_installation`. If using CMake directly, add the following flag:
Laurent Claustre's avatar
Laurent Claustre committed
20 21 22

.. code-block:: sh

23 24 25
 -DLIMACAMERA_FRELON=true

For the Tango server installation, refers to :ref:`tango_installation`.
Laurent Claustre's avatar
Laurent Claustre committed
26 27

Initialisation and Capabilities
28 29 30
```````````````````````````````

Implementing a new plugin for new detector is driven by the LIMA framework but the developer has some freedoms to choose which standard and specific features will be made available. This section is supposed to give you the correct information regarding how the camera is exported within the LIMA framework.
Laurent Claustre's avatar
Laurent Claustre committed
31 32

Camera initialisation
33 34 35 36
.....................

The Frelon plugin provides a helper class :cpp:class:`FrelonAcq` which manages the initialisation sequence with
the camera and interface object. An Espia board channel number should be set as the initialisation
Laurent Claustre's avatar
Laurent Claustre committed
37 38
parameter (default is 0).

39 40
.. code-block:: c++

Laurent Claustre's avatar
Laurent Claustre committed
41 42 43 44
  frelon = Frelon.FrelonAcq(int(espia_dev_nb))
  return frelon.getGlobalControl()

Std capabilites
45
...............
Laurent Claustre's avatar
Laurent Claustre committed
46

47
This plugin has been implemented in respect of the mandatory capabilites but with limitations according
Laurent Claustre's avatar
Laurent Claustre committed
48 49 50 51 52
due to the detector specific features and with some programmer's  choices.  We do not explain here the standard Lima capabilites
but you can find in this section the useful information on the Dexela specfic features.

* HwDetInfo

53
 TODO
Laurent Claustre's avatar
Laurent Claustre committed
54 55 56

* HwSync

57
 TODO
Laurent Claustre's avatar
Laurent Claustre committed
58 59

Optional capabilites
60 61 62
....................

In addition to the standard capabilities, we make the choice to implement some optional capabilities in order to
Laurent Claustre's avatar
Laurent Claustre committed
63 64 65
have an improved simulation.

* HwShutter
Laurent Claustre's avatar
Laurent Claustre committed
66

67
 TODO
Laurent Claustre's avatar
Laurent Claustre committed
68 69

* HwRoi
Laurent Claustre's avatar
Laurent Claustre committed
70

71
 TODO
Laurent Claustre's avatar
Laurent Claustre committed
72

73
* HwBin
Laurent Claustre's avatar
Laurent Claustre committed
74

75
 TODO
Laurent Claustre's avatar
Laurent Claustre committed
76 77 78 79

Configuration
`````````````

80 81
The main configuration will consist in providing the correct ``DexelaConfig.cfg`` file to the detector API.
The file has to be provided by the manufacturer with a second file like ``sensor2923.fmt``. The ``.fmt`` file contains some calibration data.
Laurent Claustre's avatar
Laurent Claustre committed
82 83 84

How to use
````````````
85

Laurent Claustre's avatar
Laurent Claustre committed
86 87
The LimaCCDs tango server provides a complete interface to the dexela plugin so feel free to test.

88
For a quick test one can use python, this is a short example code:
Laurent Claustre's avatar
Laurent Claustre committed
89 90 91 92

.. code-block:: python

  from Lima import Frelon
Laurent Claustre's avatar
Laurent Claustre committed
93
  from lima import Core
Laurent Claustre's avatar
Laurent Claustre committed
94 95 96
  import time

  FrelonAcq  = Frelon.FrelonAcq(int(espia_dev_nb))
97
  control = FrelonAcq.getGlobalControl()
Laurent Claustre's avatar
Laurent Claustre committed
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114

  acq = control.acquisition()

  # setting new file parameters and autosaving mode
  saving=control.saving()

  pars=saving.getParameters()
  pars.directory='/tmp/'
  pars.prefix='testfrelon_'
  pars.suffix='.edf'
  pars.fileFormat=Core.CtSaving.EDF
  pars.savingMode=Core.CtSaving.AutoFrame
  saving.setParameters(pars)


  # now ask for 2 sec. exposure and 10 frames
  acq.setAcqExpoTime(2)
115 116
  acq.setNbImages(10)

Laurent Claustre's avatar
Laurent Claustre committed
117 118 119 120 121 122 123 124
  acq.prepareAcq()
  acq.startAcq()

  # wait for last image (#9) ready
  lastimg = control.getStatus().ImageCounters.LastImageReady
  while lastimg !=9:
    time.sleep(1)
    lastimg = control.getStatus().ImageCounters.LastImageReady
125

Laurent Claustre's avatar
Laurent Claustre committed
126
  # read the first image
Laurent Claustre's avatar
Laurent Claustre committed
127
  im0 = control.ReadImage(0)