Commit a574b6c6 authored by Laurent Claustre's avatar Laurent Claustre

Merge branch 'add-simulator-submodule' into 'master'

Add simulator submodule (was part of the main Lima repo before)

See merge request !96
parents 97a632b2 cba6491e
Pipeline #5992 passed with stages
in 21 minutes and 13 seconds
......@@ -127,3 +127,6 @@
[submodule "camera/zwo"]
path = camera/zwo
url = ../Lima-camera-zwo
[submodule "camera/simulator"]
path = camera/simulator
url = ../Lima-camera-simulator.git
Subproject commit 752e393336baec691a10686e4f1e2e2d2659fd0c
###########################################################################
# This file is part of LImA, a Library for Image Acquisition
#
# Copyright (C) : 2009-2017
# European Synchrotron Radiation Facility
# BP 220, Grenoble 38043
# FRANCE
#
# Contact: lima@esrf.fr
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This software is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, see <http://www.gnu.org/licenses/>.
############################################################################
set(NAME "simulator")
set(SIMU_SRCS
src/SimulatorFrameBuilder.cpp
src/SimulatorFrameLoader.cpp
src/SimulatorFramePrefetcher.cpp
src/SimulatorCamera.cpp
src/SimulatorInterface.cpp
src/SimulatorSyncCtrlObj.cpp
src/SimulatorDetInfoCtrlObj.cpp
src/SimulatorShutterCtrlObj.cpp
src/SimulatorBinCtrlObj.cpp
)
file(GLOB_RECURSE SIMU_INCS "${CMAKE_CURRENT_SOURCE_DIR}/include/*.h")
add_library(lima${NAME} SHARED ${SIMU_SRCS} ${SIMU_INCS})
limatools_set_library_soversion(lima${NAME} "VERSION")
target_include_directories(lima${NAME} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_link_libraries(lima${NAME} limacore)
if(WIN32)
target_compile_definitions(lima${NAME} PUBLIC NOMINMAX)
target_compile_definitions(lima${NAME} PRIVATE LIBSIMULATOR_EXPORTS)
endif()
limatools_set_install_libdir(lima${NAME})
find_package(OpenMP)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
if (LIMA_ENABLE_PYTHON)
limatools_run_sip_for_camera(${NAME})
add_custom_command(TARGET lima${NAME} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/python ${CMAKE_BINARY_DIR}/python/Lima/Simulator)
install(FILES python/__init__.py DESTINATION "${PYTHON_SITE_PACKAGES_DIR}/Lima/Simulator")
endif()
if(LIMA_ENABLE_TESTS)
add_subdirectory(test)
endif()
Debug
Release*
*.vcproj.*
*.ncb
*.suo

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibSimulator", "LibSimulator.vcproj", "{3E1490E7-66C0-4E77-9746-0632466FF270}"
ProjectSection(ProjectDependencies) = postProject
{F6556656-D091-43AF-B46F-355F4ABA5DB6} = {F6556656-D091-43AF-B46F-355F4ABA5DB6}
{A4B703A6-C50F-442F-8952-54FB8EA51FF3} = {A4B703A6-C50F-442F-8952-54FB8EA51FF3}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LibLimaCore", "..\..\..\..\..\..\build\msvc\9.0\LimaCore\LimaCore.vcproj", "{A4B703A6-C50F-442F-8952-54FB8EA51FF3}"
ProjectSection(ProjectDependencies) = postProject
{F6556656-D091-43AF-B46F-355F4ABA5DB6} = {F6556656-D091-43AF-B46F-355F4ABA5DB6}
{A0C36CE7-D908-4573-8B69-249EEEB7D2BE} = {A0C36CE7-D908-4573-8B69-249EEEB7D2BE}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libprocesslib", "..\..\..\..\..\..\third-party\Processlib\build\msvc\9.0\libprocesslib\libprocesslib.vcproj", "{F6556656-D091-43AF-B46F-355F4ABA5DB6}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libconfig++", "..\..\..\..\..\..\third-party\libconfig\lib\libconfig++.vcproj", "{A0C36CE7-D908-4573-8B69-249EEEB7D2BE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release_Win7_Sync|Win32 = Release_Win7_Sync|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3E1490E7-66C0-4E77-9746-0632466FF270}.Debug|Win32.ActiveCfg = Debug|Win32
{3E1490E7-66C0-4E77-9746-0632466FF270}.Debug|Win32.Build.0 = Debug|Win32
{3E1490E7-66C0-4E77-9746-0632466FF270}.Release_Win7_Sync|Win32.ActiveCfg = Release_Win7_Sync|Win32
{3E1490E7-66C0-4E77-9746-0632466FF270}.Release_Win7_Sync|Win32.Build.0 = Release_Win7_Sync|Win32
{3E1490E7-66C0-4E77-9746-0632466FF270}.Release|Win32.ActiveCfg = Release|Win32
{3E1490E7-66C0-4E77-9746-0632466FF270}.Release|Win32.Build.0 = Release|Win32
{A4B703A6-C50F-442F-8952-54FB8EA51FF3}.Debug|Win32.ActiveCfg = Debug|Win32
{A4B703A6-C50F-442F-8952-54FB8EA51FF3}.Debug|Win32.Build.0 = Debug|Win32
{A4B703A6-C50F-442F-8952-54FB8EA51FF3}.Release_Win7_Sync|Win32.ActiveCfg = Release_Win7_Sync|Win32
{A4B703A6-C50F-442F-8952-54FB8EA51FF3}.Release_Win7_Sync|Win32.Build.0 = Release_Win7_Sync|Win32
{A4B703A6-C50F-442F-8952-54FB8EA51FF3}.Release|Win32.ActiveCfg = Release|Win32
{A4B703A6-C50F-442F-8952-54FB8EA51FF3}.Release|Win32.Build.0 = Release|Win32
{F6556656-D091-43AF-B46F-355F4ABA5DB6}.Debug|Win32.ActiveCfg = Debug|Win32
{F6556656-D091-43AF-B46F-355F4ABA5DB6}.Debug|Win32.Build.0 = Debug|Win32
{F6556656-D091-43AF-B46F-355F4ABA5DB6}.Release_Win7_Sync|Win32.ActiveCfg = Release_Win7_Sync|Win32
{F6556656-D091-43AF-B46F-355F4ABA5DB6}.Release_Win7_Sync|Win32.Build.0 = Release_Win7_Sync|Win32
{F6556656-D091-43AF-B46F-355F4ABA5DB6}.Release|Win32.ActiveCfg = Release_Win7_Sync|Win32
{F6556656-D091-43AF-B46F-355F4ABA5DB6}.Release|Win32.Build.0 = Release_Win7_Sync|Win32
{A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Debug|Win32.ActiveCfg = Debug|Win32
{A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Debug|Win32.Build.0 = Debug|Win32
{A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Release_Win7_Sync|Win32.ActiveCfg = Release|Win32
{A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Release_Win7_Sync|Win32.Build.0 = Release|Win32
{A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Release|Win32.ActiveCfg = Release|Win32
{A0C36CE7-D908-4573-8B69-249EEEB7D2BE}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9,00"
Name="LibSimulator"
ProjectGUID="{3E1490E7-66C0-4E77-9746-0632466FF270}"
RootNamespace="LibSimulator"
Keyword="Win32Proj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="&quot;..\..\..\..\..\..\third-party\Processlib\core\include&quot;;&quot;..\..\..\..\..\..\third-party\Processlib\core\include\WindowSpecific&quot;;..\..\..\..\..\..\hardware\include;..\..\..\..\..\..\common\include;..\..\..\..\..\..\camera\simulator\include"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;LIBSIMULATOR_EXPORTS;_WIN32_WINNT=0x0502"
MinimalRebuild="true"
BasicRuntimeChecks="0"
RuntimeLibrary="3"
DefaultCharIsUnsigned="false"
TreatWChar_tAsBuiltInType="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\liblimasimulator.dll"
LinkIncremental="1"
AdditionalLibraryDirectories=""
GenerateDebugInformation="true"
SubSystem="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="&quot;..\..\..\..\..\..\third-party\Processlib\core\include&quot;;&quot;..\..\..\..\..\..\third-party\Processlib\core\include\WindowSpecific&quot;;..\..\..\..\..\..\hardware\include;..\..\..\..\..\..\common\include;..\..\..\..\..\..\camera\simulator\include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBSIMULATOR_EXPORTS;_WIN32_WINNT=0x0502"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="$(InputDir)..\..\..\..\..\..\build\msvc\9.0\LimaCore\Release\liblimacore.lib $(InputDir)..\..\..\..\..\..\third-party\Processlib\build\msvc\9.0\libprocesslib\Release\libprocesslib.lib"
OutputFile="$(InputDir)$(IntDir)\$(ProjectName).dll"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release_Win7_Sync|Win32"
OutputDirectory="$(SolutionDir)Release"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="&quot;..\..\..\..\..\..\third-party\Processlib\core\include&quot;;&quot;..\..\..\..\..\..\third-party\Processlib\core\include\WindowSpecific&quot;;..\..\..\..\..\..\hardware\include;..\..\..\..\..\..\common\include;..\..\..\..\..\..\camera\simulator\include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBSIMULATOR_EXPORTS;_WIN32_WINNT=0x0600"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\liblimasimulator.dll"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release_Win7_Sync|Win32"
OutputDirectory="$(SolutionDir)Release"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="2"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories="&quot;..\..\..\..\..\..\third-party\Processlib\core\include&quot;;&quot;..\..\..\..\..\..\third-party\Processlib\core\include\WindowSpecific&quot;;..\..\..\..\..\..\hardware\include;..\..\..\..\..\..\common\include;..\..\..\..\..\..\camera\simulator\include"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;LIBSIMULATOR_EXPORTS;_WIN32_WINNT=0x0600"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\liblimasimulator.dll"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="2"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath="..\..\..\..\src\SimulatorCamera.cpp"
>
</File>
<File
RelativePath="..\..\..\..\src\SimulatorDetInfoCtrlObj.cpp"
>
</File>
<File
RelativePath="..\..\..\..\src\SimulatorFrameBuilder.cpp"
>
</File>
<File
RelativePath="..\..\..\..\src\SimulatorInterface.cpp"
>
</File>
<File
RelativePath="..\..\..\..\src\SimulatorShutterCtrlObj.cpp"
>
</File>
<File
RelativePath="..\..\..\..\src\SimulatorSyncCtrlObj.cpp"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\..\..\include\SimulatorCamera.h"
>
</File>
<File
RelativePath="..\..\..\..\include\SimulatorCompatibility.h"
>
</File>
<File
RelativePath="..\..\..\..\include\SimulatorDetInfoCtrlObj.h"
>
</File>
<File
RelativePath="..\..\..\..\include\SimulatorFrameBuilder.h"
>
</File>
<File
RelativePath="..\..\..\..\include\SimulatorInterface.h"
>
</File>
<File
RelativePath="..\..\..\..\include\SimulatorSyncCtrlObj.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
<File
RelativePath=".\ReadMe.txt"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
========================================================================
DYNAMIC LINK LIBRARY : LibSimulator Project Overview
========================================================================
AppWizard has created this LibSimulator DLL for you.
This file contains a summary of what you will find in each of the files that
make up your LibSimulator application.
LibSimulator.vcproj
This is the main project file for VC++ projects generated using an Application Wizard.
It contains information about the version of Visual C++ that generated the file, and
information about the platforms, configurations, and project features selected with the
Application Wizard.
LibSimulator.cpp
This is the main DLL source file.
/////////////////////////////////////////////////////////////////////////////
Other standard files:
StdAfx.h, StdAfx.cpp
These files are used to build a precompiled header (PCH) file
named LibSimulator.pch and a precompiled types file named StdAfx.obj.
/////////////////////////////////////////////////////////////////////////////
Other notes:
AppWizard uses "TODO:" comments to indicate parts of the source code you
should add to or customize.
/////////////////////////////////////////////////////////////////////////////
.. _camera-simulator:
Simulator
----------
.. image:: Simulator.jpg
Introduction
````````````
This is the official Lima camera simulator. It has been made to help you getting started with Lima and to test/play Lima without any hardware.
The simulator provides two modes of operations:
- **Frame Builder** generates frames with diffraction patterns and a set of parameters can be tuned to change those patterns like for instance the number and position of gaussian peaks;
- **Frame Loader** loads frames from files.
Both modes have a preteched variant, where the frames are preteched in memory before the acquisition is started. This feature allows to simulate high frame rates detectors.
Prerequisite
````````````
There is no special prerequisite, the simulator can be compiled and tested on both Linux and Windows platforms.
Installation & Module configuration
````````````````````````````````````
Follow the generic instructions in :ref:`build_installation`. If using CMake directly, add the following flag:
.. code-block:: sh
-DLIMACAMERA_SIMULATOR=true
For the Tango server installation, refers to :ref:`tango_installation`.
Initialisation and Capabilities
```````````````````````````````
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.
Camera initialisation
.....................
.. cpp:namespace-push:: lima::Simulator
The camera will be initialized within the :cpp:class:`Camera` object. The :cpp:func:`Camera` constructor takes an optional mode parameter.
This simulator plugin architecture is based on the :cpp:class:`FrameGetter` interface that have multiple implementations.
.. image:: https://yuml.me/diagram/scruffy/class/Simulator%20Class%20Diagram,%20[FrameGetter%7CgetNextFrame()],%20[FrameGetter]%5E-[FrameBuilder],%20[FrameGetter]%5E-[FrameLoader]
The :cpp:class:`SimulatorCamera` class provides a specific member function :cpp:func:`SimulatorCamera::getFrameGetter()` that returns the :cpp:class:`FrameGetter` instance.
Depending on the current mode, :cpp:class:`FrameGetter` can be dynamically casted to either:
- :cpp:class:`FrameBuilder`
- :cpp:class:`FrameLoader`
- :cpp:class:`FramePrefetcher<FrameBuilder>`
- :cpp:class:`FramePrefetcher<FrameLoader>`
The class :cpp:class:`FrameBuilder` can be parametrized with:
- :cpp:func:`setFrameDim()`: set a new frame dimension (max. is 1024x1024)
- :cpp:func:`setPeaks()`: set a list of GaussPeak positions (GaussPeak struct -> x, y, fwhm, max)
- :cpp:func:`setPeakAngles()`: set a list of GaussPeak angles
- :cpp:func:`setFillType()`: set the image fill type Gauss or Diffraction (default is Gauss)
- :cpp:func:`setRotationAxis()`: set the rotation axis policy Static, RotationX or RotationY (default is RotationY)
- :cpp:func:`setRotationAngle()`: set a peak rotation angle in deg (default is 0)
- :cpp:func:`setRotationSpeed()`: set a peak rotation speed ixin deg/frame (default is 0)
- :cpp:func:`setGrowFactor()`: set a growing factor (default is 1.0)
- :cpp:func:`setDiffractionPos()`: set the source diplacement position x and y (default is center)
- :cpp:func:`setDiffractionSpeed()`: set the source diplacement speed sx and sy (default is 0,0)
The class :cpp:class:`FrameLoader` can be parametrized with:
- :cpp:func:`setFilePattern()`: set the file pattern used to load the frames than may include globing pattern, i.e. ``input/test_*.edf``
The :cpp:class:`template <typename FrameGetterImpl> FramePrefetcher` variants have an addition parameter:
- :cpp:func:`setNbPrefetchedFrames()`: set the number of frames to prefetch in memory
.. cpp:namespace-pop
Standard capabilities
.....................
This plugin has been implemented in respect of the standard capabilites of a camera plugin but with some limitations according to some programmer's choices. We only provide here extra information for a better understanding of the capabilities for the simulator camera.
- :cpp:class:`HwDetInfo`: The default (and max.) frame size if about 1024x1024-Bpp32, but one can only change the image type by calling :cpp:func:`DetInfoCtrlObj::setCurrImageType()`.
- :cpp:class:`HwSync`: Only IntTrig trigger mode is supported. For both exposure time and latency time min. is 10e-9 and max. is 10e6.
Optional capabilities
.....................
In addition to the standard capabilities, some optional capabilities are implemented:
* :cpp:class:`HwShutter`: The simulator only support ShutterAutoFrame and ShutterManual modes.
* :cpp:class:`HwRoi`: There is no restriction for the ROI.
* :cpp:class:`HwBin`: Bin 1x1 or 2x2 only.
Configuration
`````````````
No hardware configuration of course!
How to use
````````````
The LimaCCDs tango server provides a complete interface to the simulator plugin so feel free to test.
For a quick test one can use the python binding, here is a short code example:
.. code-block:: python
from Lima import Simulator
from Lima import Core
import time
def test_mode_generator(cam, nb_frames_prefetched = 0):
if nb_frames_prefetched:
cam.setMode(Simulator.Camera.MODE_GENERATOR_PREFETCH)
fb = cam.getFrameGetter()
fb.setNbPrefetchedFrames(nb_frames_prefetched);
else:
cam.setMode(Simulator.Camera.MODE_GENERATOR)
fb = cam.getFrameGetter()
# Add a peak
p1 = Simulator.GaussPeak(10, 10, 23, 1000) # peak at 10,10 fwhm=23 and max=1000
fb.setPeaks([p1])
def test_mode_loader(cam, nb_frames_prefetched = 0):