mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-19 16:27:13 +02:00
Compare commits
133 Commits
ctbgatedcl
...
7.0.0.rc3
Author | SHA1 | Date | |
---|---|---|---|
e6505650cb | |||
ba6fdb9695 | |||
8361f2bb96 | |||
4ee4d66977 | |||
e14f6981a0 | |||
8158ef876c | |||
ebb6f53b21 | |||
e172df79f3 | |||
55bf73f3b7 | |||
c62ce0ce6b | |||
3a3628c475 | |||
9ba907f9f7 | |||
3f7c9529dd | |||
c7af9c9f3e | |||
0b17318f10 | |||
1f907b911e | |||
c5b621b684 | |||
946e6aa817 | |||
3682644e15 | |||
a6aaa2c3c6 | |||
ac64afe747 | |||
d19f6a3d0d | |||
d77b353481 | |||
7466c0bc8f | |||
713639d001 | |||
3cc4d25eb9 | |||
0d905923dd | |||
e747a5811f | |||
22b3229d94 | |||
d106109f6c | |||
b02bda053b | |||
75c40ad069 | |||
eaf05cfc44 | |||
f1e0bda08d | |||
3fb22dc20a | |||
ff5aa13073 | |||
4ec70d7995 | |||
fb6d8fd5d8 | |||
018660f392 | |||
8ef032aecd | |||
f529428773 | |||
006eff9213 | |||
e865d8febf | |||
ae6c7f5841 | |||
602c02f2f7 | |||
f3f83de690 | |||
9154478702 | |||
4ff0ef47eb | |||
7dc3ed77c7 | |||
e1e8ffe7b5 | |||
aa3542c1cb | |||
ce6c8cddf1 | |||
91c3926eca | |||
cda59c4beb | |||
77ca2c8a63 | |||
96e107221b | |||
b8b9921914 | |||
76d9890eea | |||
8f68e395bd | |||
4614e0873a | |||
bb01f90e1f | |||
f8a612c0e2 | |||
1cc7d512e0 | |||
dae07dabf3 | |||
c5e0b9def8 | |||
964bdf5fc3 | |||
34a43bcb67 | |||
ad21d76af2 | |||
d4be1af378 | |||
51de419c2d | |||
cac2c0b01d | |||
e71f68d31b | |||
4ada8c79ed | |||
843edfbf06 | |||
a42ef3b591 | |||
44d9294270 | |||
c472a8f547 | |||
aaab1e306c | |||
81cc6b0836 | |||
34acf553a1 | |||
a2f41c13b7 | |||
255a75a646 | |||
61c31ed44a | |||
928d778fb1 | |||
2ff5291f48 | |||
cd270160d8 | |||
911b2f678f | |||
8dbcfc2ca8 | |||
2d6cb52dfa | |||
57e7b51704 | |||
f6241f7a5e | |||
2dcf4a7144 | |||
33e2155db1 | |||
39a87ffcd9 | |||
5ea2cdb83d | |||
4bb1a612f1 | |||
f108ec82ea | |||
74a2f07c7d | |||
a921368dea | |||
b432c70076 | |||
06fc48b115 | |||
bf3333b97b | |||
38cd10d4e6 | |||
05f657c106 | |||
b150db0fb3 | |||
f0c0f07701 | |||
4a95ee8362 | |||
16e9b272c7 | |||
615d66d493 | |||
9f906a779e | |||
3560f81d8e | |||
4230517e69 | |||
4f21ad5122 | |||
2696b95014 | |||
bb0201385f | |||
22b16de6b5 | |||
9232776577 | |||
5096119ac3 | |||
876977392b | |||
9efb19a9b5 | |||
65ad0bae51 | |||
71c50e5f66 | |||
3fa3e05bfd | |||
f9f485c99e | |||
b7cdfbb4d2 | |||
af300e0276 | |||
a84fcd2c82 | |||
6fc43fa06a | |||
e7879ee365 | |||
46bb9bc2d7 | |||
4a7cd051c1 | |||
d2c4827b31 | |||
d9e34e1657 |
@ -2,7 +2,7 @@
|
|||||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
cmake_minimum_required(VERSION 3.12)
|
cmake_minimum_required(VERSION 3.12)
|
||||||
project(slsDetectorPackage)
|
project(slsDetectorPackage)
|
||||||
set(PROJECT_VERSION 6.1.1)
|
set(PROJECT_VERSION 7.0.0)
|
||||||
|
|
||||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
|
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG")
|
||||||
|
|
||||||
@ -83,6 +83,8 @@ endif()
|
|||||||
#Maybe have an option guarding this?
|
#Maybe have an option guarding this?
|
||||||
set(SLS_INTERNAL_RAPIDJSON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libs/rapidjson)
|
set(SLS_INTERNAL_RAPIDJSON_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libs/rapidjson)
|
||||||
|
|
||||||
|
set(SLS_INTERNAL_QWT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libs/qwt-6.1.5)
|
||||||
|
|
||||||
set(ClangFormat_EXCLUDE_PATTERNS "build/"
|
set(ClangFormat_EXCLUDE_PATTERNS "build/"
|
||||||
"libs/"
|
"libs/"
|
||||||
"slsDetectorCalibration/"
|
"slsDetectorCalibration/"
|
||||||
@ -223,6 +225,7 @@ if (SLS_USE_RECEIVER)
|
|||||||
endif (SLS_USE_RECEIVER)
|
endif (SLS_USE_RECEIVER)
|
||||||
|
|
||||||
if (SLS_USE_GUI)
|
if (SLS_USE_GUI)
|
||||||
|
add_subdirectory(libs/qwt)
|
||||||
add_subdirectory(slsDetectorGui)
|
add_subdirectory(slsDetectorGui)
|
||||||
endif (SLS_USE_GUI)
|
endif (SLS_USE_GUI)
|
||||||
|
|
||||||
|
994
RELEASE.txt
Executable file → Normal file
994
RELEASE.txt
Executable file → Normal file
File diff suppressed because it is too large
Load Diff
@ -1,118 +0,0 @@
|
|||||||
# Qt Widgets for Technical Applications
|
|
||||||
# available at http://www.http://qwt.sourceforge.net/
|
|
||||||
#
|
|
||||||
# The module defines the following variables:
|
|
||||||
# QWT_FOUND - the system has Qwt
|
|
||||||
# QWT_INCLUDE_DIR - where to find qwt_plot.h
|
|
||||||
# QWT_INCLUDE_DIRS - qwt includes
|
|
||||||
# QWT_LIBRARY - where to find the Qwt library
|
|
||||||
# QWT_LIBRARIES - aditional libraries
|
|
||||||
# QWT_MAJOR_VERSION - major version
|
|
||||||
# QWT_MINOR_VERSION - minor version
|
|
||||||
# QWT_PATCH_VERSION - patch version
|
|
||||||
# QWT_VERSION_STRING - version (ex. 5.2.1)
|
|
||||||
# QWT_ROOT_DIR - root dir (ex. /usr/local)
|
|
||||||
|
|
||||||
#=============================================================================
|
|
||||||
# Copyright 2010-2013, Julien Schueller
|
|
||||||
# All rights reserved.
|
|
||||||
#
|
|
||||||
# Redistribution and use in source and binary forms, with or without
|
|
||||||
# modification, are permitted provided that the following conditions are met:
|
|
||||||
#
|
|
||||||
# 1. Redistributions of source code must retain the above copyright notice, this
|
|
||||||
# list of conditions and the following disclaimer.
|
|
||||||
# 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
# this list of conditions and the following disclaimer in the documentation
|
|
||||||
# and/or other materials provided with the distribution.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
||||||
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
||||||
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
||||||
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
|
||||||
# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
||||||
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
||||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
||||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
||||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
||||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
# The views and conclusions contained in the software and documentation are those
|
|
||||||
# of the authors and should not be interpreted as representing official policies,
|
|
||||||
# either expressed or implied, of the FreeBSD Project.
|
|
||||||
#=============================================================================
|
|
||||||
|
|
||||||
|
|
||||||
find_path ( QWT_INCLUDE_DIR
|
|
||||||
NAMES qwt_plot.h
|
|
||||||
HINTS $ENV{QWTDIR} $ENV{QWTDIR}/src ${QT_INCLUDE_DIR}
|
|
||||||
PATH_SUFFIXES qwt qwt-qt3 qwt-qt4 qwt-qt5
|
|
||||||
)
|
|
||||||
|
|
||||||
set ( QWT_INCLUDE_DIRS ${QWT_INCLUDE_DIR} )
|
|
||||||
|
|
||||||
# version
|
|
||||||
set ( _VERSION_FILE ${QWT_INCLUDE_DIR}/qwt_global.h )
|
|
||||||
if ( EXISTS ${_VERSION_FILE} )
|
|
||||||
file ( STRINGS ${_VERSION_FILE} _VERSION_LINE REGEX "define[ ]+QWT_VERSION_STR" )
|
|
||||||
if ( _VERSION_LINE )
|
|
||||||
string ( REGEX REPLACE ".*define[ ]+QWT_VERSION_STR[ ]+\"(.*)\".*" "\\1" QWT_VERSION_STRING "${_VERSION_LINE}" )
|
|
||||||
string ( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\1" QWT_MAJOR_VERSION "${QWT_VERSION_STRING}" )
|
|
||||||
string ( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\2" QWT_MINOR_VERSION "${QWT_VERSION_STRING}" )
|
|
||||||
string ( REGEX REPLACE "([0-9]+)\\.([0-9]+)\\.([0-9]+)" "\\3" QWT_PATCH_VERSION "${QWT_VERSION_STRING}" )
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
|
|
||||||
# check version
|
|
||||||
set ( _QWT_VERSION_MATCH TRUE )
|
|
||||||
if ( Qwt_FIND_VERSION AND QWT_VERSION_STRING )
|
|
||||||
if ( Qwt_FIND_VERSION_EXACT )
|
|
||||||
if ( NOT Qwt_FIND_VERSION VERSION_EQUAL QWT_VERSION_STRING )
|
|
||||||
set ( _QWT_VERSION_MATCH FALSE )
|
|
||||||
endif ()
|
|
||||||
else ()
|
|
||||||
if ( QWT_VERSION_STRING VERSION_LESS Qwt_FIND_VERSION )
|
|
||||||
set ( _QWT_VERSION_MATCH FALSE )
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
|
|
||||||
find_library ( QWT_LIBRARY
|
|
||||||
NAMES qwt qwt-qt3 qwt-qt4 qwt-qt5
|
|
||||||
HINTS $ENV{QWTDIR}/lib ${QT_LIBRARY_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
set ( QWT_LIBRARIES ${QWT_LIBRARY} )
|
|
||||||
|
|
||||||
|
|
||||||
# try to guess root dir from include dir
|
|
||||||
if ( QWT_INCLUDE_DIR )
|
|
||||||
string ( REGEX REPLACE "(.*)/include.*" "\\1" QWT_ROOT_DIR ${QWT_INCLUDE_DIR} )
|
|
||||||
# try to guess root dir from library dir
|
|
||||||
elseif ( QWT_LIBRARY )
|
|
||||||
string ( REGEX REPLACE "(.*)/lib[/|32|64].*" "\\1" QWT_ROOT_DIR ${QWT_LIBRARY} )
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
|
|
||||||
# handle the QUIETLY and REQUIRED arguments
|
|
||||||
include ( FindPackageHandleStandardArgs )
|
|
||||||
if ( CMAKE_VERSION LESS 2.8.3 )
|
|
||||||
find_package_handle_standard_args( Qwt DEFAULT_MSG QWT_LIBRARY QWT_INCLUDE_DIR _QWT_VERSION_MATCH )
|
|
||||||
else ()
|
|
||||||
find_package_handle_standard_args( Qwt REQUIRED_VARS QWT_LIBRARY QWT_INCLUDE_DIR _QWT_VERSION_MATCH VERSION_VAR QWT_VERSION_STRING )
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
|
|
||||||
mark_as_advanced (
|
|
||||||
QWT_LIBRARY
|
|
||||||
QWT_LIBRARIES
|
|
||||||
QWT_INCLUDE_DIR
|
|
||||||
QWT_INCLUDE_DIRS
|
|
||||||
QWT_MAJOR_VERSION
|
|
||||||
QWT_MINOR_VERSION
|
|
||||||
QWT_PATCH_VERSION
|
|
||||||
QWT_VERSION_STRING
|
|
||||||
QWT_ROOT_DIR
|
|
||||||
)
|
|
@ -21,4 +21,4 @@ echo "Building using: ${NCORES} cores"
|
|||||||
cmake --build . -- -j${NCORES}
|
cmake --build . -- -j${NCORES}
|
||||||
cmake --build . --target install
|
cmake --build . --target install
|
||||||
|
|
||||||
CTEST_OUTPUT_ON_FAILURE=1 ctest -j 2
|
CTEST_OUTPUT_ON_FAILURE=1 ctest -j 1
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
python:
|
python:
|
||||||
- 3.6
|
|
||||||
- 3.7
|
|
||||||
- 3.8
|
- 3.8
|
||||||
- 3.9
|
- 3.9
|
||||||
- 3.10
|
- 3.10
|
||||||
|
- 3.11
|
||||||
|
|
||||||
numpy:
|
numpy:
|
||||||
- 1.17
|
- 1.17
|
||||||
|
@ -17,8 +17,7 @@ requirements:
|
|||||||
- {{ compiler('c') }}
|
- {{ compiler('c') }}
|
||||||
- {{compiler('cxx')}}
|
- {{compiler('cxx')}}
|
||||||
- cmake
|
- cmake
|
||||||
- qwt 6.*
|
- qt 5.*
|
||||||
- qt 4.8.*
|
|
||||||
- zeromq
|
- zeromq
|
||||||
- xorg-libx11
|
- xorg-libx11
|
||||||
- xorg-libice
|
- xorg-libice
|
||||||
@ -111,12 +110,10 @@ outputs:
|
|||||||
- {{ compiler('c') }}
|
- {{ compiler('c') }}
|
||||||
- {{compiler('cxx')}}
|
- {{compiler('cxx')}}
|
||||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||||
- qwt 6.*
|
|
||||||
|
|
||||||
run:
|
run:
|
||||||
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
- {{ pin_subpackage('slsdetlib', exact=True) }}
|
||||||
- qwt 6.*
|
- qt 5.*
|
||||||
- qt 4.8.*
|
|
||||||
- expat
|
- expat
|
||||||
|
|
||||||
- name: moenchzmq
|
- name: moenchzmq
|
||||||
|
@ -988,7 +988,7 @@ sample1 (dbit0 + dbit1 +...)if (cmd == "rx_dbitlist") {
|
|||||||
ped=0;
|
ped=0;
|
||||||
aval=dataStructure->getValue(data->data,x,y);
|
aval=dataStructure->getValue(data->data,x,y);
|
||||||
//aval=dataStructure->getChannel(data->data,x,y);
|
//aval=dataStructure->getChannel(data->data,x,y);
|
||||||
cout << x << " " <<y << " "<< aval << endl;
|
// cout << x << " " <<y << " "<< aval << endl;
|
||||||
if (cbGetPedestal->IsOn()) {
|
if (cbGetPedestal->IsOn()) {
|
||||||
if (photonFinder) {
|
if (photonFinder) {
|
||||||
photonFinder->addToPedestal(aval,x,y);
|
photonFinder->addToPedestal(aval,x,y);
|
||||||
|
@ -1,112 +0,0 @@
|
|||||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
|
||||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/utsname.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <math.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
|
||||||
|
|
||||||
int iarg;
|
|
||||||
char fname[10000];
|
|
||||||
uint64_t word;
|
|
||||||
int val[64];
|
|
||||||
int bit[64];
|
|
||||||
FILE *fdin;
|
|
||||||
|
|
||||||
int nb=2;
|
|
||||||
int off=0;
|
|
||||||
int ioff=0;
|
|
||||||
int dr=24;
|
|
||||||
int idr=0;
|
|
||||||
int ib=0;
|
|
||||||
int iw=0;
|
|
||||||
bit[0]=19;
|
|
||||||
bit[1]=8;
|
|
||||||
// for (iarg=0; iarg<argc; iarg++) printf("%d %s\n",iarg, argv[iarg]);
|
|
||||||
|
|
||||||
if (argc<2) printf("Error: usage is %s fname [dr off b0 b1 bn]\n");
|
|
||||||
|
|
||||||
if (argc>2) dr=atoi(argv[2]);
|
|
||||||
if (argc>3) off=atoi(argv[3]);
|
|
||||||
if (argc>4) {
|
|
||||||
for (ib=0; ib<64; ib++) {
|
|
||||||
if (argc>4+ib) {
|
|
||||||
bit[ib]=atoi(argv[4+ib]);
|
|
||||||
nb++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
idr=0;
|
|
||||||
for (ib=0; ib<nb; ib++) {
|
|
||||||
val[ib]=0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
fdin=fopen(argv[1],"rb");
|
|
||||||
if (fdin==NULL) {
|
|
||||||
printf("Cannot open input file %s for reading\n",argv[1]);
|
|
||||||
return 200;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (fread((void*)&word, 8, 1, fdin)) {
|
|
||||||
// printf("%llx\n",word);
|
|
||||||
if (ioff<off) ioff++;
|
|
||||||
else {
|
|
||||||
|
|
||||||
for (ib=0; ib<nb; ib++) {
|
|
||||||
if (word&(1<<bit[ib])) val[ib]|=(1<<idr);
|
|
||||||
}
|
|
||||||
idr++;
|
|
||||||
if (idr==dr) {
|
|
||||||
idr=0;
|
|
||||||
fprintf(stdout,"%d\t",iw++);
|
|
||||||
for (ib=0; ib<nb; ib++) {
|
|
||||||
#ifdef HEX
|
|
||||||
fprintf(stdout,"%08llx\t",val[ib]);
|
|
||||||
#else
|
|
||||||
fprintf(stdout,"%lld\t",val[ib]);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
val[ib]=0;
|
|
||||||
}
|
|
||||||
fprintf(stdout,"\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
if (idr!=0) {
|
|
||||||
fprintf(stdout,"%d\t",iw++);
|
|
||||||
for (ib=0; ib<nb; ib++) {
|
|
||||||
#ifdef HEX
|
|
||||||
fprintf(stdout,"%08llx\t",val[ib]);
|
|
||||||
#else
|
|
||||||
fprintf(stdout,"%lld\t",val[ib]);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
val[ib]=0;
|
|
||||||
}
|
|
||||||
fprintf(stdout,"\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
fclose(fdin);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,179 +0,0 @@
|
|||||||
// SPDX-License-Identifier: LGPL-3.0-or-other
|
|
||||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
|
||||||
/****************************************************************************
|
|
||||||
usage to generate a patter test.pat from test.p
|
|
||||||
|
|
||||||
gcc -DINFILE="\"test.p\"" -DOUTFILE="\"test.pat\"" -o test.exe generator.c ; ./test.exe ; rm test.exe
|
|
||||||
|
|
||||||
|
|
||||||
*************************************************************************/
|
|
||||||
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdint.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <sys/utsname.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <math.h>
|
|
||||||
#include <fcntl.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
#define MAXLOOPS 3
|
|
||||||
#define MAXTIMERS 3
|
|
||||||
#define MAXWORDS 1024
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
uint64_t pat=0;
|
|
||||||
uint64_t iopat=0;
|
|
||||||
uint64_t clkpat=0;
|
|
||||||
|
|
||||||
int iaddr=0;
|
|
||||||
int waitaddr[3]={MAXWORDS,MAXWORDS,MAXWORDS};
|
|
||||||
int startloopaddr[3]={MAXWORDS,MAXWORDS,MAXWORDS};
|
|
||||||
int stoploopaddr[3]={MAXWORDS,MAXWORDS,MAXWORDS};
|
|
||||||
int start=0, stop=0;
|
|
||||||
uint64_t waittime[3]={0,0,0};
|
|
||||||
int nloop[3]={0,0,0};
|
|
||||||
|
|
||||||
char infile[10000], outfile[10000];
|
|
||||||
|
|
||||||
FILE *fd, *fd1;
|
|
||||||
uint64_t PAT[MAXWORDS];
|
|
||||||
|
|
||||||
|
|
||||||
int i,ii,iii,j,jj,jjj,pixx,pixy,memx,memy,muxout,memclk,colclk,rowclk,muxclk,memcol,memrow,loopcounter;
|
|
||||||
|
|
||||||
void setstart() {
|
|
||||||
start=iaddr;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setstop() {
|
|
||||||
stop=iaddr;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setinput(int bit) {
|
|
||||||
uint64_t mask=1;
|
|
||||||
mask=mask<<bit;
|
|
||||||
iopat &= ~mask;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setoutput(int bit) {
|
|
||||||
uint64_t mask=1;
|
|
||||||
mask=mask<<bit;
|
|
||||||
iopat |= mask;
|
|
||||||
}
|
|
||||||
/*
|
|
||||||
void setclk(int bit) {
|
|
||||||
uint64_t mask=1;
|
|
||||||
mask=mask<<bit;
|
|
||||||
iopat |= mask;
|
|
||||||
clkpat |= mask;
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
void clearbit(int bit){
|
|
||||||
uint64_t mask=1;
|
|
||||||
mask=mask<<bit;
|
|
||||||
pat &= ~mask;
|
|
||||||
}
|
|
||||||
void setbit(int bit){
|
|
||||||
uint64_t mask=1;
|
|
||||||
mask=mask<<bit;
|
|
||||||
pat |= mask;
|
|
||||||
}
|
|
||||||
|
|
||||||
int checkbit(int bit) {
|
|
||||||
uint64_t mask=1;
|
|
||||||
mask=mask<<bit;
|
|
||||||
return (pat & mask ) >>bit;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setstartloop(int iloop) {
|
|
||||||
if (iloop>=0 && iloop<MAXLOOPS)
|
|
||||||
startloopaddr[iloop]=iaddr;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void setstoploop(int iloop) {
|
|
||||||
if (iloop>=0 && iloop<MAXLOOPS)
|
|
||||||
stoploopaddr[iloop]=iaddr;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void setnloop(int iloop, int n) {
|
|
||||||
if (iloop>=0 && iloop<MAXLOOPS)
|
|
||||||
nloop[iloop]=n;
|
|
||||||
}
|
|
||||||
|
|
||||||
void setwaitpoint(int iloop) {
|
|
||||||
if (iloop>=0 && iloop<MAXTIMERS)
|
|
||||||
waitaddr[iloop]=iaddr;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void setwaittime(int iloop, uint64_t t) {
|
|
||||||
if (iloop>=0 && iloop<MAXTIMERS)
|
|
||||||
waittime[iloop]=t;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void pw(){
|
|
||||||
if (iaddr<MAXWORDS)
|
|
||||||
PAT[iaddr]= pat;
|
|
||||||
fprintf(fd,"patword 0x%04x 0x%016llx\n",iaddr, pat);
|
|
||||||
iaddr++;
|
|
||||||
if (iaddr>=MAXWORDS) printf("ERROR: too many word in the pattern (%d instead of %d)!",iaddr, MAXWORDS);
|
|
||||||
}
|
|
||||||
|
|
||||||
int parseCommand(int clk, int cmdbit, int cmd, int length) {
|
|
||||||
int ibit;
|
|
||||||
clearbit(clk);
|
|
||||||
for (ibit=0; ibit<length; ibit++) {
|
|
||||||
if (cmd&(1>>ibit))
|
|
||||||
setbit(cmdbit);
|
|
||||||
else
|
|
||||||
clearbit(cmdbit);
|
|
||||||
pw();
|
|
||||||
/******/
|
|
||||||
setbit(clk);
|
|
||||||
pw();
|
|
||||||
/******/
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
main(void) {
|
|
||||||
int iloop=0;
|
|
||||||
fd=fopen(OUTFILE,"w");
|
|
||||||
#include INFILE
|
|
||||||
|
|
||||||
fprintf(fd,"patioctrl 0x%016llx\n",iopat);
|
|
||||||
//fprintf(fd,"patclkctrl 0x%016llx\n",clkpat);
|
|
||||||
fprintf(fd,"patlimits 0x%04x 0x%04x\n",start, stop);
|
|
||||||
|
|
||||||
for (iloop=0; iloop<MAXLOOPS; iloop++) {
|
|
||||||
fprintf(fd,"patloop%d 0x%04x 0x%04x\n",iloop, startloopaddr[iloop], stoploopaddr[iloop]);
|
|
||||||
if ( startloopaddr[iloop]<0 || stoploopaddr[iloop]<= startloopaddr[iloop]) nloop[iloop]=0;
|
|
||||||
fprintf(fd,"patnloop%d %d\n",iloop, nloop[iloop]);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (iloop=0; iloop<MAXTIMERS; iloop++) {
|
|
||||||
fprintf(fd,"patwait%d 0x%04x\n",iloop, waitaddr[iloop]);
|
|
||||||
if (waitaddr[iloop]<0) waittime[iloop]=0;
|
|
||||||
fprintf(fd,"patwaittime%d %lld\n",iloop, waittime[iloop]);
|
|
||||||
}
|
|
||||||
|
|
||||||
close((int)fd);
|
|
||||||
fd1=fopen(OUTFILEBIN,"w");
|
|
||||||
fwrite(PAT,sizeof(uint64_t),iaddr, fd1);
|
|
||||||
close((int)fd1);
|
|
||||||
}
|
|
@ -1,201 +0,0 @@
|
|||||||
//define signals and directions (Input, outputs, clocks)
|
|
||||||
|
|
||||||
|
|
||||||
#define compTestIN 1
|
|
||||||
setoutput(compTestIN);
|
|
||||||
|
|
||||||
#define curON 32
|
|
||||||
setoutput(curON);
|
|
||||||
|
|
||||||
#define side_clk 2
|
|
||||||
setclk(side_clk);
|
|
||||||
|
|
||||||
#define side_din 3
|
|
||||||
setoutput(side_din);
|
|
||||||
|
|
||||||
#define clear_shr 4
|
|
||||||
setoutput(clear_shr);
|
|
||||||
|
|
||||||
#define bottom_din 5
|
|
||||||
setoutput(bottom_din);
|
|
||||||
|
|
||||||
#define bottom_clk 6
|
|
||||||
setclk(bottom_clk);
|
|
||||||
|
|
||||||
#define gHG 7
|
|
||||||
setoutput(gHG);
|
|
||||||
|
|
||||||
#define bypassCDS 31
|
|
||||||
setoutput(bypassCDS);
|
|
||||||
|
|
||||||
|
|
||||||
#define ENprechPRE 8
|
|
||||||
setoutput(ENprechPRE);
|
|
||||||
|
|
||||||
|
|
||||||
#define res 9
|
|
||||||
setoutput(res);
|
|
||||||
|
|
||||||
#define pulseOFF 30
|
|
||||||
setoutput(pulseOFF);
|
|
||||||
|
|
||||||
#define connCDS 27
|
|
||||||
setoutput(connCDS);
|
|
||||||
|
|
||||||
#define Dsg_1 24
|
|
||||||
setoutput(Dsg_1);
|
|
||||||
|
|
||||||
|
|
||||||
#define Dsg_2 25
|
|
||||||
setoutput(Dsg_2);
|
|
||||||
|
|
||||||
|
|
||||||
#define Dsg_3 23
|
|
||||||
setoutput(Dsg_3);
|
|
||||||
|
|
||||||
#define sto0 10
|
|
||||||
setoutput(sto0);
|
|
||||||
|
|
||||||
#define sto1 11
|
|
||||||
setoutput(sto1);
|
|
||||||
|
|
||||||
#define sto2 12
|
|
||||||
setoutput(sto2);
|
|
||||||
|
|
||||||
#define resCDS 13
|
|
||||||
setoutput(resCDS);
|
|
||||||
|
|
||||||
#define prechargeConnect 14
|
|
||||||
setoutput(prechargeConnect);
|
|
||||||
|
|
||||||
#define pulse 15
|
|
||||||
setoutput(pulse);
|
|
||||||
|
|
||||||
#define PCT_mode 21
|
|
||||||
setoutput(PCT_mode);
|
|
||||||
|
|
||||||
#define res_DGS 16
|
|
||||||
setoutput(res_DGS);
|
|
||||||
|
|
||||||
#define adc_ena 17
|
|
||||||
setoutput(adc_ena);
|
|
||||||
|
|
||||||
|
|
||||||
#define CLKBIT 18
|
|
||||||
setclk(CLKBIT);
|
|
||||||
|
|
||||||
|
|
||||||
#define adc_sync 63
|
|
||||||
setoutput(adc_sync);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define PW pw()
|
|
||||||
#define SB(x) setbit(x)
|
|
||||||
#define CB(x) clearbit(x)
|
|
||||||
#define CLOCK clearbit(CLKBIT); pw();setbit(CLKBIT);pw()
|
|
||||||
#define LCLOCK clearbit(CLKBIT); pw();setbit(CLKBIT);pw();clearbit(CLKBIT); pw()
|
|
||||||
#define CLOCKS(x) for (i=0;i<x;i++) {clearbit(CLKBIT);pw(); setbit(CLKBIT); pw();}
|
|
||||||
#define STOP setstop();
|
|
||||||
#define START setstart();
|
|
||||||
#define REPEAT(x) for (i=0;i<(x);i++) {pw();}
|
|
||||||
#define DOFOR(x) for (j=0;j<(x);j++) {
|
|
||||||
// }
|
|
||||||
#define STARTUP1 CB(compTestIN);SB(clear_shr);CB(side_clk);CB(side_din);CB(bottom_din);CB(bottom_clk);
|
|
||||||
#define STARTUP2 CB(pulse);SB(PCT_mode);SB(pulseOFF);CB(curON);
|
|
||||||
#define STARTUP3 SB(res);SB(gHG);SB(ENprechPRE);
|
|
||||||
#define STARTUP4 SB(bypassCDS); CB(connCDS);CB(sto0);SB(sto1);SB(sto2);
|
|
||||||
#define STARTUP5 SB(resCDS);CB(Dsg_1);CB(Dsg_2);SB(Dsg_3);CB(prechargeConnect);SB(res_DGS);
|
|
||||||
#define STARTUP STARTUP1 STARTUP2 STARTUP3 STARTUP4 STARTUP5 PW;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//****NOTES****//
|
|
||||||
//FUNCTIONS
|
|
||||||
//Declare functions at the beginning
|
|
||||||
void load_pix(int nx, int ny)
|
|
||||||
{//SELECT PIXEL 1,1 for readout
|
|
||||||
SB(clear_shr);PW;PW;
|
|
||||||
CB(clear_shr);PW;PW;PW;PW;
|
|
||||||
|
|
||||||
SB(side_din);PW;
|
|
||||||
SB(side_clk);PW;
|
|
||||||
CB(side_din);
|
|
||||||
setstartloop(0); //loop on the rows
|
|
||||||
SB(side_clk);PW;
|
|
||||||
setstoploop(0); //finish loop on the rows
|
|
||||||
setnloop(0,ny); //set number row selected -can be changed dynamically
|
|
||||||
CB(side_clk);PW;
|
|
||||||
SB(bottom_din);PW;
|
|
||||||
SB(bottom_clk);PW;
|
|
||||||
CB(bottom_din);
|
|
||||||
setstartloop(1); //loop on the columns
|
|
||||||
SB(bottom_clk);PW;
|
|
||||||
setstoploop(1); //loop on the columns
|
|
||||||
setnloop(1,ny); //set number columns selected -can be changed dynamically
|
|
||||||
}
|
|
||||||
|
|
||||||
void load_col(void)
|
|
||||||
{//SELECT COLUMN 1 for readout
|
|
||||||
SB(clear_shr);PW;PW;
|
|
||||||
CB(clear_shr);PW;PW;PW;PW;
|
|
||||||
SB(bottom_din);PW;
|
|
||||||
SB(bottom_clk);PW;
|
|
||||||
CB(bottom_clk);PW;
|
|
||||||
CB(bottom_din);PW;
|
|
||||||
}
|
|
||||||
//END of FUNCTIONS
|
|
||||||
////////////////////////////////////////////////////////
|
|
||||||
//LET BYPASS PREAMP AND CDS and write on preamp out.//
|
|
||||||
//THIS ALLOWS CHECKING SOURCE FOLLOWERS //
|
|
||||||
////////////////////////////////////////////////////////
|
|
||||||
|
|
||||||
|
|
||||||
PW;
|
|
||||||
|
|
||||||
SB(5); PW;
|
|
||||||
|
|
||||||
CB(5); PW;
|
|
||||||
|
|
||||||
START; //pattern starts from here
|
|
||||||
STARTUP;
|
|
||||||
setwaitpoint(0); //set wait points
|
|
||||||
PW;
|
|
||||||
setwaittime(0,20); //wait time - can be changed dynamically
|
|
||||||
SB(adc_ena);PW;
|
|
||||||
printf("ADC sync %x %d %llx\n",iaddr,adc_sync, pat);
|
|
||||||
SB(adc_sync);PW;
|
|
||||||
printf("ADC sync %x %d %llx\n",iaddr, adc_sync, pat);
|
|
||||||
CB(gHG);
|
|
||||||
setwaitpoint(1); //set wait points
|
|
||||||
setwaittime(1,16); //wait time - can be changed dynamically
|
|
||||||
CB(adc_sync);PW;
|
|
||||||
load_pix(10, 20);
|
|
||||||
|
|
||||||
CB(res);
|
|
||||||
//CB(Dsg_3);PW;
|
|
||||||
CB(res_DGS);
|
|
||||||
setwaitpoint(2); //set wait points
|
|
||||||
setwaittime(2,1000); //wait time - can be changed dynamically
|
|
||||||
|
|
||||||
//SB(res_DGS);
|
|
||||||
//PW;
|
|
||||||
//SB(Dsg_3);
|
|
||||||
//
|
|
||||||
//CB(connCDS);
|
|
||||||
//TEST SIGNALS END
|
|
||||||
//
|
|
||||||
REPEAT(20)
|
|
||||||
|
|
||||||
//****************//
|
|
||||||
//*FINAL COMMANDS*//
|
|
||||||
//****************//
|
|
||||||
CB(adc_ena);PW;
|
|
||||||
//STARTUP;
|
|
||||||
STOP; PW; //stops here
|
|
||||||
//REPEAT(4);
|
|
@ -55,6 +55,9 @@ set(SPHINX_SOURCE_FILES
|
|||||||
src/troubleshooting.rst
|
src/troubleshooting.rst
|
||||||
src/receivers.rst
|
src/receivers.rst
|
||||||
src/slsreceiver.rst
|
src/slsreceiver.rst
|
||||||
|
src/udpheader.rst
|
||||||
|
src/udpconfig.rst
|
||||||
|
src/udpdetspec.rst
|
||||||
)
|
)
|
||||||
|
|
||||||
foreach(filename ${SPHINX_SOURCE_FILES})
|
foreach(filename ${SPHINX_SOURCE_FILES})
|
||||||
|
@ -21,10 +21,8 @@ the shared libraries these are needed:
|
|||||||
GUI
|
GUI
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
The GUI is currently using Qt4 but watch out for an upgrade to 5.
|
* Qt 5.9
|
||||||
|
* Qwt 6.1.5 (packaged in libs/)
|
||||||
* Qt 4.8
|
|
||||||
* Qwt 6.1
|
|
||||||
|
|
||||||
-----------------------
|
-----------------------
|
||||||
Python bindings
|
Python bindings
|
||||||
|
@ -92,19 +92,30 @@ Download
|
|||||||
Upgrade
|
Upgrade
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
|
|
||||||
.. note ::
|
.. warning ::
|
||||||
|
|
||||||
|
In case you have had issues in the past with programming via software:
|
||||||
|
|
||||||
|
* 6.1.2 server has a fix for seamless fpga programming
|
||||||
|
|
||||||
|
* We recommend first updating the on-board detector server to 6.1.2 (with client 6.1.x) using command 'updatedetectorserver' or 'copydetectorserver'.
|
||||||
|
|
||||||
|
* Then use command 'programfpga' to only update firmware or use command 'update' to update firmware and server to the latest release.
|
||||||
|
|
||||||
These instructions are for upgrades from v5.0.0. For earlier versions, contact us.
|
|
||||||
|
|
||||||
|
|
||||||
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
||||||
|
|
||||||
Always ensure that the client and server software are of the same release.
|
|
||||||
|
|
||||||
|
|
||||||
Program from console
|
Program from console
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# These instructions are for upgrades from v5.0.0. For earlier versions, please contact us.
|
||||||
|
|
||||||
|
# Always ensure that the client and server software are of the same release.
|
||||||
|
|
||||||
# copies server from tftp folder of pc, links new server to jungfrauDetectorServer,
|
# copies server from tftp folder of pc, links new server to jungfrauDetectorServer,
|
||||||
# removes old server from respawn, sets up new lnked server to respawn
|
# removes old server from respawn, sets up new lnked server to respawn
|
||||||
# programs fpga,
|
# programs fpga,
|
||||||
@ -155,10 +166,6 @@ Upgrade
|
|||||||
Mythen III
|
Mythen III
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
.. note ::
|
|
||||||
|
|
||||||
As it is still in development, the rbf files must be picked up from us.
|
|
||||||
|
|
||||||
Download
|
Download
|
||||||
^^^^^^^^^^^^^
|
^^^^^^^^^^^^^
|
||||||
|
|
||||||
@ -170,11 +177,11 @@ Download
|
|||||||
Upgrade
|
Upgrade
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
|
|
||||||
Always ensure that the client and server software are of the same release.
|
|
||||||
|
|
||||||
Program from console
|
Program from console
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# Always ensure that the client and server software are of the same release.
|
||||||
|
|
||||||
# copies server from tftp folder of pc, links new server to mythen3DetectorServer,
|
# copies server from tftp folder of pc, links new server to mythen3DetectorServer,
|
||||||
# programs fpga,
|
# programs fpga,
|
||||||
# reboots
|
# reboots
|
||||||
@ -199,11 +206,11 @@ Download
|
|||||||
Upgrade
|
Upgrade
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
|
|
||||||
Always ensure that the client and server software are of the same release.
|
|
||||||
|
|
||||||
Program from console
|
Program from console
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# Always ensure that the client and server software are of the same release.
|
||||||
|
|
||||||
# copies server from tftp folder of pc, links new server to gotthard2DetectorServer,
|
# copies server from tftp folder of pc, links new server to gotthard2DetectorServer,
|
||||||
# programs fpga,
|
# programs fpga,
|
||||||
# reboots
|
# reboots
|
||||||
@ -230,13 +237,26 @@ Download
|
|||||||
Upgrade
|
Upgrade
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
|
|
||||||
|
.. warning ::
|
||||||
|
|
||||||
|
In case you have had issues in the past with programming via software:
|
||||||
|
|
||||||
|
* 6.1.2 server has a fix for seamless fpga programming
|
||||||
|
|
||||||
|
* We recommend first updating the on-board detector server to 6.1.2 (with client 6.1.x) using command 'updatedetectorserver' or 'copydetectorserver'.
|
||||||
|
|
||||||
|
* Then use command 'programfpga' to only update firmware or use command 'update' to update firmware and server to the latest release.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
||||||
|
|
||||||
Always ensure that the client and server software are of the same release.
|
|
||||||
|
|
||||||
Program from console
|
Program from console
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# Always ensure that the client and server software are of the same release.
|
||||||
|
|
||||||
# copies server from tftp folder of pc, links new server to moenchDetectorServer,
|
# copies server from tftp folder of pc, links new server to moenchDetectorServer,
|
||||||
# removes old server from respawn, sets up new lnked server to respawn
|
# removes old server from respawn, sets up new lnked server to respawn
|
||||||
# programs fpga,
|
# programs fpga,
|
||||||
@ -262,11 +282,12 @@ Upgrade
|
|||||||
|
|
||||||
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
Check :ref:`firmware troubleshooting <blackfin firmware troubleshooting>` if you run into issues while programming firmware.
|
||||||
|
|
||||||
Always ensure that the client and server software are of the same release.
|
|
||||||
|
|
||||||
Program from console
|
Program from console
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# Always ensure that the client and server software are of the same release.
|
||||||
|
|
||||||
# copies server from tftp folder of pc, links new server to ctbDetectorServer,
|
# copies server from tftp folder of pc, links new server to ctbDetectorServer,
|
||||||
# removes old server from respawn, sets up new lnked server to respawn
|
# removes old server from respawn, sets up new lnked server to respawn
|
||||||
# programs fpga,
|
# programs fpga,
|
||||||
|
@ -66,6 +66,15 @@ Welcome to slsDetectorPackage's documentation!
|
|||||||
virtualserver
|
virtualserver
|
||||||
serverdefaults
|
serverdefaults
|
||||||
|
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:caption: Detector UDP Header
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
udpheader
|
||||||
|
udpconfig
|
||||||
|
udpdetspec
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:caption: Receiver
|
:caption: Receiver
|
||||||
:maxdepth: 2
|
:maxdepth: 2
|
||||||
|
@ -13,88 +13,27 @@
|
|||||||
|
|
||||||
Before building from source make sure that you have the
|
Before building from source make sure that you have the
|
||||||
:doc:`dependencies <../dependencies>` installed. If installing using conda, conda will
|
:doc:`dependencies <../dependencies>` installed. If installing using conda, conda will
|
||||||
manage the dependencies.
|
manage the dependencies. Avoid also installing packages with pip.
|
||||||
|
|
||||||
|
|
||||||
.. _Installation:
|
.. _Installation:
|
||||||
|
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
==============================================
|
===============
|
||||||
|
|
||||||
.. _build from source using cmake:
|
|
||||||
|
|
||||||
Build from source using CMake
|
|
||||||
---------------------------------
|
|
||||||
|
|
||||||
Note that on some systems, for example RH7, cmake v3+ is available under the cmake3 alias.
|
|
||||||
It is also required to clone with the option --recursive to get the git submodules used
|
|
||||||
in the package.
|
|
||||||
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
git clone --recursive https://github.com/slsdetectorgroup/slsDetectorPackage.git
|
|
||||||
mkdir build && cd build
|
|
||||||
cmake ../slsDetectorPackage -DCMAKE_INSTALL_PREFIX=/your/install/path
|
|
||||||
make -j12 #or whatever number of cores you are using to build
|
|
||||||
make install
|
|
||||||
|
|
||||||
The easiest way to configure options is to use the ccmake utility.
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
#from the build directory
|
|
||||||
ccmake .
|
|
||||||
|
|
||||||
|
|
||||||
Build using cmk.sh script
|
|
||||||
-------------------------
|
|
||||||
These are mainly aimed at those not familiar with using ccmake and cmake.
|
|
||||||
|
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
The binaries are generated in slsDetectorPackage/build/bin directory.
|
|
||||||
|
|
||||||
Usage: $0 [-c] [-b] [-p] [e] [t] [r] [g] [s] [u] [i] [m] [n] [-h] [z] [-d <HDF5 directory>] [-l Install directory] [-k <CMake command>] [-j <Number of threads>]
|
|
||||||
-[no option]: only make
|
|
||||||
-c: Clean
|
|
||||||
-b: Builds/Rebuilds CMake files normal mode
|
|
||||||
-p: Builds/Rebuilds Python API
|
|
||||||
-h: Builds/Rebuilds Cmake files with HDF5 package
|
|
||||||
-d: HDF5 Custom Directory
|
|
||||||
-k: CMake command
|
|
||||||
-l: Install directory
|
|
||||||
-t: Build/Rebuilds only text client
|
|
||||||
-r: Build/Rebuilds only receiver
|
|
||||||
-g: Build/Rebuilds only gui
|
|
||||||
-s: Simulator
|
|
||||||
-u: Chip Test Gui
|
|
||||||
-j: Number of threads to compile through
|
|
||||||
-e: Debug mode
|
|
||||||
-i: Builds tests
|
|
||||||
-m: Manuals
|
|
||||||
-n: Manuals without compiling doxygen (only rst)
|
|
||||||
-z: Moench zmq processor
|
|
||||||
|
|
||||||
# get all options
|
|
||||||
./cmk.sh -?
|
|
||||||
|
|
||||||
# new build and compile in parallel:
|
|
||||||
./cmk.sh -bj5
|
|
||||||
|
|
||||||
|
|
||||||
Install binaries using conda
|
Install binaries using conda
|
||||||
--------------------------------
|
-------------------------------
|
||||||
|
|
||||||
Conda is not only useful to manage python environments but can also
|
Conda is not only useful to manage python environments but can also
|
||||||
be used as a user space package manager.
|
be used as a user space package manager. Dates in the tag (for eg. 2020.07.23.dev0)
|
||||||
|
are from the developer branch. Please use released tags for stability.
|
||||||
|
|
||||||
We have three different packages available:
|
We have three different packages available:
|
||||||
|
|
||||||
* **slsdetlib**, shared libraries and command line utilities
|
* **slsdetlib** shared libraries and command line utilities
|
||||||
* **slsdetgui**, GUI
|
* **slsdetgui** GUI
|
||||||
* **slsdet**, Python bindings
|
* **slsdet** Python bindings
|
||||||
|
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
@ -103,9 +42,9 @@ We have three different packages available:
|
|||||||
conda config --add channels slsdetectorgroup
|
conda config --add channels slsdetectorgroup
|
||||||
conda config --set channel_priority strict
|
conda config --set channel_priority strict
|
||||||
|
|
||||||
#cerate an environment with our library, then activate
|
#create and activate an environment with our library
|
||||||
#replace 2020.07.20.dev0 with the required tag
|
#replace 6.1.1 with the required tag
|
||||||
conda create -n myenv slsdetlib=2020.07.23.dev0
|
conda create -n myenv slsdetlib=6.1.1
|
||||||
conda activate myenv
|
conda activate myenv
|
||||||
|
|
||||||
#ready to use
|
#ready to use
|
||||||
@ -116,11 +55,145 @@ We have three different packages available:
|
|||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
#List available versions
|
#List available versions
|
||||||
|
# lib and binaries
|
||||||
|
conda search slsdetlib
|
||||||
|
# python
|
||||||
conda search slsdet
|
conda search slsdet
|
||||||
|
# gui
|
||||||
|
conda search slsdetgui
|
||||||
|
|
||||||
|
|
||||||
Build from source on old distributions
|
|
||||||
-----------------------------------------
|
|
||||||
|
Build from source
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
|
||||||
|
1. Download Source Code from github
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
git clone https://github.com/slsdetectorgroup/slsDetectorPackage.git --branch 6.1.1
|
||||||
|
|
||||||
|
|
||||||
|
| **Pybind for Python**
|
||||||
|
| v7.0.0+:
|
||||||
|
| pybind11 packaged into 'libs/pybind'. No longer a submodule. No need for "recursive" or "submodule update".
|
||||||
|
|
|
||||||
|
| Older versions:
|
||||||
|
| pybind11 is a submodule. Must be cloned using "recursive" and updated when switching between versions using the following commands.
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# clone using recursive to get pybind11 submodule
|
||||||
|
git clone --recursive https://github.com/slsdetectorgroup/slsDetectorPackage.git
|
||||||
|
|
||||||
|
# update submodule when switching between releases
|
||||||
|
cd slsDetectorPackage
|
||||||
|
git submodule update --init
|
||||||
|
|
||||||
|
|
||||||
|
.. _build from source using cmake:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
2. Build from Source
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
Build using CMake
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# outside slsDetecorPackage folder
|
||||||
|
mkdir build && cd build
|
||||||
|
|
||||||
|
# configure & generate Makefiles using cmake
|
||||||
|
# by listing all your options (alternately use ccmake described below)
|
||||||
|
# cmake3 for some systems
|
||||||
|
cmake ../slsDetectorPackage -DCMAKE_INSTALL_PREFIX=/your/install/path
|
||||||
|
|
||||||
|
# compiled to the build/bin directory
|
||||||
|
make -j12 #or whatever number of cores you are using to build
|
||||||
|
|
||||||
|
# install headers and libs in /your/install/path directory
|
||||||
|
make install
|
||||||
|
|
||||||
|
|
||||||
|
Instead of the cmake command, one can use ccmake to get a list of options to configure and generate Makefiles at ease.
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# ccmake3 for some systems
|
||||||
|
ccmake ..
|
||||||
|
|
||||||
|
# choose the options
|
||||||
|
# first press [c] - configure
|
||||||
|
# then press [g] - generate
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
=============================== ===========================================
|
||||||
|
Example cmake options Comment
|
||||||
|
=============================== ===========================================
|
||||||
|
-DSLS_USE_PYTHON=ON Python
|
||||||
|
-DPython_FIND_VIRTUALENV=ONLY Python from only the conda environment
|
||||||
|
-DZeroMQ_HINT=/usr/lib64 Use system zmq instead
|
||||||
|
-DSLS_USE_GUI=ON GUI
|
||||||
|
=============================== ===========================================
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Build using in-built cmk.sh script
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
The binaries are generated in slsDetectorPackage/build/bin directory.
|
||||||
|
|
||||||
|
Usage: ./cmk.sh [-b] [-c] [-d <HDF5 directory>] [e] [g] [-h] [i] [-j <Number of threads>]
|
||||||
|
[-k <CMake command>] [-l <Install directory>] [m] [n] [-p] [-q <Zmq hint directory>]
|
||||||
|
[r] [s] [t] [u] [z]
|
||||||
|
-[no option]: only make
|
||||||
|
-b: Builds/Rebuilds CMake files normal mode
|
||||||
|
-c: Clean
|
||||||
|
-d: HDF5 Custom Directory
|
||||||
|
-e: Debug mode
|
||||||
|
-g: Build/Rebuilds only gui
|
||||||
|
-h: Builds/Rebuilds Cmake files with HDF5 package
|
||||||
|
-i: Builds tests
|
||||||
|
-j: Number of threads to compile through
|
||||||
|
-k: CMake command
|
||||||
|
-l: Install directory
|
||||||
|
-m: Manuals
|
||||||
|
-n: Manuals without compiling doxygen (only rst)
|
||||||
|
-p: Builds/Rebuilds Python API
|
||||||
|
-q: Zmq hint directory
|
||||||
|
-r: Build/Rebuilds only receiver
|
||||||
|
-s: Simulator
|
||||||
|
-t: Build/Rebuilds only text client
|
||||||
|
-u: Chip Test Gui
|
||||||
|
-z: Moench zmq processor
|
||||||
|
|
||||||
|
|
||||||
|
# get all options
|
||||||
|
./cmk.sh -?
|
||||||
|
|
||||||
|
# new build and compile in parallel:
|
||||||
|
./cmk.sh -bj5
|
||||||
|
|
||||||
|
# new build, python and compile in parallel:
|
||||||
|
./cmk.sh -bpj5
|
||||||
|
|
||||||
|
#To use the system zmq (/usr/lib64) instead
|
||||||
|
./cmk.sh -bj5 -q /usr/lib64
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Build on old distributions
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
If your linux distribution doesn't come with a C++11 compiler (gcc>4.8) then
|
If your linux distribution doesn't come with a C++11 compiler (gcc>4.8) then
|
||||||
it's possible to install a newer gcc using conda and build the slsDetectorPackage
|
it's possible to install a newer gcc using conda and build the slsDetectorPackage
|
||||||
@ -131,12 +204,64 @@ using this compiler
|
|||||||
#Create an environment with the dependencies
|
#Create an environment with the dependencies
|
||||||
conda create -n myenv gxx_linux-64 cmake zmq
|
conda create -n myenv gxx_linux-64 cmake zmq
|
||||||
conda activate myenv
|
conda activate myenv
|
||||||
|
|
||||||
|
# outside slsDetecorPackage folder
|
||||||
|
mkdir build && cd build
|
||||||
cmake ../slsDetectorPackage -DCMAKE_PREFIX_PATH=$CONDA_PREFIX
|
cmake ../slsDetectorPackage -DCMAKE_PREFIX_PATH=$CONDA_PREFIX
|
||||||
make -j12
|
make -j12
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Build slsDetectorGui (Qt5)
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
1. Using pre-built binary on conda
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
conda create -n myenv slsdetgui=7.0.0
|
||||||
|
conda activate myenv
|
||||||
|
|
||||||
|
|
||||||
|
2. Using system installation on RHEL7
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
yum install qt5-qtbase-devel.x86_64
|
||||||
|
yum install qt5-qtsvg-devel.x86_64
|
||||||
|
|
||||||
|
|
||||||
|
3. Using conda
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
#Add channels for dependencies and our library
|
||||||
|
conda config --add channels conda-forge
|
||||||
|
conda config --add channels slsdetectorgroup
|
||||||
|
conda config --set channel_priority strict
|
||||||
|
|
||||||
|
# create environment to compile
|
||||||
|
# on rhel7
|
||||||
|
conda create -n slsgui zeromq gxx_linux-64 gxx_linux-64 mesa-libgl-devel-cos6-x86_64 qt
|
||||||
|
# on fedora or newer systems
|
||||||
|
conda create -n slsgui zeromq qt
|
||||||
|
|
||||||
|
# when using conda compilers, would also need libgl, but no need for it on fedora unless maybe using it with ROOT
|
||||||
|
|
||||||
|
# activate environment
|
||||||
|
conda activate slsgui
|
||||||
|
|
||||||
|
# compile with cmake outside slsDetecorPackage folder
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake ../slsDetectorPackage -DSLS_USE_GUI=ON
|
||||||
|
make -j12
|
||||||
|
|
||||||
|
# or compile with cmk.sh
|
||||||
|
cd slsDetectorPackage
|
||||||
|
./cmk.sh -cbgj9
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Build this documentation
|
Build this documentation
|
||||||
-------------------------------
|
^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
The documentation for the slsDetectorPackage is build using a combination
|
The documentation for the slsDetectorPackage is build using a combination
|
||||||
of Doxygen, Sphinx and Breathe. The easiest way to install the dependencies
|
of Doxygen, Sphinx and Breathe. The easiest way to install the dependencies
|
||||||
@ -144,11 +269,15 @@ is to use conda
|
|||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
conda create -n myenv python sphinx sphinx_rtd_theme
|
conda create -n myenv python sphinx_rtd_theme breathe
|
||||||
|
|
||||||
Then enable the option SLS_BUILD_DOCS to create the targets
|
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# using cmake or ccmake to enable DSLS_BUILD_DOCS
|
||||||
|
# outside slsDetecorPackage folder
|
||||||
|
mkdir build && cd build
|
||||||
|
cmake ../slsDetectorPackage -DSLS_BUILD_DOCS=ON
|
||||||
|
|
||||||
make docs # generate API docs and build Sphinx RST
|
make docs # generate API docs and build Sphinx RST
|
||||||
make rst # rst only, saves time in case the API did not change
|
make rst # rst only, saves time in case the API did not change
|
@ -10,27 +10,46 @@ open an issue in our our `github repo
|
|||||||
Setting exposure time
|
Setting exposure time
|
||||||
------------------------------------
|
------------------------------------
|
||||||
|
|
||||||
Setting and reading back exposure time can be done either using a Python datetime.timedelta
|
Setting and reading back exposure time can be done either using a Python
|
||||||
or by setting the time in seconds.
|
datetime.timedelta, DurationWrapper or by setting the time in seconds.
|
||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
# Set exposure time to 1.2 seconds
|
# Set exposure time to 1.2 seconds
|
||||||
>>> d.exptime = 1.2
|
>>> d.exptime = 1.2
|
||||||
|
>>> d.exptime = 5e-07
|
||||||
|
|
||||||
# Setting exposure time using timedelta
|
# Setting exposure time using timedelta (upto microseconds precision)
|
||||||
import datetime as dt
|
import datetime as dt
|
||||||
>>> d.exptime = dt.timedelta(seconds = 1.2)
|
>>> d.exptime = dt.timedelta(seconds = 1.2)
|
||||||
|
>>> d.exptime = dt.timedelta(seconds = 1, microseconds = 3)
|
||||||
|
|
||||||
# With timedelta any arbitrary combination of units can be used
|
# With timedelta any arbitrary combination of units can be used
|
||||||
>>> t = dt.timedelta(microseconds = 100, seconds = 5.3, minutes = .3)
|
>>> t = dt.timedelta(microseconds = 100, seconds = 5.3, minutes = .3)
|
||||||
|
|
||||||
|
# using DurationWrapper to set in seconds
|
||||||
|
>>> from slsdet import DurationWrapper
|
||||||
|
>>> d.exptime = DurationWrapper(1.2)
|
||||||
|
|
||||||
|
# using DurationWrapper to set in ns
|
||||||
|
>>> t = DurationWrapper()
|
||||||
|
>>> t.set_count(500)
|
||||||
|
>>> d.exptime = t
|
||||||
|
|
||||||
# To set exposure time for individual detector one have to resort
|
# To set exposure time for individual detector one have to resort
|
||||||
# to the C++ style API.
|
# to the C++ style API.
|
||||||
# Sets exposure time to 1.2 seconds for module 0, 6 and 12
|
# Sets exposure time to 1.2 seconds for module 0, 6 and 12
|
||||||
>>> d.setExptime(1.2, [0, 6, 12])
|
>>> d.setExptime(1.2, [0, 6, 12])
|
||||||
>>> d.setExptime(dt.timedelta(seconds = 1.2), [0, 6, 12])
|
>>> d.setExptime(dt.timedelta(seconds = 1.2), [0, 6, 12])
|
||||||
|
|
||||||
|
# to get in seconds
|
||||||
|
>>> d.period
|
||||||
|
181.23
|
||||||
|
|
||||||
|
# to get in DurationWrapper
|
||||||
|
>>> d.getExptime()
|
||||||
|
[sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
------------------------------------
|
------------------------------------
|
||||||
@ -220,8 +239,7 @@ Setting and getting times
|
|||||||
# This sets the exposure time for all modules
|
# This sets the exposure time for all modules
|
||||||
d.exptime = 0.5
|
d.exptime = 0.5
|
||||||
|
|
||||||
# exptime also accepts a python datetime.timedelta
|
# exptime also accepts a python datetime.timedelta (upto microseconds resolution)
|
||||||
# which can be used to set the time in almost any unit
|
|
||||||
t = dt.timedelta(milliseconds = 2.3)
|
t = dt.timedelta(milliseconds = 2.3)
|
||||||
d.exptime = t
|
d.exptime = t
|
||||||
|
|
||||||
@ -229,16 +247,25 @@ Setting and getting times
|
|||||||
t = dt.timedelta(minutes = 3, seconds = 1.23)
|
t = dt.timedelta(minutes = 3, seconds = 1.23)
|
||||||
d.exptime = t
|
d.exptime = t
|
||||||
|
|
||||||
|
# using DurationWrapper to set in seconds
|
||||||
|
>>> from slsdet import DurationWrapper
|
||||||
|
>>> d.exptime = DurationWrapper(1.2)
|
||||||
|
|
||||||
|
# using DurationWrapper to set in ns
|
||||||
|
>>> t = DurationWrapper()
|
||||||
|
>>> t.set_count(500)
|
||||||
|
>>> d.exptime = t
|
||||||
|
|
||||||
# exptime however always returns the time in seconds
|
# exptime however always returns the time in seconds
|
||||||
>>> d.exptime
|
>>> d.exptime
|
||||||
181.23
|
181.23
|
||||||
|
|
||||||
# To get back the exposure time for each module
|
# To get back the exposure time for each module
|
||||||
# it's possible to use getExptime, this also returns
|
# it's possible to use getExptime, this also returns
|
||||||
# the values as datetime.timedelta
|
# the values as DurationWrapper
|
||||||
|
|
||||||
>>> d.getExptime()
|
>>> d.getExptime()
|
||||||
[datetime.timedelta(seconds=181, microseconds=230000), datetime.timedelta(seconds=181, microseconds=230000)]
|
[sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)]
|
||||||
|
|
||||||
# In case the values are the same it's possible to use the
|
# In case the values are the same it's possible to use the
|
||||||
# element_if_equal function to reduce the values to a single
|
# element_if_equal function to reduce the values to a single
|
||||||
@ -246,7 +273,8 @@ Setting and getting times
|
|||||||
|
|
||||||
>>> t = d.getExptime()
|
>>> t = d.getExptime()
|
||||||
>>> element_if_equal(t)
|
>>> element_if_equal(t)
|
||||||
datetime.timedelta(seconds=1)
|
sls::DurationWrapper(total_seconds: 1.2 count: 1200000000)
|
||||||
|
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
Reading dacs
|
Reading dacs
|
||||||
|
@ -6,7 +6,7 @@ Getting Started
|
|||||||
Which Python?
|
Which Python?
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
We require at lest Python 3.6 and strongly recommended that you don't use the system
|
We require at least Python 3.6 and strongly recommended that you don't use the system
|
||||||
Python installation. The examples in this documentation uses `conda
|
Python installation. The examples in this documentation uses `conda
|
||||||
<https://docs.conda.io/en/latest/miniconda.html>`_ since it provides good support
|
<https://docs.conda.io/en/latest/miniconda.html>`_ since it provides good support
|
||||||
also for non Python packages but there are also other alternatives like, pyenv.
|
also for non Python packages but there are also other alternatives like, pyenv.
|
||||||
@ -14,28 +14,35 @@ also for non Python packages but there are also other alternatives like, pyenv.
|
|||||||
Using something like conda also allows you to quickly switch beteen different Python
|
Using something like conda also allows you to quickly switch beteen different Python
|
||||||
environments.
|
environments.
|
||||||
|
|
||||||
.. warning ::
|
---------------------
|
||||||
|
Building from Source
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
If you are not installing slsdet binaries from conda, but instead building from
|
||||||
|
source, please refer to :ref:`the installation section<Installation>` for details.
|
||||||
|
|
||||||
|
Don't forget to compile with the option SLS_USE_PYTHON=ON to enable the Python
|
||||||
|
bindings or if you use the cmk.sh script -p.
|
||||||
|
|
||||||
|
.. note ::
|
||||||
|
|
||||||
|
Ensure that the sls det python lib compiled is for the expected python version.
|
||||||
|
For example, build/bin/_slsdet.cpython-39-x86_64-linux-gnu.so for Python v3.9.x
|
||||||
|
|
||||||
If you use conda avoid also installing packages with pip.
|
|
||||||
|
|
||||||
---------------------
|
---------------------
|
||||||
PYTHONPATH
|
PYTHONPATH
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
If you install slsdet using conda everything is set up and you can
|
If you install slsdet binaries using conda everything is set up and you can
|
||||||
directly start using the Python bindings. However, if you build
|
directly start using the Python bindings. However, if you build
|
||||||
from source you need to tell Python where to find slsdet. This
|
from source you need to tell Python where to find slsdet to use it. This
|
||||||
is be done by adding your build/bin directory to PYTHONPATH.
|
can be done by adding your build/bin directory to PYTHONPATH.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
export PYTHONPATH = /path/to/your/build/bin:$PYTHONPATH
|
export PYTHONPATH = /path/to/your/build/bin:$PYTHONPATH
|
||||||
|
|
||||||
.. note ::
|
|
||||||
|
|
||||||
Don't forget to compile with the option SLS_USE_PYTHON=ON to enable
|
|
||||||
the Python bindings or if you use the cmk.sh script -p.
|
|
||||||
|
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
Which detector class should I use?
|
Which detector class should I use?
|
||||||
--------------------------------------
|
--------------------------------------
|
||||||
@ -146,9 +153,11 @@ their name.
|
|||||||
::
|
::
|
||||||
|
|
||||||
>>> [item for item in dir(d) if 'time' in item]
|
>>> [item for item in dir(d) if 'time' in item]
|
||||||
['exptime', 'getExptime', 'getExptimeForAllGates', 'getExptimeLeft',
|
['compdisabletime', 'exptime', 'exptimel', 'frametime', 'getExptime',
|
||||||
'getSubExptime', 'patwaittime0', 'patwaittime1', 'patwaittime2',
|
'getExptimeForAllGates', 'getExptimeLeft', 'getSubExptime', 'patwaittime',
|
||||||
'setExptime', 'setSubExptime', 'subdeadtime', 'subexptime']
|
'patwaittime0', 'patwaittime1', 'patwaittime2', 'runtime', 'setExptime',
|
||||||
|
'setSubExptime', 'subdeadtime', 'subexptime']
|
||||||
|
|
||||||
|
|
||||||
The above method works on any Python object but for convenience we also
|
The above method works on any Python object but for convenience we also
|
||||||
included two functions to find names. View prints the names one per line
|
included two functions to find names. View prints the names one per line
|
||||||
@ -160,6 +169,7 @@ while find returns a list of names.
|
|||||||
|
|
||||||
>>> view('exptime')
|
>>> view('exptime')
|
||||||
exptime
|
exptime
|
||||||
|
exptimel
|
||||||
getExptime
|
getExptime
|
||||||
getExptimeForAllGates
|
getExptimeForAllGates
|
||||||
getExptimeLeft
|
getExptimeLeft
|
||||||
@ -168,6 +178,7 @@ while find returns a list of names.
|
|||||||
setSubExptime
|
setSubExptime
|
||||||
subexptime
|
subexptime
|
||||||
|
|
||||||
|
|
||||||
>>> find('exptime')
|
>>> find('exptime')
|
||||||
['exptime', 'getExptime', 'getExptimeForAllGates', 'getExptimeLeft',
|
['exptime', 'getExptime', 'getExptimeForAllGates', 'getExptimeLeft',
|
||||||
'getSubExptime', 'setExptime', 'setSubExptime', 'subexptime']
|
'getSubExptime', 'setExptime', 'setSubExptime', 'subexptime']
|
||||||
@ -188,16 +199,36 @@ To access the documentation of a function directly from the Python prompt use he
|
|||||||
|
|
||||||
Note
|
Note
|
||||||
-----
|
-----
|
||||||
:getter: always returns in seconds. To get in datetime.delta, use getPeriod
|
:getter: always returns in seconds. To get in DurationWrapper, use getPeriod
|
||||||
|
|
||||||
Examples
|
Example
|
||||||
-----------
|
-----------
|
||||||
|
>>> # setting directly in seconds
|
||||||
>>> d.period = 1.05
|
>>> d.period = 1.05
|
||||||
>>> d.period = datetime.timedelta(minutes = 3, seconds = 1.23)
|
>>>
|
||||||
|
>>> # setting directly in seconds
|
||||||
|
>>> d.period = 5e-07
|
||||||
|
>>>
|
||||||
|
>>> # using timedelta (up to microseconds precision)
|
||||||
|
>>> from datatime import timedelta
|
||||||
|
>>> d.period = timedelta(seconds = 1, microseconds = 3)
|
||||||
|
>>>
|
||||||
|
>>> # using DurationWrapper to set in seconds
|
||||||
|
>>> from slsdet import DurationWrapper
|
||||||
|
>>> d.period = DurationWrapper(1.2)
|
||||||
|
>>>
|
||||||
|
>>> # using DurationWrapper to set in ns
|
||||||
|
>>> t = DurationWrapper()
|
||||||
|
>>> t.set_count(500)
|
||||||
|
>>> d.period = t
|
||||||
|
>>>
|
||||||
|
>>> # to get in seconds
|
||||||
>>> d.period
|
>>> d.period
|
||||||
181.23
|
181.23
|
||||||
>>> d.getPeriod()
|
>>>
|
||||||
[datetime.timedelta(seconds=181, microseconds=230000)]
|
>>> d.getExptime()
|
||||||
|
[sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----------------------
|
----------------------
|
||||||
@ -217,11 +248,12 @@ The enums can be found in slsdet.enums
|
|||||||
|
|
||||||
import slsdet
|
import slsdet
|
||||||
>>> [e for e in dir(slsdet.enums) if not e.startswith('_')]
|
>>> [e for e in dir(slsdet.enums) if not e.startswith('_')]
|
||||||
['burstMode', 'clockIndex', 'dacIndex',
|
['M3_GainCaps', 'burstMode', 'clockIndex', 'cls', 'dacIndex', 'detectorSettings',
|
||||||
'detectorSettings', 'detectorType', 'dimension', 'externalSignalFlag',
|
'detectorType', 'dimension', 'externalSignalFlag', 'fileFormat',
|
||||||
'fileFormat', 'frameDiscardPolicy',
|
'frameDiscardPolicy', 'gainMode', 'name', 'polarity', 'portPosition',
|
||||||
'readoutMode', 'runStatus', 'speedLevel', 'timingMode',
|
'readoutMode', 'runStatus', 'speedLevel', 'streamingInterface', 'timingMode',
|
||||||
'timingSourceType']
|
'timingSourceType', 'vetoAlgorithm']
|
||||||
|
|
||||||
|
|
||||||
# Even though importing using * is not recommended one could
|
# Even though importing using * is not recommended one could
|
||||||
# get all the enums like this:
|
# get all the enums like this:
|
||||||
|
@ -66,11 +66,15 @@ For a Single Module
|
|||||||
# sets destination udp ports (not needed, default is 50001)
|
# sets destination udp ports (not needed, default is 50001)
|
||||||
udp_dstport 50012
|
udp_dstport 50012
|
||||||
|
|
||||||
|
# 1g data out
|
||||||
# source udp ips must be same subnet at destintaion udp ips
|
# source udp ips must be same subnet at destintaion udp ips
|
||||||
udp_srcip 192.168.1.112
|
# udp_srcip 192.168.1.112
|
||||||
|
|
||||||
# destination udp ip picked up from rx_hostname (if auto)
|
# destination udp ip picked up from rx_hostname (if auto)
|
||||||
udp_dstip auto
|
# udp_dstip auto
|
||||||
|
|
||||||
|
# 10g data out
|
||||||
|
udp_srcip 10.30.20.200
|
||||||
|
udp_dstip 10.30.20.6
|
||||||
|
|
||||||
# set file path
|
# set file path
|
||||||
fpath /tmp
|
fpath /tmp
|
||||||
|
@ -4,41 +4,8 @@ Receivers
|
|||||||
Receiver processes can be run on same or different machines as the client, receives the data from the detector (via UDP packets).
|
Receiver processes can be run on same or different machines as the client, receives the data from the detector (via UDP packets).
|
||||||
When using the slsReceiver/ slsMultiReceiver, they can be further configured by the client control software (via TCP/IP) to set file name, file path, progress of acquisition etc.
|
When using the slsReceiver/ slsMultiReceiver, they can be further configured by the client control software (via TCP/IP) to set file name, file path, progress of acquisition etc.
|
||||||
|
|
||||||
Detector UDP Header
|
|
||||||
---------------------
|
|
||||||
|
|
||||||
| The UDP data format for the packets consist of a common header for all detectors, followed by the data for that one packet.
|
|
||||||
|
|
||||||
**The SLS Detector Header**
|
|
||||||
|
|
||||||
.. table:: <-------------------------------- 8 bytes -------------------------------->
|
|
||||||
:align: center
|
|
||||||
:widths: 30,30,30,30
|
|
||||||
|
|
||||||
+--------------------------------------------------------------------+
|
|
||||||
|frameNumber |
|
|
||||||
+---------------------------------+----------------------------------+
|
|
||||||
|expLength |packetNumber |
|
|
||||||
+---------------------------------+----------------------------------+
|
|
||||||
|bunchId |
|
|
||||||
+--------------------------------------------------------------------+
|
|
||||||
|timestamp |
|
|
||||||
+----------------+----------------+----------------+-----------------+
|
|
||||||
|modId |row |column |reserved |
|
|
||||||
+----------------+----------------+----------------+--------+--------+
|
|
||||||
|debug |roundRNumber |detType |version |
|
|
||||||
+---------------------------------+----------------+--------+--------+
|
|
||||||
|
|
||||||
UDP configuration in Config file
|
|
||||||
----------------------------------
|
|
||||||
|
|
||||||
#. UDP source port is hardcoded in detector server, starting at 32410.
|
|
||||||
#. **udp_dstport** : UDP destination port number. Port in receiver pc to listen to packets from the detector.
|
|
||||||
#. **udp_dstip** : IP address of UDP destination interface. IP address of interface in receiver pc to listen to packets from detector. If **auto** is used (only when using slsReceiver/ slsMultiReceiver), the IP of **rx_hostname** is picked up.
|
|
||||||
#. **udp_dstmac** : Mac address of UDP destination interface. MAC address of interface in receiver pc to list to packets from detector. Only required when using custom receiver, else slsReceiver/slsMultiReceiver picks it up from **udp_dstip**.
|
|
||||||
#. **udp_srcip** : IP address of UDP source interface. IP address of detector UDP interface to send packets from. Do not use for Eiger 1Gb interface (uses its hardware IP). For others, must be in the same subnet as **udp_dstip**.
|
|
||||||
#. **udp_srcmac** : MAC address of UDP source interface. MAC address of detector UDP interface to send packets from. Do not use for Eiger (uses hardware mac). For others, it is not necessary, but can help for switch and debugging to put unique values for each module.
|
|
||||||
|
|
||||||
|
To know more about detector receiver configuration, please check out :ref:`detector udp header and udp commands in the config file <detector udp header>`
|
||||||
|
|
||||||
Custom Receiver
|
Custom Receiver
|
||||||
----------------
|
----------------
|
||||||
|
@ -1,5 +1,14 @@
|
|||||||
Detector Servers
|
Getting Started
|
||||||
=================
|
===============
|
||||||
|
|
||||||
|
Detector Servers include:
|
||||||
|
* Control server [default port: 1952]
|
||||||
|
* Almost all client communication.
|
||||||
|
* Stop server [default port: 1953]
|
||||||
|
* Client requests for detector status, stop acquisition, temperature, advanced read/write registers.
|
||||||
|
|
||||||
|
When using a blocking acquire command (sls_detector_acquire or Detector::acquire), the control server is blocked until end of acquisition. However, stop server commands could be used in parallel.
|
||||||
|
|
||||||
|
|
||||||
Location
|
Location
|
||||||
---------
|
---------
|
||||||
@ -14,26 +23,19 @@ Arguments
|
|||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
Possible arguments are:
|
Possible arguments are:
|
||||||
-v, --version : Software version
|
-v, --version : Software version
|
||||||
-p, --port <port> : TCP communication port with client.
|
-p, --port <port> : TCP communication port with client.
|
||||||
-g, --nomodule : [Mythen3][Gotthard2] Generic or No Module mode.
|
-g, --nomodule : [Mythen3][Gotthard2]
|
||||||
Skips detector type checks.
|
Generic or No Module mode. Skips detector type checks.
|
||||||
-f, --phaseshift <value> : [Gotthard] only. Sets phase shift.
|
-f, --phaseshift <value> : [Gotthard] only. Sets phase shift.
|
||||||
-d, --devel : Developer mode. Skips firmware checks.
|
-d, --devel : Developer mode. Skips firmware checks.
|
||||||
-u, --update : Update mode. Skips firmware checks and initial detector setup.
|
-u, --update : Update mode. Skips firmware checks and initial detector setup.
|
||||||
-s, --stopserver : Stop server. Do not use as it is created by control server
|
-i, --ignore-config : [Eiger][Jungfrau][Gotthard][Gotthard2][Moench]
|
||||||
|
Ignore config file.
|
||||||
|
-m, --master <master> : [Eiger][Mythen3][Gotthard][Gotthard2]
|
||||||
Basics
|
Set Master to 0 or 1. Precedence over config file. Only for virtual servers except Eiger.
|
||||||
------------
|
-t, --top <top> : [Eiger] Set Top to 0 or 1. Precedence over config file.
|
||||||
|
-s, --stopserver : Stop server. Do not use as it is created by control server
|
||||||
Detector Servers include:
|
|
||||||
* Control server [default port: 1952]
|
|
||||||
* Almost all client communication.
|
|
||||||
* Stop server [default port: 1953]
|
|
||||||
* Client requests for detector status, stop acquisition, temperature, advanced read/write registers.
|
|
||||||
|
|
||||||
When using a blocking acquire command (sls_detector_acquire or Detector::acquire), the control server is blocked until end of acquisition. However, stop server commands could be used in parallel.
|
|
||||||
|
|
||||||
|
|
||||||
.. _Automatic start servers:
|
.. _Automatic start servers:
|
||||||
@ -90,6 +92,8 @@ One can start the on-board detector server automatically upon powering on the bo
|
|||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sync
|
sync
|
||||||
|
|
||||||
|
# physically reboot for Gotthard II or Mythen III
|
||||||
reboot
|
reboot
|
||||||
|
|
||||||
# verify
|
# verify
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.. _Detector Server Upgrade:
|
.. _Detector Server Upgrade:
|
||||||
Detector Server Upgrade
|
Upgrade
|
||||||
=======================
|
========
|
||||||
|
|
||||||
|
|
||||||
**Location:** slsDetectorPackage/serverBin/ folder for every release.
|
**Location:** slsDetectorPackage/serverBin/ folder for every release.
|
||||||
@ -14,7 +14,7 @@ Detector Server Upgrade
|
|||||||
Eiger requires a manual reboot. Or killall the servers and restart the new linked one. If you are in the process of updating firmware, then don't reboot yet.
|
Eiger requires a manual reboot. Or killall the servers and restart the new linked one. If you are in the process of updating firmware, then don't reboot yet.
|
||||||
|
|
||||||
|
|
||||||
From 6.1.1 and above (no tftp required)
|
6.1.1+ (no tftp required)
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
|
|
||||||
#. Program from console
|
#. Program from console
|
||||||
@ -60,7 +60,7 @@ Troubleshooting with tftp
|
|||||||
#. text file busy: You are trying to copy the same server.
|
#. text file busy: You are trying to copy the same server.
|
||||||
|
|
||||||
|
|
||||||
Older than 5.0.0
|
< 5.0.0
|
||||||
-----------------
|
--------
|
||||||
|
|
||||||
Please contact us.
|
Please contact us.
|
@ -86,16 +86,160 @@ Client Commands
|
|||||||
sls_detector_get -h rx_framescaught
|
sls_detector_get -h rx_framescaught
|
||||||
|
|
||||||
|
|
||||||
|
ZMQ: Json Header Format
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
|
||||||
|
**Change in field names from slsDetectorPackage v6.x.x to v7.0.0**
|
||||||
|
|
||||||
|
* detSpec1 <- bunchId
|
||||||
|
* detSpec2 <- reserved
|
||||||
|
* detSpec3 <- debug
|
||||||
|
* detSpec4 <- roundRNumber
|
||||||
|
|
||||||
|
|
||||||
|
**Format**
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
{
|
||||||
|
"jsonversion": unsigned int,
|
||||||
|
"bitmode": unsigned int,
|
||||||
|
"fileIndex": unsigned long int,
|
||||||
|
"detshape": [
|
||||||
|
unsigned int,
|
||||||
|
unsigned int
|
||||||
|
],
|
||||||
|
"shape": [
|
||||||
|
unsigned int,
|
||||||
|
unsigned int
|
||||||
|
],
|
||||||
|
"size": unsigned int,
|
||||||
|
"acqIndex": unsigned long int,
|
||||||
|
"frameIndex": unsigned long int,
|
||||||
|
"progress": double,
|
||||||
|
"fname": string,
|
||||||
|
"data": unsigned int,
|
||||||
|
"completeImage": unsigned int,
|
||||||
|
|
||||||
|
"frameNumber": unsigned long long int,
|
||||||
|
"expLength": unsigned int,
|
||||||
|
"packetNumber": unsigned int,
|
||||||
|
"detSpec1": unsigned long int,
|
||||||
|
"timestamp": unsigned long int,
|
||||||
|
"modId": unsigned int,
|
||||||
|
"row": unsigned int,
|
||||||
|
"column": unsigned int,
|
||||||
|
"detSpec2": unsigned int,
|
||||||
|
"detSpec3": unsigned int,
|
||||||
|
"detSpec4": unsigned int,
|
||||||
|
"detType": unsigned int,
|
||||||
|
"version": unsigned int,
|
||||||
|
|
||||||
|
"flipRows": unsigned int,
|
||||||
|
"quad": unsigned int,
|
||||||
|
"addJsonHeader": {
|
||||||
|
string : string
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| Field | Description |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| jsonversion | Version of the json header. |
|
||||||
|
| | Value at 4 for v6.x.x and v7.x.x |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| bitmode | Bits per pixel [4|8|16|32] |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| fileIndex | Current file acquisition index |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| detshape | Geometry of the entire detector |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| shape | Geometry of the current port streamed out |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| size | Size of image of current port in bytesout |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| acqIndex | Frame number from the detector (redundant) |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| frameIndex | Frame number of current acquisition |
|
||||||
|
| | (Starting at 0) |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| progress | Progress of current acquisition in % |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| fname | Current file name |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| data | 1 if there is data following |
|
||||||
|
| | 0 if dummy header |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| completeImage| 1 if no missing packets for this frame |
|
||||||
|
| | in this port, else 0 |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| frameNumber | Frame number |
|
||||||
|
| | [From detector udp header] |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| expLength | subframe number (32 bit eiger) |
|
||||||
|
| | or real time exposure time in 100ns (others) |
|
||||||
|
| | [From detector udp header] |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| packetNumber | Number of packets caught for that frame |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| detSpec1 | See :ref:`here<Detector Specific Fields>` |
|
||||||
|
| | [From detector udp header] |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| timestamp | Timestamp with 10 MHz clock |
|
||||||
|
| | [From detector udp header] |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| modId | Module Id |
|
||||||
|
| | [From detector udp header] |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| row | Row number in detector |
|
||||||
|
| | [From detector udp header] |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| column | Column number in detector |
|
||||||
|
| | [From detector udp header] |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| detSpec2 | See :ref:`here<Detector Specific Fields>` |
|
||||||
|
| | [From detector udp header] |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| detSpec3 | See :ref:`here<Detector Specific Fields>` |
|
||||||
|
| | [From detector udp header] |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| detSpec4 | See :ref:`here<Detector Specific Fields>` |
|
||||||
|
| | [From detector udp header] |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| detType | Detector type enum |
|
||||||
|
| detSpec3 | See :ref:`Detector enum<Detector Enum>` |
|
||||||
|
| | [From detector udp header] |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| version | Detector header version. At 2 |
|
||||||
|
| | [From detector udp header] |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| flipRows | 1 if rows should be flipped. |
|
||||||
|
| | Usually for Eiger bottom. |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| quad | 1 if its an Eiger quad. |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
| addJsonHeader| Optional custom parameters that is required |
|
||||||
|
| | for processing code. |
|
||||||
|
+--------------+----------------------------------------------+
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
File format
|
File format
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
* The file name format is [fpath]/[fname]_dx_fy_[findex].raw, where x is module index and y is file index. **fname** is file name prefix and by default "run". **fpath** is '/' by default.
|
Master file is in json format.
|
||||||
|
|
||||||
* Each acquisition will have an increasing acquisition index or findex (if file write enabled). This can be retrieved by using **findex** command.
|
The file name format is [fpath]/[fname]_dx_fy_[findex].raw, where x is module index and y is file index. **fname** is file name prefix and by default "run". **fpath** is '/' by default.
|
||||||
|
|
||||||
* Each acquisition can have multiple files (the file index number **y**), with **rx_framesperfile** being the maximum number of frames per file. The default varies for each detector type.
|
|
||||||
|
|
||||||
* Some file name examples:
|
Each acquisition will have an increasing acquisition index or findex (if file write enabled). This can be retrieved by using **findex** command.
|
||||||
|
|
||||||
|
|
||||||
|
Each acquisition can have multiple files (the file index number **y**), with **rx_framesperfile** being the maximum number of frames per file. The default varies for each detector type.
|
||||||
|
|
||||||
|
|
||||||
|
Some file name examples:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
@ -108,17 +252,21 @@ File format
|
|||||||
# second acquisition, first file
|
# second acquisition, first file
|
||||||
path-to-file/run_d0_f0_1.raw
|
path-to-file/run_d0_f0_1.raw
|
||||||
|
|
||||||
* Each acquisition will create a master file that can be enabled/disabled using **fmaster**. This should have parameters relevant to the acquisition.
|
|
||||||
|
|
||||||
* SLS Receiver Header consist of SLS Detector Header + 64 bytes of bitmask, altogether 112 bytes. The packetNumber in the sls detector header part, will be updated to number of packets caught by receiver for that frame. Furthermore, the bit mask will specify which packets have been received.
|
Each acquisition will create a master file that can be enabled/disabled using **fmaster**. This should have parameters relevant to the acquisition.
|
||||||
|
|
||||||
|
|
||||||
|
SLS Receiver Header consist of SLS Detector Header + 64 bytes of bitmask, altogether 112 bytes. The packetNumber in the sls detector header part, will be updated to number of packets caught by receiver for that frame. Furthermore, the bit mask will specify which packets have been received.
|
||||||
|
|
||||||
**Binary file format**
|
**Binary file format**
|
||||||
|
|
||||||
* This is the default file format.
|
This is the default file format.
|
||||||
|
|
||||||
* Each data file will consist of frames, each consisting of slsReceiver Header followed by data for 1 frame.
|
|
||||||
|
|
||||||
* Master file is of ASCII format and will also include the format of the slsReceiver Header.
|
Each data file will consist of frames, each consisting of slsReceiver Header followed by data for 1 frame.
|
||||||
|
|
||||||
|
|
||||||
|
Master file is of ASCII format and will also include the format of the slsReceiver Header.
|
||||||
|
|
||||||
|
|
||||||
**HDF5 file formats**
|
**HDF5 file formats**
|
||||||
@ -160,7 +308,7 @@ When handling callbacks, the control should be returned as soon as possible, to
|
|||||||
**Example**
|
**Example**
|
||||||
* `main cpp file <https://github.com/slsdetectorgroup/api-examples/blob/master/e4-receiver_callbacks.cpp>`_
|
* `main cpp file <https://github.com/slsdetectorgroup/api-examples/blob/master/e4-receiver_callbacks.cpp>`_
|
||||||
* `cmake file <https://github.com/slsdetectorgroup/api-examples/blob/master/CMakeLists.txt>`_.
|
* `cmake file <https://github.com/slsdetectorgroup/api-examples/blob/master/CMakeLists.txt>`_.
|
||||||
* how to install the slsDetectorPackage is provided :ref:`here <build from source using cmake>`.
|
* how to install the slsDetectorPackage with cmake is provided :ref:`here <build from source using cmake>`.
|
||||||
* compile the example **e4-rxr** by:
|
* compile the example **e4-rxr** by:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
@ -8,21 +8,24 @@ open an issue at our `github repo issues
|
|||||||
Common
|
Common
|
||||||
------
|
------
|
||||||
|
|
||||||
Missing Packets
|
|
||||||
^^^^^^^^^^^^^^^
|
|
||||||
Possible causes could be the following:
|
|
||||||
|
|
||||||
#. Receiver PC is not tuned for socket buffer size and input packet queue.
|
1. Total Failure of Packet Delivery
|
||||||
* Refer to :ref:`Increase rmem_default, rmem_max and max_backlog<Receiver PC Tuning>`
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
#. Wiring
|
#. Data cable plugged into the wrong interface on board (Jungfrau)
|
||||||
* Faulty wiring or connecting cable to incorrect interface.
|
* Please ensure that the data cable is plugged into the rightmost interface (default for single interface). The inner one is disabled for PCB v1.0 and must be selected via command for PCB v2.0.
|
||||||
|
|
||||||
#. Link up and speed
|
#. Link up and speed
|
||||||
* Check to see if there is a blue LED on board to signal that the link is up. Check ethtool and find if Link Deteced:Yes and Speed is acceptable (>10k).
|
* Check ethtool and find if Link Deteced:Yes and Speed is acceptable (>10k).
|
||||||
|
* Check to see if the 10G link is up (blue or red LED on board, close to SFP+). If not:
|
||||||
|
|
||||||
|
* Check transeiver and fibers are compatible (all MMF 850nm or all SMF 1030nm)
|
||||||
|
* Check fiber
|
||||||
|
* Check fiber polarity (if short range, unplug the link anywhere, and look at the light/dark pattern: dark has to mate with light)
|
||||||
|
|
||||||
#. Detector is not acquiring (Not Eiger)
|
#. Detector is not acquiring (Not Eiger)
|
||||||
* Take an acquisition with many images and using the following steps instead of acquire:
|
* Take an acquisition with many images and using the following steps instead of acquire:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sls_detector_put status start
|
sls_detector_put status start
|
||||||
@ -30,37 +33,63 @@ Possible causes could be the following:
|
|||||||
# which means the detector is acquiring.
|
# which means the detector is acquiring.
|
||||||
sls_detector_get framesl
|
sls_detector_get framesl
|
||||||
|
|
||||||
.. note ::
|
# If you are using multiple modules, the previous command can return -1 because each module will return different values. Then, check for a single module instead: sls_detector_get 0:framesl
|
||||||
|
|
||||||
If you are using multiple modules, the previous command can return -1 because each module will return different values. Then, check for a single module instead: sls_detector_get 0:framesl
|
|
||||||
|
|
||||||
#. Data cable plugged into the wrong interface on board (Jungfrau)
|
#. Detector is not sending data (Except Eiger)
|
||||||
* Please ensure that the data cable is plugged into the rightmost interface. The middle one is disabled for PCB v1.0 and must be selected via command for PCB v2.0.
|
* Check the board to see if the green LED close to SFP is blinking (detector is sending data). If not, detector is not operated properly (period too short/long, no trigger in trigger mode) or misconfigured and needs reboot.
|
||||||
|
|
||||||
#. Detector is not sending data
|
#. Power supply
|
||||||
* Check the board to see if the green LED is blinking next to the data cable, which means that the detector is sending data.
|
* Check if power supply has enough current.
|
||||||
|
* For Jungfrau, refer to :ref:`Jungfrau Power Supply Troubleshooting<Jungfrau Troubleshooting Power Supply>`.
|
||||||
#. Firewall or security feature
|
|
||||||
* A firewall or some security feature could be blocking the reception of data.
|
|
||||||
|
|
||||||
#. Ethernet interface not configured properly
|
|
||||||
* Ensure that the interfaces used are configured properly with the right mask and ip. Eg. use ifconfig and route commands to verify.
|
|
||||||
|
|
||||||
#. Ethernet interface not configured for Jumbo frames (10Gb)
|
#. Ethernet interface not configured for Jumbo frames (10Gb)
|
||||||
* Ensure that the interfaces used in receiver pc have MTU 9000 (jumbo frames) enabled.
|
* Ensure that the interfaces (on NIC and the switch) used in receiver pc have MTU 9000 (jumbo frames) enabled.
|
||||||
|
|
||||||
#. Detector IP (Not Eiger)
|
|
||||||
* Ensure it is valid and does not end if 0 or 255. Also ensure that the detector ip is in the same subnet as rx_udpip and the masking in the interface configuration ensures this rule.
|
|
||||||
|
|
||||||
#. Tcpdump or wireshark
|
#. Check if 'rx_frames' counter in 'ifconfig' do not increment for interface.
|
||||||
|
* If no, check switch configuration if present. Port counters of switch can also help to identify problem.
|
||||||
|
* If yes, but receiver software does not see it:
|
||||||
|
|
||||||
|
* Check no firewall (eg. firewalld) is present or add rules
|
||||||
|
* Check that selinux is disabled ( or add rules)
|
||||||
|
|
||||||
|
#. Source UDP IP in config file (Not Eiger)
|
||||||
|
* Ensure it is valid and does not end if 0 or 255. Also ensure that the source ip 'udp_srcip' is in the same subnet as destination ip 'udp_dstip' and the masking in the interface configuration ensures this rule.
|
||||||
|
* Eg. If interface IP is 102.10.10.110 and mask is 255.255.255.0, udp_srcip has to be 102.10.10.xxx (same subnet)
|
||||||
|
* Use ifconfig and route commands to verify etheret interface configuration
|
||||||
|
|
||||||
|
|
||||||
|
#. Netstat and netcat
|
||||||
|
* Try with netstat to see if its really listening to the right interface. Or netcat to see if you get packets.
|
||||||
|
|
||||||
|
#. Wireshark or Tcpdump
|
||||||
* Use one of these to confirm that you receive packets (with the right filtering ie. source and destination ports, ip).
|
* Use one of these to confirm that you receive packets (with the right filtering ie. source and destination ports, ip).
|
||||||
|
|
||||||
#. Check SFP modules
|
|
||||||
* Check if the SFP modules on both sides of the fiber are of same type.
|
|
||||||
|
2. Partial or Random Packet Loss (Performance)
|
||||||
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. note ::
|
||||||
|
|
||||||
|
The following suggestions are for convenience. Please do not follow blindly, research each parameter and adapt it to your system.
|
||||||
|
|
||||||
|
#. Receiver PC is not tuned for socket buffer size and input packet queue or other parameters.
|
||||||
|
* Refer to :ref:`Receiver PC Tuning<Receiver PC Tuning>`
|
||||||
|
|
||||||
|
#. Wiring
|
||||||
|
* Faulty wiring or connecting cable to incorrect interface.
|
||||||
|
|
||||||
|
|
||||||
#. Pinging the subnet (receiving only a few number of packets each time)
|
#. Pinging the subnet (receiving only a few number of packets each time)
|
||||||
* If a switch is used between a receiver pc and detector instead of plugging the cables directly, one might have to ping any ip in the subnet of the Ethernet interface constantly so that it does not forget the ip during operation.
|
* If a switch is used between a receiver pc and detector instead of plugging the cables directly, one might have to ping any ip in the subnet of the Ethernet interface constantly so that it does not forget the ip during operation.
|
||||||
* Eg. if rx_udpip is 10.2.3.100, then ping constantly 10.2.3.xxx, where xxx is any ip other than 100.
|
* Eg. if rx_udpip is 10.2.3.100, then ping constantly 10.2.3.xxx, where xxx is any ip other than 100.
|
||||||
|
* Using slsReceiver, you can use a command that does this for you:
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# arping the interface in a separate thread every minute
|
||||||
|
sls_detector_put rx_arping 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -68,6 +97,12 @@ Possible causes could be the following:
|
|||||||
|
|
||||||
Receiver PC Tuning Options
|
Receiver PC Tuning Options
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
|
.. note ::
|
||||||
|
|
||||||
|
| xth1 is example interface name in the following examples.
|
||||||
|
| These settings are lost at pc reboot.
|
||||||
|
|
||||||
#. Increase maximum receive socket buffer size and socket input packet queue.
|
#. Increase maximum receive socket buffer size and socket input packet queue.
|
||||||
* Temporarily (until shut down)
|
* Temporarily (until shut down)
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
@ -111,6 +146,7 @@ Receiver PC Tuning Options
|
|||||||
# check how many GB memory you can allocate, to avoid swapping otherwise
|
# check how many GB memory you can allocate, to avoid swapping otherwise
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#. Modify ethtool settings.
|
#. Modify ethtool settings.
|
||||||
* rx ring parameters
|
* rx ring parameters
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
@ -127,6 +163,9 @@ Receiver PC Tuning Options
|
|||||||
# check
|
# check
|
||||||
ethtool -c xth1
|
ethtool -c xth1
|
||||||
|
|
||||||
|
# enable adaptive xoalescence parameters
|
||||||
|
ethtool -C xth1 adaptive-rx on
|
||||||
|
|
||||||
# set to max value in your pc settings
|
# set to max value in your pc settings
|
||||||
ethtool -C xth1 rx-usecs 100
|
ethtool -C xth1 rx-usecs 100
|
||||||
|
|
||||||
@ -139,10 +178,42 @@ Receiver PC Tuning Options
|
|||||||
# set to max value in your pc settings
|
# set to max value in your pc settings
|
||||||
ethtool -A xth1 rx on
|
ethtool -A xth1 rx on
|
||||||
|
|
||||||
.. note ::
|
* generic receiver offload (might not always work)
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
| xth1 is example interface name.
|
# check
|
||||||
| These settings are lost at pc reboot.
|
ethtool -k xth1
|
||||||
|
|
||||||
|
# enable generic receiver offload
|
||||||
|
ethtool -K xth1 gro
|
||||||
|
|
||||||
|
|
||||||
|
#. Disable power saving in CPU frequency scaling and set system to performance
|
||||||
|
* Check current policy (default might be powersave or schedutil)
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# check current active governor and range of cpu freq policy
|
||||||
|
cpupower frequency-info --policy
|
||||||
|
# list all available governors for this kernel
|
||||||
|
cpupower frequency-info --governors
|
||||||
|
|
||||||
|
* Temporarily (until shut down)
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# set to performance
|
||||||
|
sudo cpupower frequency-set -g performance
|
||||||
|
|
||||||
|
# or
|
||||||
|
cpufreq-info
|
||||||
|
for i in ‘seq 0 7‘; do cpufreq-set -c $i -g performance; done
|
||||||
|
|
||||||
|
* Permanently
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# edit /etc/sysconfig/cpupower to preference
|
||||||
|
|
||||||
|
# enable or disable permanently
|
||||||
|
sudo systemctl enable cpupower
|
||||||
|
|
||||||
#. Give user speicific user scheduling privileges.
|
#. Give user speicific user scheduling privileges.
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
@ -155,18 +226,29 @@ Receiver PC Tuning Options
|
|||||||
|
|
||||||
This is also set if slsReceiver is run as root user.
|
This is also set if slsReceiver is run as root user.
|
||||||
|
|
||||||
|
#. Some more advanced options:
|
||||||
|
.. warning ::
|
||||||
|
|
||||||
#. Disable power saving in CPU frequency
|
Please do not try if you do not understand
|
||||||
.. code-block:: bash
|
|
||||||
|
|
||||||
# or similar command depending on your distribution
|
#. reduce the number of queue per NIC to the number of expected streams: ethtool -L xth0 combined 2
|
||||||
cpupower frequency-info
|
#. assign each queue to its stream: ethtool -U xth0 flow-type tcp4 dst-port 50004 action 1
|
||||||
cpupower frequency-set -g performance
|
#. assign to each queue (IRQ) one CPU on the right socket: echo "3"> /proc/irq/47/smp_affinity_list #change the numbers looking at /proc/interrupts
|
||||||
|
#. disable irqbalance service
|
||||||
|
#. Be sure that the switch knows the receiver mac address. Most switches reset the mac lists every few minutes, and since the receiver only receives, there is not a periodic refresh of the mac list. In this case, one can set a fixed mac list in the switch, or setup some kind of script arping or pinging out from that interface (will be available in 7.0.0).
|
||||||
|
#. assign the receiver numa node (also with -m) to the socket where the NIC is attached. To know it, cat /sys/class/net/ethxxx/device/numa_node
|
||||||
|
#. ensure file system performance can handle sustained high data rate:
|
||||||
|
|
||||||
# or
|
* One can use dd:
|
||||||
cpufreq-info
|
|
||||||
for i in ‘seq 0 7‘; do cpufreq-set -c $i -g performance; done
|
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
dd if=/dev/zero of=/testpath/testfile bs=1M count=100000
|
||||||
|
* Or better fio (which needs to be installed)
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
fio --name=global –directory=/testpath/ --rw=write --ioengine=libaio --direct=0 --size=200G -- numjobs=2 --iodepth=1 --bs=1M –name=job
|
||||||
|
|
||||||
slsReceiver Tuning
|
slsReceiver Tuning
|
||||||
^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^
|
||||||
@ -174,18 +256,25 @@ slsReceiver Tuning
|
|||||||
#. Starting receiver as root to have scheduling privileges.
|
#. Starting receiver as root to have scheduling privileges.
|
||||||
|
|
||||||
#. For 10g, enable flow control
|
#. For 10g, enable flow control
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sls_detector_put flowcontrol10g 1
|
sls_detector_put flowcontrol10g 1
|
||||||
|
|
||||||
#. Increase slsReceiver fifo depth between listening and processing threads.
|
#. Increase slsReceiver ring buffer depth
|
||||||
|
This can be tuned depending on the number of receivers (modules) and memory available.
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sls_detector_get rx_fifodepth
|
# sugggested not to use more than half memory of CPU socket in case of NUMA systems) for this
|
||||||
# sets number of frames in fifo to 5000
|
|
||||||
sls_detector_put rx_fifodepth 5000
|
sls_detector_get rx_fifodepth
|
||||||
|
# sets number of frames in fifo to 1024 ~1GB per receiver. Default is 2500
|
||||||
|
sls_detector_put rx_fifodepth 1024
|
||||||
|
|
||||||
|
#. Increase number of frames per file
|
||||||
|
This can reduce time taken to open and close files.
|
||||||
|
|
||||||
#. Increase number of frames per file to reduce time taken to open and close files.
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
sls_detector_get rx_framesperfile
|
sls_detector_get rx_framesperfile
|
||||||
@ -193,10 +282,31 @@ slsReceiver Tuning
|
|||||||
# writes all frames into a single file
|
# writes all frames into a single file
|
||||||
sls_detector_put rx_framesperfile 0
|
sls_detector_put rx_framesperfile 0
|
||||||
|
|
||||||
|
#. Disable file write
|
||||||
|
This can ensure it is not the file system performance hampering high date rate.
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
sls_detector_put fwrite 0
|
||||||
|
|
||||||
|
|
||||||
Shared memory error
|
Shared memory error
|
||||||
^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^
|
||||||
| For errors due to access or size, delete shared memory files nd try again.
|
For errors due to access or size, use any of the following suggestions.
|
||||||
|
#. Delete shared memory files and try again
|
||||||
|
#. Use environment variable to use a different shared memory ending in jfxx
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
# shared memory ending in jfxx
|
||||||
|
export SLSDETNAME=jfxx
|
||||||
|
|
||||||
|
#. USe a different multi shared memory ID
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
sls_detector_put 2-config xxxx.config
|
||||||
|
# or
|
||||||
|
sls_detector_put 2-hostname bchipxxx
|
||||||
|
|
||||||
To list all shared memory files of sls detector package.
|
To list all shared memory files of sls detector package.
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
@ -307,6 +417,7 @@ Cannot get multi module data
|
|||||||
|
|
||||||
#. Check :ref:`Common Multi Module Troubleshooting<common troubleshooting multi module data>`
|
#. Check :ref:`Common Multi Module Troubleshooting<common troubleshooting multi module data>`
|
||||||
#. Power Supply
|
#. Power Supply
|
||||||
|
* Jungfrau needs a ~4A per module for a short time at startup. If not, it reboots misconfigured.
|
||||||
* Comment out this line in the config file: powerchip 1
|
* Comment out this line in the config file: powerchip 1
|
||||||
* Powering on the chip increases the power consumption by a considerable amount. If commenting out this line aids in getting data (strange data due to powered off chip), then it could be the power supply current limit. Fix it (possibly to 8A current limit) and uncomment the powerchip line back in config file.
|
* Powering on the chip increases the power consumption by a considerable amount. If commenting out this line aids in getting data (strange data due to powered off chip), then it could be the power supply current limit. Fix it (possibly to 8A current limit) and uncomment the powerchip line back in config file.
|
||||||
|
|
||||||
|
37
docs/src/udpconfig.rst
Normal file
37
docs/src/udpconfig.rst
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
.. _detector udp header:
|
||||||
|
|
||||||
|
|
||||||
|
Config file
|
||||||
|
============
|
||||||
|
|
||||||
|
Commands to configure the UDP in the config file:
|
||||||
|
|
||||||
|
.. note ::
|
||||||
|
|
||||||
|
These command are recommended to be placed before "rx_hostname" if it is used.
|
||||||
|
|
||||||
|
Source Port
|
||||||
|
-----------
|
||||||
|
Hardcoded in detector server, starting at 32410.
|
||||||
|
|
||||||
|
udp_srcip - Source IP
|
||||||
|
---------------------
|
||||||
|
IP address of detector UDP interface to send packets from. Do not use for Eiger 1Gb interface (uses its hardware IP). For others, must be in the same subnet as **udp_dstip**.
|
||||||
|
|
||||||
|
udp_srcmac - Source MAC
|
||||||
|
-----------------------
|
||||||
|
MAC address of detector UDP interface to send packets from. Do not use for Eiger (uses hardware mac). For others, it is not necessary, but can help for switch and debugging to put unique values for each module.
|
||||||
|
|
||||||
|
|
||||||
|
udp_dstport - Desintation Port
|
||||||
|
-------------------------------
|
||||||
|
Port in receiver pc to listen to packets from the detector.
|
||||||
|
|
||||||
|
udp_dstip - Destination IP
|
||||||
|
--------------------------
|
||||||
|
IP address of interface in receiver pc to listen to packets from detector. If **auto** is used (only when using slsReceiver/ slsMultiReceiver), the IP of **rx_hostname** is picked up.
|
||||||
|
|
||||||
|
udp_dstmac - Destination MAC
|
||||||
|
----------------------------
|
||||||
|
MAC address of interface in receiver pc to list to packets from detector. Only required when using custom receiver, else slsReceiver/slsMultiReceiver picks it up from **udp_dstip**.
|
||||||
|
|
152
docs/src/udpdetspec.rst
Normal file
152
docs/src/udpdetspec.rst
Normal file
@ -0,0 +1,152 @@
|
|||||||
|
.. _detector specific fields:
|
||||||
|
|
||||||
|
Detector Specific Fields
|
||||||
|
========================
|
||||||
|
|
||||||
|
Please check out :ref:`the current detector header <detector udp header>` to see
|
||||||
|
where the detector specific fields are placed.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Eiger
|
||||||
|
------
|
||||||
|
|
||||||
|
.. table:: Detector Specific Field
|
||||||
|
|
||||||
|
+----------+------------------------------+
|
||||||
|
| expLength| Sub Frame Number |
|
||||||
|
+----------+------------------------------+
|
||||||
|
| detSpec1 | 0x0 |
|
||||||
|
+----------+------------------------------+
|
||||||
|
| detSpec2 | 0x0 |
|
||||||
|
+----------+------------------------------+
|
||||||
|
| detSpec3 | e14a |
|
||||||
|
+----------+------------------------------+
|
||||||
|
| detSpec4 | Round Robin Interface Number |
|
||||||
|
+----------+------------------------------+
|
||||||
|
|
||||||
|
|
||||||
|
Jungfrau
|
||||||
|
---------
|
||||||
|
|
||||||
|
.. table:: Detector Specific Field
|
||||||
|
|
||||||
|
+----------+------------------------------+
|
||||||
|
| detSpec1 | Bunch Id [#]_ |
|
||||||
|
+----------+------------------------------+
|
||||||
|
| detSpec2 | 0 |
|
||||||
|
+----------+------------------------------+
|
||||||
|
| detSpec3 | DAQ info |
|
||||||
|
+----------+------------------------------+
|
||||||
|
| detSpec4 | 0 |
|
||||||
|
+----------+------------------------------+
|
||||||
|
|
||||||
|
|
||||||
|
.. table:: DAQ Info Field
|
||||||
|
|
||||||
|
+----------+--------------------+----------------------------------------------+
|
||||||
|
| Bits | Name | Description |
|
||||||
|
+----------+--------------------+-----+----------------------------------------+
|
||||||
|
| 0 | High gain | 1 | High Gain enabled |
|
||||||
|
| | +-----+----------------------------------------+
|
||||||
|
| | | 0 | High Gain disabled |
|
||||||
|
+----------+--------------------+-----+----------------------------------------+
|
||||||
|
| 1 | Fix gain stage 1 | 1 | Gain stage 1 fixed. The switch that |
|
||||||
|
| | | | selects the gains stage 1 is active all|
|
||||||
|
| | | | the time. |
|
||||||
|
| | +-----+----------------------------------------+
|
||||||
|
| | | 0 | Gain stage 1 unset. The switch that |
|
||||||
|
| | | | selects the gains stage 1 is inactive |
|
||||||
|
| | | | all the time. |
|
||||||
|
+----------+--------------------+-----+----------------------------------------+
|
||||||
|
| 2 | Fix gain stage 2 | 1 | Gain stage 2 fixed. The switch that |
|
||||||
|
| | | | selects the gains stage 2 is active all|
|
||||||
|
| | | | the time. |
|
||||||
|
| | +-----+----------------------------------------+
|
||||||
|
| | | 0 | Gain stage 2 unset. The switch that |
|
||||||
|
| | | | selects the gains stage 2 is inactive |
|
||||||
|
| | | | all the time. |
|
||||||
|
+----------+--------------------+-----+----------------------------------------+
|
||||||
|
| 4 | Comparator reset | 1 | On-chip comparator in reset state. |
|
||||||
|
| | | | Dynamic-gain switching is therefore |
|
||||||
|
| | | | disabled. |
|
||||||
|
| | +-----+----------------------------------------+
|
||||||
|
| | | 0 | On-chip comparator active. |
|
||||||
|
+----------+--------------------+-----+-----+-----+----------------------------+
|
||||||
|
| 7-5 | Jungfrau chip |Bit 7|Bit 6|Bit 5| Description |
|
||||||
|
| | version +-----+-----+-----+----------------------------+
|
||||||
|
| | | 0 | 0 | 0 | v1.0 |
|
||||||
|
| | +-----+-----+-----+----------------------------+
|
||||||
|
| | | 0 | 0 | 1 | v1.1 |
|
||||||
|
| | +-----+-----+-----+----------------------------+
|
||||||
|
| | | 0 | 1 | X | Reserved |
|
||||||
|
| | +-----+-----+-----+----------------------------+
|
||||||
|
| | | 1 | X | X | Reserved |
|
||||||
|
+----------+--------------------+-----+-----+-----+----------------------------+
|
||||||
|
| 11-8 | Storage cell select|Storage cell used for this exposure. This |
|
||||||
|
| | |field defines the storage cell that was used |
|
||||||
|
| | |to acquire the data of this frame |
|
||||||
|
+----------+--------------------+-----+----------------------------------------+
|
||||||
|
| 12 | Force switching | 1 | Forced switching to gain stage 1 at the|
|
||||||
|
| | to gain stage 1 | | start of the exposure period. |
|
||||||
|
| | +-----+----------------------------------------+
|
||||||
|
| | | 0 | Disabled forced gain switching to gain |
|
||||||
|
| | | | stage 1. Dynamic gain switching |
|
||||||
|
| | | | conditions apply. |
|
||||||
|
+----------+--------------------+-----+----------------------------------------+
|
||||||
|
| 13 | Force switching | 1 | Forced switching to gain stage 2 at the|
|
||||||
|
| | to gain stage 2 | | start of the exposure period. |
|
||||||
|
| | +-----+----------------------------------------+
|
||||||
|
| | | 0 | Disabled forced gain switching to gain |
|
||||||
|
| | | | stage 2. Dynamic gain switching |
|
||||||
|
| | | | conditions apply. |
|
||||||
|
+----------+--------------------+-----+-----+-----+----------------------------+
|
||||||
|
| 23-16 | 10-Gigabit event |The 8-bit event code contains value of the |
|
||||||
|
| | code |event received over the 10 GbE interface by |
|
||||||
|
| | |JUNGFRAU detector at the moment of the frame |
|
||||||
|
| | |acquisition. |
|
||||||
|
+----------+--------------------+-----+----------------------------------------+
|
||||||
|
| 31 | External input flag| 1 | External input flag detected in the |
|
||||||
|
| | | | last exposure. |
|
||||||
|
| | +-----+----------------------------------------+
|
||||||
|
| | | 0 | External input flag not detected in the|
|
||||||
|
| | | | last exposure. |
|
||||||
|
+----------+--------------------+-----+----------------------------------------+
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Gotthard2
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. table:: Detector Specific Field
|
||||||
|
|
||||||
|
+----------+------------------------------+
|
||||||
|
| detSpec1 | Train Id [#]_ |
|
||||||
|
+----------+------------------------------+
|
||||||
|
| detSpec2 | Bunch Id [#]_ |
|
||||||
|
+----------+------------------------------+
|
||||||
|
| detSpec3 | 0 |
|
||||||
|
+----------+------------------------------+
|
||||||
|
| detSpec4 | 0 |
|
||||||
|
+----------+------------------------------+
|
||||||
|
|
||||||
|
|
||||||
|
Mythen3
|
||||||
|
----------
|
||||||
|
|
||||||
|
.. table:: Detector Specific Field
|
||||||
|
|
||||||
|
+----------+------------------------------+
|
||||||
|
| detSpec1 | 0 |
|
||||||
|
+----------+------------------------------+
|
||||||
|
| detSpec2 | 0 |
|
||||||
|
+----------+------------------------------+
|
||||||
|
| detSpec3 | 0 |
|
||||||
|
+----------+------------------------------+
|
||||||
|
| detSpec4 | 0 |
|
||||||
|
+----------+------------------------------+
|
||||||
|
|
||||||
|
|
||||||
|
.. [#] **Bunch Id**: bunch identification number received by the detector at the moment of frame acquisition.
|
||||||
|
.. [#] **Train Id**: train identification number received by the detector at the moment of frame acquisition.
|
||||||
|
.. [#] **Bunch Id**: bunch identification number to identify every single exposure during a burst acquisition.
|
125
docs/src/udpheader.rst
Normal file
125
docs/src/udpheader.rst
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
.. _detector udp header:
|
||||||
|
|
||||||
|
Format
|
||||||
|
=======
|
||||||
|
|
||||||
|
The UDP data format for the packets consist of a common header for all detectors, followed by the data for that one packet.
|
||||||
|
|
||||||
|
|
||||||
|
Current Version
|
||||||
|
---------------------------
|
||||||
|
|
||||||
|
**v2.0 (slsDetectorPackage v7.0.0+)**
|
||||||
|
|
||||||
|
.. table:: <---------------------------------------------------- 8 bytes ---------------------------------------------------->
|
||||||
|
:align: center
|
||||||
|
:widths: 30,30,30,15,15
|
||||||
|
|
||||||
|
+---------------------------------------------------------------+
|
||||||
|
| frameNumber |
|
||||||
|
+-------------------------------+-------------------------------+
|
||||||
|
| expLength | packetNumber |
|
||||||
|
+-------------------------------+-------------------------------+
|
||||||
|
| **detSpec1** |
|
||||||
|
+---------------------------------------------------------------+
|
||||||
|
| timestamp |
|
||||||
|
+---------------+---------------+---------------+---------------+
|
||||||
|
| modId | row | column | **detSpec2** |
|
||||||
|
+---------------+---------------+---------------+-------+-------+
|
||||||
|
| **detSpec3** | **detSpec4** |detType|version|
|
||||||
|
+-------------------------------+---------------+-------+-------+
|
||||||
|
|
||||||
|
|
||||||
|
.. note ::
|
||||||
|
|
||||||
|
Since there is no difference in the format of the UDP header from the detector
|
||||||
|
from the previous version (v2.0), the version number stays the same.
|
||||||
|
|
||||||
|
Only the struture member names have changed in sls_detector_defs.h
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Description
|
||||||
|
------------
|
||||||
|
|
||||||
|
* **Detector specific field** descriptions are found :ref:`here<detector specific fields>`.
|
||||||
|
|
||||||
|
* **frameNumber**: framenumber to which the current packet belongs to.
|
||||||
|
|
||||||
|
* **expLength**: measured exposure time of the frame in tenths of microsecond. It is instead the sub frame number for Eiger.
|
||||||
|
|
||||||
|
* **packetNumber**: packet number of the frame to which the current data belongs to.
|
||||||
|
|
||||||
|
* **timestamp**: time measured at the start of frame exposure since the start of the current measurement. It is expressed in tenths of microsecond.
|
||||||
|
|
||||||
|
* **modId**: module ID picked up from det_id_[detector type].txt on the detector cpu.
|
||||||
|
|
||||||
|
* **row**: row position of the module in the detector system. It is calculated by the order of the module in hostname command, as well as the detsize command.
|
||||||
|
|
||||||
|
* **column**: column position of the module in the detector system. It is calculated by the order of the module in hostname command, as well as the detsize command.
|
||||||
|
|
||||||
|
* **detType**: detector type from enum of detectorType in the package.
|
||||||
|
|
||||||
|
* **version**: current version of the detector header (0x2).
|
||||||
|
|
||||||
|
|
||||||
|
Detector Enum
|
||||||
|
--------------
|
||||||
|
|
||||||
|
================ ========
|
||||||
|
Detector Type Value
|
||||||
|
================ ========
|
||||||
|
GENERIC 0
|
||||||
|
EIGER 1
|
||||||
|
GOTTHARD 2
|
||||||
|
JUNGFRAU 3
|
||||||
|
CHIPTESTBOARD 4
|
||||||
|
MOENCH 5
|
||||||
|
MYTHEN3 6
|
||||||
|
GOTTHARD2 7
|
||||||
|
================ ========
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Previous Versions
|
||||||
|
-----------------
|
||||||
|
**v2.0 (Package v4.0.0 - 6.x.x)**
|
||||||
|
|
||||||
|
.. table:: <---------------------------------------------------- 8 bytes ---------------------------------------------------->
|
||||||
|
:align: center
|
||||||
|
:widths: 30,30,30,15,15
|
||||||
|
|
||||||
|
+---------------------------------------------------------------+
|
||||||
|
| frameNumber |
|
||||||
|
+-------------------------------+-------------------------------+
|
||||||
|
| expLength | packetNumber |
|
||||||
|
+-------------------------------+-------------------------------+
|
||||||
|
| bunchid |
|
||||||
|
+---------------------------------------------------------------+
|
||||||
|
| timestamp |
|
||||||
|
+---------------+---------------+---------------+---------------+
|
||||||
|
| modId | **row** | **column** | **reserved** |
|
||||||
|
+---------------+---------------+---------------+-------+-------+
|
||||||
|
| debug | roundRNumber |detType|version|
|
||||||
|
+-------------------------------+---------------+-------+-------+
|
||||||
|
|
||||||
|
**v1.0 (Package v3.0.0 - 3.1.5)**
|
||||||
|
|
||||||
|
.. table:: <---------------------------------------------------- 8 bytes ---------------------------------------------------->
|
||||||
|
:align: center
|
||||||
|
:widths: 30,30,30,15,15
|
||||||
|
|
||||||
|
+---------------------------------------------------------------+
|
||||||
|
| frameNumber |
|
||||||
|
+-------------------------------+-------------------------------+
|
||||||
|
| expLength | packetNumber |
|
||||||
|
+-------------------------------+-------------------------------+
|
||||||
|
| bunchid |
|
||||||
|
+---------------------------------------------------------------+
|
||||||
|
| timestamp |
|
||||||
|
+---------------+---------------+---------------+---------------+
|
||||||
|
| modId | xCoord | yCoord | zCoord |
|
||||||
|
+---------------+---------------+---------------+-------+-------+
|
||||||
|
| debug | roundRNumber |detType|version|
|
||||||
|
+-------------------------------+---------------+-------+-------+
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
.. _Virtual Detector Servers:
|
.. _Virtual Detector Servers:
|
||||||
Detector Simulators
|
Simulators
|
||||||
===================
|
===========
|
||||||
|
|
||||||
Compilation
|
Compilation
|
||||||
-----------
|
-----------
|
||||||
@ -13,16 +13,14 @@ Compilation
|
|||||||
* Using cmk.sh script,
|
* Using cmk.sh script,
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
./cmk.sh -bsj9 #option s is for simulator
|
./cmk.sh -bsj9 # option -s is for simulator
|
||||||
|
|
||||||
|
|
||||||
Binaries
|
Binaries
|
||||||
^^^^^^^^
|
^^^^^^^^
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
eigerDetectorServerMaster_virtual
|
eigerDetectorServer_virtual
|
||||||
eigerDetectorServerSlaveTop_virtual
|
|
||||||
eigerDetectorServerSlaveBottom_virtual
|
|
||||||
jungfrauDetectorServer_virtual
|
jungfrauDetectorServer_virtual
|
||||||
gotthardDetectorServer_virtual
|
gotthardDetectorServer_virtual
|
||||||
gotthard2DetectorServer_virtual
|
gotthard2DetectorServer_virtual
|
||||||
@ -67,7 +65,15 @@ Sample Config file
|
|||||||
^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^
|
||||||
There are sample config files for each detector in slsDetectorPackage/examples folder.
|
There are sample config files for each detector in slsDetectorPackage/examples folder.
|
||||||
|
|
||||||
For a Single Module
|
For a Single Module (Basic)
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
hostname localhost
|
||||||
|
rx_hostname localhost
|
||||||
|
udp_dstip auto
|
||||||
|
|
||||||
|
|
||||||
|
For a Single Module (With Options)
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
# connects to control port 1912
|
# connects to control port 1912
|
||||||
@ -140,7 +146,7 @@ Gui
|
|||||||
Limitations
|
Limitations
|
||||||
-----------
|
-----------
|
||||||
|
|
||||||
#. Data coming out of virtual server is fake. Value at each pixel/ channel is incremented by 1.
|
#. Data coming out of virtual server is fake.
|
||||||
|
|
||||||
#. A stop will stop the virtual acquisition only at the start of every new frame.
|
#. A stop will stop the virtual acquisition only at the start of every new frame.
|
||||||
|
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
|
||||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
|
||||||
GITREPO1='git remote -v'
|
|
||||||
GITREPO2=" | grep \"fetch\" | cut -d' ' -f1"
|
|
||||||
BRANCH1='git branch -v'
|
|
||||||
BRANCH2=" | grep '*' | cut -d' ' -f2"
|
|
||||||
REPUID1='git log --pretty=format:"%H" -1'
|
|
||||||
AUTH1_1='git log --pretty=format:"%cn" -1'
|
|
||||||
AUTH1_2=" | cut -d' ' -f1"
|
|
||||||
AUTH2_1='git log --pretty=format:"%cn" -1'
|
|
||||||
AUTH2_2=" | cut -d' ' -f2"
|
|
||||||
FOLDERREV1='git log --oneline . ' #used for all the individual server folders
|
|
||||||
FOLDERREV2=" | wc -l" #used for all the individual server folders
|
|
||||||
REV1='git log --oneline '
|
|
||||||
REV2=" | wc -l"
|
|
||||||
|
|
||||||
GITREPO=`eval $GITREPO1 $GITREPO2`
|
|
||||||
BRANCH=`eval $BRANCH1 $BRANCH2`
|
|
||||||
REPUID=`eval $REPUID1`
|
|
||||||
AUTH1=`eval $AUTH1_1 $AUTH1_2`
|
|
||||||
AUTH2=`eval $AUTH2_1 $AUTH2_2`
|
|
||||||
REV=`eval $REV1 $REV2`
|
|
||||||
FOLDERREV=`eval $FOLDERREV1 $FOLDERREV2`
|
|
||||||
|
|
6
examples/badchannel.txt
Normal file
6
examples/badchannel.txt
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
0
|
||||||
|
10, 30
|
||||||
|
40:45 50:52
|
||||||
|
1279
|
||||||
|
# all bad channels are applied for all counters in deector
|
||||||
|
|
@ -5,7 +5,7 @@ detsize 1024 1024
|
|||||||
hostname bchip048+bchip052+
|
hostname bchip048+bchip052+
|
||||||
|
|
||||||
# 1Gb receiver pc hostname (default tcpport: 1954)
|
# 1Gb receiver pc hostname (default tcpport: 1954)
|
||||||
rx_hostname pcmoench01+pcmoench01:1955
|
rx_hostname pcmoench01:1954+pcmoench01:1955+
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -3,33 +3,33 @@
|
|||||||
### edit with hostname or IP address of your detector
|
### edit with hostname or IP address of your detector
|
||||||
############################################
|
############################################
|
||||||
#hostname bchip181+
|
#hostname bchip181+
|
||||||
hostname bchip119.psi.ch
|
hostname bchip135
|
||||||
|
|
||||||
#############################################
|
#############################################
|
||||||
### edit with hostname or 1Gbs IP address of your server
|
### edit with hostname or 1Gbs IP address of your server
|
||||||
############################################
|
############################################
|
||||||
rx_hostname mpc2011:1777
|
rx_hostname mpc2011
|
||||||
|
|
||||||
#############################################
|
#############################################
|
||||||
### edit with 10 Gbs IP of your server
|
### edit with 10 Gbs IP of your server
|
||||||
############################################
|
############################################
|
||||||
udp_dstip 10.1.2.102
|
udp_dstip 10.1.1.102
|
||||||
#############################################
|
#############################################
|
||||||
### edit with any number in the subnet of your server (first 3 numbers as above)
|
### edit with any number in the subnet of your server (first 3 numbers as above)
|
||||||
############################################
|
############################################
|
||||||
udp_srcip 10.1.2.19
|
udp_srcip 10.1.1.19
|
||||||
udp_dstport 32000
|
udp_dstport 32411
|
||||||
|
|
||||||
#############################################
|
#############################################
|
||||||
### edit with 10 Gbs IP of your server
|
### edit with 10 Gbs IP of your server
|
||||||
############################################
|
############################################
|
||||||
rx_zmqip 10.1.2.102
|
rx_zmqip 10.1.1.102
|
||||||
rx_zmqport 77000
|
rx_zmqport 50003
|
||||||
#############################################
|
#############################################
|
||||||
### edit with 1 Gbs IP of PC where you will run the GUI
|
### edit with 1 Gbs IP of PC where you will run the GUI
|
||||||
############################################
|
############################################
|
||||||
zmqip 129.129.202.132
|
zmqip 129.129.202.57
|
||||||
zmqport 77001
|
zmqport 50001
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ rx_zmqstream 1
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
frames 1000
|
frames 100000
|
||||||
period 0.0006
|
period 0.0006
|
||||||
exptime 0.00035
|
exptime 0.00035
|
||||||
|
|
||||||
@ -62,9 +62,3 @@ highvoltage 90
|
|||||||
#adcreg 0x14 0x40
|
#adcreg 0x14 0x40
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
frames 10
|
|
||||||
period 0.1
|
|
||||||
rx_jsonpara subframes 1
|
|
||||||
rx_jsonpara frameMode raw
|
|
||||||
rx_jsonpara detectorMode analog
|
|
||||||
|
@ -1,27 +0,0 @@
|
|||||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
|
||||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
|
||||||
#####! /bin/awk -f
|
|
||||||
|
|
||||||
|
|
||||||
if [ $# -lt 3 ]
|
|
||||||
then
|
|
||||||
echo "wrong usage"
|
|
||||||
exit -1
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
fin=$1
|
|
||||||
ftmp=$2
|
|
||||||
fout=$3
|
|
||||||
|
|
||||||
|
|
||||||
#dat=echo "date '+%Y%m%d'"
|
|
||||||
|
|
||||||
echo "Updating $fout"
|
|
||||||
#echo "in: $fin tmp: $ftmp out: $fout"
|
|
||||||
|
|
||||||
#awk 'NR==FNR {if ($3=="Date:") {l[FNR]=$4; gsub("-","",l[FNR]);} else { if (match($0,"Rev")) {l[FNR]=$(NF);} else {l[FNR]="\""$(NF)"\"";};};next} {$0=$1" "$2" "l[FNR]}1' $fin $ftmp > $fout
|
|
||||||
|
|
||||||
awk 'BEGIN {l[0]=0; "date +%Y%m%d" | getline l[1]; l[2]="\"/\""; l[3]="\"nobody\""; l[3]="\"nobody\""; l[4]="\"0000-0000-0000\"";} \
|
|
||||||
NR==FNR {if (match($0,"Rev")) {l[0]="0x"$(NF);} else if (match($0,"Date")) {l[1]="0x"$4; gsub("-","",l[1]);} else if (match($0,"URL")) {l[2]="\""$(NF)"\"";} else if (match($0,"Author")) {l[3]="\""$(NF)"\"";} else if (match($0,"UUID")) {l[4]="\""$(NF)"\"";} else if (match($0,"Branch")) {l[5]="\""$(NF)"\"";};next;}
|
|
||||||
{if (match($2,"REV")) {$0=$1" "$2" "l[0];} else if (match($2,"DATE")) {$0=$1" "$2" "l[1];} else if (match($2,"URL")) {$0=$1" "$2" "l[2];} else if (match($2,"AUTH")) {$0=$1" "$2" "l[3];} else if (match($2,"UUID")) {$0=$1" "$2" "l[4];} else if (match($2,"BRANCH")) {$0=$1" "$2" "l[5];}}1' $fin $ftmp > $fout
|
|
@ -50,8 +50,8 @@ TEST_CASE("Set control port then create a new object with this control port",
|
|||||||
Is this the best way to initialize the detectors
|
Is this the best way to initialize the detectors
|
||||||
Using braces to make the object go out of scope
|
Using braces to make the object go out of scope
|
||||||
*/
|
*/
|
||||||
int old_cport = DEFAULT_PORTNO;
|
int old_cport = DEFAULT_TCP_CNTRL_PORTNO;
|
||||||
int old_sport = DEFAULT_PORTNO + 1;
|
int old_sport = DEFAULT_TCP_STOP_PORTNO;
|
||||||
int new_cport = 1993;
|
int new_cport = 1993;
|
||||||
int new_sport = 2000;
|
int new_sport = 2000;
|
||||||
{
|
{
|
||||||
@ -79,7 +79,7 @@ TEST_CASE("Set control port then create a new object with this control port",
|
|||||||
|
|
||||||
Module d(test::type);
|
Module d(test::type);
|
||||||
d.setHostname(test::hostname);
|
d.setHostname(test::hostname);
|
||||||
CHECK(d.getStopPort() == DEFAULT_PORTNO + 1);
|
CHECK(d.getStopPort() == DEFAULT_TCP_STOP_PORTNO);
|
||||||
d.freeSharedMemory();
|
d.freeSharedMemory();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
57
libs/qwt/CMakeLists.txt
Normal file
57
libs/qwt/CMakeLists.txt
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
#inspired by: https://github.com/ericriff/qwt/blob/master/CMakeLists.txt
|
||||||
|
|
||||||
|
# Build a static version of qwt from tar file
|
||||||
|
cmake_minimum_required(VERSION 3.12)
|
||||||
|
project(qwt)
|
||||||
|
set(PROJECT_VERSION 6.1.5)
|
||||||
|
|
||||||
|
set(CMAKE_AUTOMOC ON)
|
||||||
|
set(CMAKE_AUTORCC ON)
|
||||||
|
|
||||||
|
# Extract qwt sources from the supplied source file
|
||||||
|
set(INTERNALQWTDIR "qwt-source/")
|
||||||
|
set(QWTBASE ${CMAKE_CURRENT_BINARY_DIR}/${INTERNALQWTDIR})
|
||||||
|
file(MAKE_DIRECTORY ${QWTBASE})
|
||||||
|
execute_process(
|
||||||
|
COMMAND tar -xf ${CMAKE_CURRENT_SOURCE_DIR}/qwt-6.1.5.tar.bz2 -C ${QWTBASE} --strip-components=1
|
||||||
|
RESULT_VARIABLE ret
|
||||||
|
)
|
||||||
|
if(ret AND NOT ret EQUAL 0)
|
||||||
|
message( FATAL_ERROR "Could not unpack qwt")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Without this define moc files are not included and linking of examples fails.
|
||||||
|
add_definitions(-DQWT_MOC_INCLUDE)
|
||||||
|
|
||||||
|
find_package(Qt5 REQUIRED
|
||||||
|
COMPONENTS
|
||||||
|
Core
|
||||||
|
Gui
|
||||||
|
Widgets
|
||||||
|
OpenGL
|
||||||
|
Concurrent
|
||||||
|
PrintSupport
|
||||||
|
Svg
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
file(GLOB QWT_SOURCES ${QWTBASE}src/*.cpp)
|
||||||
|
file(GLOB QWT_HEADERS ${QWTBASE}src/*.h)
|
||||||
|
add_library(qwt STATIC ${QWT_SOURCES} ${QWT_HEADERS} )
|
||||||
|
target_include_directories(qwt PUBLIC
|
||||||
|
$<BUILD_INTERFACE:${QWTBASE}/src>
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(qwt PUBLIC
|
||||||
|
Qt5::Core
|
||||||
|
Qt5::Gui
|
||||||
|
Qt5::Widgets
|
||||||
|
Qt5::OpenGL
|
||||||
|
Qt5::Concurrent
|
||||||
|
Qt5::PrintSupport
|
||||||
|
Qt5::Svg
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# Disable all warnings in QWT since we don’t want to patch the library
|
||||||
|
target_compile_options(qwt PRIVATE -w)
|
BIN
libs/qwt/qwt-6.1.5.tar.bz2
Normal file
BIN
libs/qwt/qwt-6.1.5.tar.bz2
Normal file
Binary file not shown.
110
patternGenerator/deserializer.cpp
Normal file
110
patternGenerator/deserializer.cpp
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/utsname.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
|
int iarg;
|
||||||
|
char fname[10000];
|
||||||
|
uint64_t word;
|
||||||
|
int val[64];
|
||||||
|
int bit[64];
|
||||||
|
FILE *fdin;
|
||||||
|
|
||||||
|
int nb = 2;
|
||||||
|
int off = 0;
|
||||||
|
int ioff = 0;
|
||||||
|
int dr = 24;
|
||||||
|
int idr = 0;
|
||||||
|
int ib = 0;
|
||||||
|
int iw = 0;
|
||||||
|
bit[0] = 19;
|
||||||
|
bit[1] = 8;
|
||||||
|
// for (iarg=0; iarg<argc; iarg++) printf("%d %s\n",iarg, argv[iarg]);
|
||||||
|
|
||||||
|
if (argc < 2)
|
||||||
|
printf("Error: usage is %s fname [dr off b0 b1 bn]\n");
|
||||||
|
|
||||||
|
if (argc > 2)
|
||||||
|
dr = atoi(argv[2]);
|
||||||
|
if (argc > 3)
|
||||||
|
off = atoi(argv[3]);
|
||||||
|
if (argc > 4) {
|
||||||
|
for (ib = 0; ib < 64; ib++) {
|
||||||
|
if (argc > 4 + ib) {
|
||||||
|
bit[ib] = atoi(argv[4 + ib]);
|
||||||
|
nb++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
idr = 0;
|
||||||
|
for (ib = 0; ib < nb; ib++) {
|
||||||
|
val[ib] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
fdin = fopen(argv[1], "rb");
|
||||||
|
if (fdin == NULL) {
|
||||||
|
printf("Cannot open input file %s for reading\n", argv[1]);
|
||||||
|
return 200;
|
||||||
|
}
|
||||||
|
|
||||||
|
while (fread((void *)&word, 8, 1, fdin)) {
|
||||||
|
// printf("%llx\n",word);
|
||||||
|
if (ioff < off)
|
||||||
|
ioff++;
|
||||||
|
else {
|
||||||
|
|
||||||
|
for (ib = 0; ib < nb; ib++) {
|
||||||
|
if (word & (1 << bit[ib]))
|
||||||
|
val[ib] |= (1 << idr);
|
||||||
|
}
|
||||||
|
idr++;
|
||||||
|
if (idr == dr) {
|
||||||
|
idr = 0;
|
||||||
|
fprintf(stdout, "%d\t", iw++);
|
||||||
|
for (ib = 0; ib < nb; ib++) {
|
||||||
|
#ifdef HEX
|
||||||
|
fprintf(stdout, "%08llx\t", val[ib]);
|
||||||
|
#else
|
||||||
|
fprintf(stdout, "%lld\t", val[ib]);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
val[ib] = 0;
|
||||||
|
}
|
||||||
|
fprintf(stdout, "\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (idr != 0) {
|
||||||
|
fprintf(stdout, "%d\t", iw++);
|
||||||
|
for (ib = 0; ib < nb; ib++) {
|
||||||
|
#ifdef HEX
|
||||||
|
fprintf(stdout, "%08llx\t", val[ib]);
|
||||||
|
#else
|
||||||
|
fprintf(stdout, "%lld\t", val[ib]);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
val[ib] = 0;
|
||||||
|
}
|
||||||
|
fprintf(stdout, "\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
fclose(fdin);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
4
patternGenerator/example_pattern/example_pattern.alias
Normal file
4
patternGenerator/example_pattern/example_pattern.alias
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
BIT0 output0 1
|
||||||
|
BIT1 output1 1
|
||||||
|
BIT2 output2 1
|
||||||
|
BIT3 output3 1
|
97
patternGenerator/example_pattern/example_pattern.p
Normal file
97
patternGenerator/example_pattern/example_pattern.p
Normal file
@ -0,0 +1,97 @@
|
|||||||
|
//define signals and directions (Input, outputs, clocks)
|
||||||
|
|
||||||
|
|
||||||
|
#define output0 0
|
||||||
|
setoutput(output0);
|
||||||
|
|
||||||
|
#define output1 1
|
||||||
|
setoutput(output1);
|
||||||
|
|
||||||
|
#define output2 2
|
||||||
|
setoutput(output2);
|
||||||
|
|
||||||
|
#define output3 3
|
||||||
|
setoutput(output3);
|
||||||
|
|
||||||
|
#define input0 4
|
||||||
|
setinput(input0);
|
||||||
|
|
||||||
|
#define input1 5
|
||||||
|
setinput(input1);
|
||||||
|
|
||||||
|
#define input2 6
|
||||||
|
setinput(input2);
|
||||||
|
|
||||||
|
#define input3 7
|
||||||
|
setinput(input3);
|
||||||
|
|
||||||
|
|
||||||
|
#define PW pw()
|
||||||
|
#define SB(x) setbit(x)
|
||||||
|
#define CB(x) clearbit(x)
|
||||||
|
#define CLOCK clearbit(CLKBIT); pw();setbit(CLKBIT);pw()
|
||||||
|
#define LCLOCK clearbit(CLKBIT); pw();setbit(CLKBIT);pw();clearbit(CLKBIT); pw()
|
||||||
|
#define CLOCKS(x) for (i=0;i<x;i++) {clearbit(CLKBIT);pw(); setbit(CLKBIT); pw();}
|
||||||
|
#define STOP setstop();
|
||||||
|
#define START setstart();
|
||||||
|
#define REPEAT(x) for (i=0;i<(x);i++) {pw();}
|
||||||
|
#define DOFOR(x) for (j=0;j<(x);j++) {
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
#define INST0 CB(output3);CB(output2);CB(output1);CB(output0);PW;
|
||||||
|
#define INST1 CB(output3);CB(output2);CB(output1);SB(output0);PW;
|
||||||
|
#define INST2 CB(output3);CB(output2);SB(output1);CB(output0);PW;
|
||||||
|
#define INST3 CB(output3);CB(output2);SB(output1);SB(output0);PW;
|
||||||
|
#define INST4 CB(output3);SB(output2);CB(output1);CB(output0);PW;
|
||||||
|
#define INST5 CB(output3);SB(output2);CB(output1);SB(output0);PW;
|
||||||
|
#define INST6 CB(output3);SB(output2);SB(output1);CB(output0);PW;
|
||||||
|
#define INST7 CB(output3);SB(output2);SB(output1);SB(output0);PW;
|
||||||
|
#define INST8 SB(output3);CB(output2);CB(output1);CB(output0);PW;
|
||||||
|
#define INST9 SB(output3);CB(output2);CB(output1);SB(output0);PW;
|
||||||
|
#define INST10 SB(output3);CB(output2);SB(output1);CB(output0);PW;
|
||||||
|
#define INST11 SB(output3);CB(output2);SB(output1);SB(output0);PW;
|
||||||
|
#define INST12 SB(output3);SB(output2);CB(output1);CB(output0);PW;
|
||||||
|
|
||||||
|
START;
|
||||||
|
INST0;
|
||||||
|
|
||||||
|
setwaitpoint(0);
|
||||||
|
setwaittime(0,5);
|
||||||
|
INST1;
|
||||||
|
|
||||||
|
setstartloop(5);
|
||||||
|
setnloop(5,2);
|
||||||
|
INST2;
|
||||||
|
|
||||||
|
setstartloop(0);
|
||||||
|
setnloop(0,2);
|
||||||
|
INST3;
|
||||||
|
|
||||||
|
INST4;
|
||||||
|
|
||||||
|
setstoploop(0);
|
||||||
|
setstoploop(5);
|
||||||
|
INST5;
|
||||||
|
|
||||||
|
INST6;
|
||||||
|
|
||||||
|
setwaitpoint(4);
|
||||||
|
setwaittime(1,0);
|
||||||
|
INST7;
|
||||||
|
|
||||||
|
INST8;
|
||||||
|
|
||||||
|
setstartloop(2);
|
||||||
|
setnloop(2,0);
|
||||||
|
INST9;
|
||||||
|
|
||||||
|
INST10;
|
||||||
|
|
||||||
|
setstoploop(2);
|
||||||
|
INST11;
|
||||||
|
|
||||||
|
STOP;
|
||||||
|
INST12;
|
||||||
|
|
||||||
|
|
25
patternGenerator/example_pattern/example_pattern.pat
Normal file
25
patternGenerator/example_pattern/example_pattern.pat
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
patword 0x0000 0x0000000000000000
|
||||||
|
patword 0x0001 0x0000000000000001
|
||||||
|
patword 0x0002 0x0000000000000002
|
||||||
|
patword 0x0003 0x0000000000000003
|
||||||
|
patword 0x0004 0x0000000000000004
|
||||||
|
patword 0x0005 0x0000000000000005
|
||||||
|
patword 0x0006 0x0000000000000006
|
||||||
|
patword 0x0007 0x0000000000000007
|
||||||
|
patword 0x0008 0x0000000000000008
|
||||||
|
patword 0x0009 0x0000000000000009
|
||||||
|
patword 0x000a 0x000000000000000a
|
||||||
|
patword 0x000b 0x000000000000000b
|
||||||
|
patword 0x000c 0x000000000000000c
|
||||||
|
patlimits 0x0000 0x000c
|
||||||
|
patioctrl 0x000000000000000f
|
||||||
|
patloop 0 0x0003 0x0005
|
||||||
|
patnloop 0 2
|
||||||
|
patloop 2 0x0009 0x000b
|
||||||
|
patnloop 2 0
|
||||||
|
patloop 5 0x0002 0x0005
|
||||||
|
patnloop 5 2
|
||||||
|
patwait 0 0x0001
|
||||||
|
patwaittime 0 5
|
||||||
|
patwait 4 0x0007
|
||||||
|
patwaittime 4 0
|
BIN
patternGenerator/example_pattern/example_pattern.png
Normal file
BIN
patternGenerator/example_pattern/example_pattern.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 299 KiB |
183
patternGenerator/generator.c
Normal file
183
patternGenerator/generator.c
Normal file
@ -0,0 +1,183 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
/****************************************************************************
|
||||||
|
usage to generate a patter test.pat from test.p
|
||||||
|
|
||||||
|
gcc -DINFILE="\"test.p\"" -DOUTFILE="\"test.pat\"" -o test.exe generator.c ;
|
||||||
|
./test.exe ; rm test.exe
|
||||||
|
|
||||||
|
|
||||||
|
*************************************************************************/
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/utsname.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
|
||||||
|
#define MAXLOOPS 6
|
||||||
|
#define MAXTIMERS 6
|
||||||
|
#define MAXWORDS 8191
|
||||||
|
|
||||||
|
uint64_t pat = 0;
|
||||||
|
uint64_t iopat = 0;
|
||||||
|
uint64_t clkpat = 0;
|
||||||
|
|
||||||
|
unsigned iaddr = 0;
|
||||||
|
unsigned waitaddr[MAXTIMERS] = {MAXWORDS, MAXWORDS, MAXWORDS,
|
||||||
|
MAXWORDS, MAXWORDS, MAXWORDS};
|
||||||
|
unsigned startloopaddr[MAXLOOPS] = {MAXWORDS, MAXWORDS, MAXWORDS,
|
||||||
|
MAXWORDS, MAXWORDS, MAXWORDS};
|
||||||
|
unsigned stoploopaddr[MAXLOOPS] = {MAXWORDS, MAXWORDS, MAXWORDS,
|
||||||
|
MAXWORDS, MAXWORDS, MAXWORDS};
|
||||||
|
unsigned start = 0, stop = 0;
|
||||||
|
uint64_t waittime[MAXTIMERS] = {0, 0, 0, 0, 0, 0};
|
||||||
|
unsigned nloop[MAXLOOPS] = {0, 0, 0, 0, 0, 0};
|
||||||
|
|
||||||
|
char infile[10000], outfile[10000];
|
||||||
|
|
||||||
|
FILE *fd, *fd1;
|
||||||
|
uint64_t PAT[MAXWORDS];
|
||||||
|
int iopat_enable = 0;
|
||||||
|
|
||||||
|
int i, ii, iii, j, jj, jjj, pixx, pixy, memx, memy, muxout, memclk, colclk,
|
||||||
|
rowclk, muxclk, memcol, memrow, loopcounter;
|
||||||
|
|
||||||
|
void setstart() { start = iaddr; }
|
||||||
|
|
||||||
|
void setstop() { stop = iaddr; }
|
||||||
|
|
||||||
|
void setinput(int bit) {
|
||||||
|
uint64_t mask = 1;
|
||||||
|
mask = mask << bit;
|
||||||
|
iopat &= ~mask;
|
||||||
|
iopat_enable = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setoutput(int bit) {
|
||||||
|
uint64_t mask = 1;
|
||||||
|
mask = mask << bit;
|
||||||
|
iopat |= mask;
|
||||||
|
iopat_enable = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
void clearbit(int bit) {
|
||||||
|
uint64_t mask = 1;
|
||||||
|
mask = mask << bit;
|
||||||
|
pat &= ~mask;
|
||||||
|
}
|
||||||
|
void setbit(int bit) {
|
||||||
|
uint64_t mask = 1;
|
||||||
|
mask = mask << bit;
|
||||||
|
pat |= mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
int checkbit(int bit) {
|
||||||
|
uint64_t mask = 1;
|
||||||
|
mask = mask << bit;
|
||||||
|
return (pat & mask) >> bit;
|
||||||
|
}
|
||||||
|
|
||||||
|
void setstartloop(int iloop) {
|
||||||
|
if (iloop >= 0 && iloop < MAXLOOPS) {
|
||||||
|
startloopaddr[iloop] = iaddr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void setstoploop(int iloop) {
|
||||||
|
if (iloop >= 0 && iloop < MAXLOOPS) {
|
||||||
|
stoploopaddr[iloop] = iaddr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void setnloop(int iloop, int n) {
|
||||||
|
if (iloop >= 0 && iloop < MAXLOOPS) {
|
||||||
|
nloop[iloop] = n;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void setwaitpoint(int iloop) {
|
||||||
|
if (iloop >= 0 && iloop < MAXTIMERS) {
|
||||||
|
waitaddr[iloop] = iaddr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void setwaittime(int iloop, uint64_t t) {
|
||||||
|
if (iloop >= 0 && iloop < MAXTIMERS) {
|
||||||
|
waittime[iloop] = t;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void pw() {
|
||||||
|
if (iaddr < MAXWORDS) {
|
||||||
|
PAT[iaddr] = pat;
|
||||||
|
}
|
||||||
|
fprintf(fd, "patword 0x%04x 0x%016llx\n", iaddr, pat);
|
||||||
|
iaddr++;
|
||||||
|
if (iaddr >= MAXWORDS) {
|
||||||
|
printf("ERROR: too many word in the pattern (%d instead of %d)!", iaddr,
|
||||||
|
MAXWORDS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
int parseCommand(int clk, int cmdbit, int cmd, int length) {
|
||||||
|
int ibit;
|
||||||
|
clearbit(clk);
|
||||||
|
for (ibit = 0; ibit < length; ibit++) {
|
||||||
|
if (cmd & (1 >> ibit)) {
|
||||||
|
setbit(cmdbit);
|
||||||
|
} else {
|
||||||
|
clearbit(cmdbit);
|
||||||
|
}
|
||||||
|
pw();
|
||||||
|
/******/
|
||||||
|
setbit(clk);
|
||||||
|
pw();
|
||||||
|
/******/
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
int iloop = 0;
|
||||||
|
fd = fopen(OUTFILE, "w");
|
||||||
|
#include INFILE
|
||||||
|
|
||||||
|
fprintf(fd, "patlimits 0x%04x 0x%04x\n", start, stop);
|
||||||
|
|
||||||
|
if (iopat_enable == 1) {
|
||||||
|
fprintf(fd, "patioctrl 0x%016llx\n", iopat);
|
||||||
|
}
|
||||||
|
|
||||||
|
for (iloop = 0; iloop < MAXLOOPS; iloop++) {
|
||||||
|
if ((startloopaddr[iloop] != MAXWORDS) &&
|
||||||
|
(stoploopaddr[iloop] != MAXWORDS)) {
|
||||||
|
fprintf(fd, "patloop %d 0x%04x 0x%04x\n", iloop,
|
||||||
|
startloopaddr[iloop], stoploopaddr[iloop]);
|
||||||
|
if (stoploopaddr[iloop] <= startloopaddr[iloop]) {
|
||||||
|
nloop[iloop] = 0;
|
||||||
|
}
|
||||||
|
fprintf(fd, "patnloop %d %u\n", iloop, nloop[iloop]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (iloop = 0; iloop < MAXTIMERS; iloop++) {
|
||||||
|
if (waitaddr[iloop] != MAXWORDS) {
|
||||||
|
fprintf(fd, "patwait %d 0x%04x\n", iloop, waitaddr[iloop]);
|
||||||
|
fprintf(fd, "patwaittime %d %llu\n", iloop, waittime[iloop]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fclose(fd);
|
||||||
|
fd1 = fopen(OUTFILEBIN, "w");
|
||||||
|
fwrite(PAT, sizeof(uint64_t), iaddr, fd1);
|
||||||
|
fclose(fd1);
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
602
patternGenerator/plotPattern.py
Executable file
602
patternGenerator/plotPattern.py
Executable file
@ -0,0 +1,602 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
"""
|
||||||
|
Created on Wed May 24 09:44:53 2017
|
||||||
|
|
||||||
|
Plot the pattern for New Chip Test Box (.pat)
|
||||||
|
|
||||||
|
Changes:
|
||||||
|
- 2017-11-21 Adapt it to python-3
|
||||||
|
- 2017-09-25 All can be plotted
|
||||||
|
- 2017-09-22 Can be plotted but the loop and wait not work yet
|
||||||
|
|
||||||
|
@author: zhang_j1
|
||||||
|
"""
|
||||||
|
import matplotlib.pyplot as plt
|
||||||
|
from numpy import *
|
||||||
|
from matplotlib.pyplot import *
|
||||||
|
from matplotlib.patches import Rectangle
|
||||||
|
import os
|
||||||
|
import argparse
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
# COLORS AND LINE STYLES
|
||||||
|
# alternating colors of the plots (2 needed)
|
||||||
|
colors_plot = ['tab:blue', 'tab:orange']
|
||||||
|
|
||||||
|
# Wait colors and line styles (6 needed from 0 to 5)
|
||||||
|
colors_wait = ['b', 'g', 'r', 'c', 'm', 'y']
|
||||||
|
linestyles_wait = ['--', '--', '--', '--', '--', '--']
|
||||||
|
alpha_wait = [0.5, 0.5, 0.5, 0.5, 0.5, 0.5]
|
||||||
|
alpha_wait_rect = [0.2, 0.2, 0.2, 0.2, 0.2, 0.2]
|
||||||
|
|
||||||
|
# Loop colors and line styles (6 needed from 0 to 5)
|
||||||
|
colors_loop = ['tab:green', 'tab:red', 'tab:purple', 'tab:brown', 'tab:pink', 'tab:grey']
|
||||||
|
linestyles_loop = ['-.', '-.', '-.', '-.', '-.', '-.']
|
||||||
|
alpha_loop = [0.5, 0.5, 0.5, 0.5, 0.5, 0.5]
|
||||||
|
alpha_loop_rect = [0.2, 0.2, 0.2, 0.2, 0.2, 0.2]
|
||||||
|
|
||||||
|
# Display the count of clocks
|
||||||
|
clock_vertical_lines_spacing = 1
|
||||||
|
show_clocks_number = True
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
# Define a hex to binary function
|
||||||
|
# global definition
|
||||||
|
# base = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F]
|
||||||
|
base = [str(x) for x in range(10)] + [chr(x) for x in range(ord('A'), ord('A')+6)]
|
||||||
|
# dec2bin
|
||||||
|
|
||||||
|
|
||||||
|
def dec2bin(string_num):
|
||||||
|
num = int(string_num)
|
||||||
|
mid = []
|
||||||
|
while True:
|
||||||
|
if num == 0:
|
||||||
|
break
|
||||||
|
num, rem = divmod(num, 2)
|
||||||
|
mid.append(base[rem])
|
||||||
|
|
||||||
|
return ''.join([str(x) for x in mid[::-1]])
|
||||||
|
|
||||||
|
|
||||||
|
# dec2binary: better than dec2bin
|
||||||
|
def dec2binary(dec_num, width=None):
|
||||||
|
return binary_repr(int(dec_num), width=width)
|
||||||
|
|
||||||
|
|
||||||
|
# hex2dec
|
||||||
|
def hex2dec(string_num):
|
||||||
|
return str(int(string_num.upper(), 16))
|
||||||
|
|
||||||
|
|
||||||
|
# hex2bin
|
||||||
|
def hex2bin(string_num):
|
||||||
|
return dec2bin(hex2dec(string_num.upper()))
|
||||||
|
|
||||||
|
|
||||||
|
# hex2bin
|
||||||
|
def hex2binary(string_num, width=None):
|
||||||
|
return dec2binary(hex2dec(string_num.upper()), width=width)
|
||||||
|
|
||||||
|
|
||||||
|
parser = argparse.ArgumentParser()
|
||||||
|
|
||||||
|
parser.add_argument('-d', '--directory', required = True, help = "Working directory where the pattern is located")
|
||||||
|
parser.add_argument('-p', '--pattern', required = True, help = "Pattern name")
|
||||||
|
parser.add_argument('-a', '--alias', help = "Alias name")
|
||||||
|
parser.add_argument('-v', '--verbose', action='store_true')
|
||||||
|
|
||||||
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
Folder = args.directory
|
||||||
|
File_pat = args.pattern
|
||||||
|
File_alias = args.alias
|
||||||
|
verbose = args.verbose
|
||||||
|
|
||||||
|
# Look at the alias file and generate the lookup table for pin names
|
||||||
|
# Create a 64 bit look up table
|
||||||
|
table = []
|
||||||
|
for i in range(64):
|
||||||
|
# for special bit
|
||||||
|
if i+1 == 59:
|
||||||
|
table.append([str(i+1), "external_trigger"])
|
||||||
|
elif i+1 == 63:
|
||||||
|
table.append([str(i+1), "adc_enable"])
|
||||||
|
elif i+1 == 62:
|
||||||
|
table.append([str(i+1), "dbit_enable"])
|
||||||
|
else:
|
||||||
|
table.append([str(i+1), ""])
|
||||||
|
|
||||||
|
# Loop all lines
|
||||||
|
try:
|
||||||
|
with open(Folder + "/" + File_alias + ".alias") as f:
|
||||||
|
lines = f.readlines()
|
||||||
|
f.close()
|
||||||
|
nlines = len(lines)
|
||||||
|
except:
|
||||||
|
nlines = 0
|
||||||
|
|
||||||
|
if nlines > 0:
|
||||||
|
for i in range(nlines):
|
||||||
|
# whether the line is bit definition
|
||||||
|
if lines[i][0:3] == "BIT":
|
||||||
|
# split words
|
||||||
|
words = lines[i].split()
|
||||||
|
bit_num = int(words[0][3:])
|
||||||
|
table[bit_num][0] = words[0][3:]
|
||||||
|
table[bit_num][1] = words[1]
|
||||||
|
else:
|
||||||
|
for i in range(64):
|
||||||
|
table[i][0] = i
|
||||||
|
table[i][1] = f'BIT#{i}'
|
||||||
|
|
||||||
|
if verbose:
|
||||||
|
print(table)
|
||||||
|
|
||||||
|
# Load the pattern and get all lines
|
||||||
|
# Loop all lines
|
||||||
|
with open(Folder + "/" + File_pat + ".pat") as f_pat:
|
||||||
|
lines_pat = f_pat.readlines()
|
||||||
|
f_pat.close()
|
||||||
|
|
||||||
|
# number of lines for pattern file
|
||||||
|
nlines_pat = len(lines_pat)
|
||||||
|
# a counter
|
||||||
|
cnt = 0
|
||||||
|
if verbose:
|
||||||
|
print("The total number of lines of pattern:", nlines_pat)
|
||||||
|
|
||||||
|
# Loop all lines of pattern
|
||||||
|
waittime0 = None
|
||||||
|
waittime1 = None
|
||||||
|
waittime2 = None
|
||||||
|
waittime3 = None
|
||||||
|
waittime4 = None
|
||||||
|
waittime5 = None
|
||||||
|
|
||||||
|
nloop0 = None
|
||||||
|
nloop1 = None
|
||||||
|
nloop2 = None
|
||||||
|
nloop3 = None
|
||||||
|
nloop4 = None
|
||||||
|
nloop5 = None
|
||||||
|
|
||||||
|
for k in range(nlines_pat):
|
||||||
|
# content of line
|
||||||
|
words_line = lines_pat[k].split()
|
||||||
|
if words_line[0] == "patword":
|
||||||
|
# print words_line from b0 to b63
|
||||||
|
bits = hex2binary(words_line[-1], 64)[::-1]
|
||||||
|
if verbose:
|
||||||
|
print("The bits for line-", k+1, "is:", bits)
|
||||||
|
# convert string bits to decimal array
|
||||||
|
num_bits = array(list(map(str, bits)), dtype="uint16")
|
||||||
|
if cnt == 0:
|
||||||
|
mat_pat = num_bits
|
||||||
|
else:
|
||||||
|
# add bits to matrix
|
||||||
|
mat_pat = concatenate((mat_pat, num_bits), axis=0)
|
||||||
|
cnt = cnt + 1
|
||||||
|
# print("The matrix of pattern:", mat_pat.reshape(int(cnt), int(len(num_bits))))
|
||||||
|
|
||||||
|
# Look at the io: 0 for sending to ASIC, 1 for reading from ASIC
|
||||||
|
if words_line[0] == "patioctrl":
|
||||||
|
# print words_line
|
||||||
|
if verbose:
|
||||||
|
print(words_line[-1])
|
||||||
|
bits = hex2binary(words_line[-1], 64)[::-1]
|
||||||
|
if verbose:
|
||||||
|
print(bits)
|
||||||
|
# convert string bits to decimal array
|
||||||
|
out_bits = array(list(map(str, bits)), dtype="uint16")
|
||||||
|
|
||||||
|
if verbose:
|
||||||
|
print(words_line)
|
||||||
|
# Deal with waiting point
|
||||||
|
|
||||||
|
# ====== WAIT ======
|
||||||
|
if words_line[0] == "patwait" and words_line[1] == "0":
|
||||||
|
wait0 = int(hex2dec(words_line[2]))
|
||||||
|
if verbose:
|
||||||
|
print("wait 0 at:", wait0)
|
||||||
|
if words_line[0] == "patwaittime" and words_line[1] == "0":
|
||||||
|
waittime0 = int(words_line[2])
|
||||||
|
if verbose:
|
||||||
|
print("wait 0 for:", waittime0)
|
||||||
|
|
||||||
|
if words_line[0] == "patwait" and words_line[1] == "1":
|
||||||
|
wait1 = int(hex2dec(words_line[2]))
|
||||||
|
if verbose:
|
||||||
|
print("wait 1 at:", wait1)
|
||||||
|
if words_line[0] == "patwaittime" and words_line[1] == "1":
|
||||||
|
waittime1 = int(words_line[2])
|
||||||
|
if verbose:
|
||||||
|
print("wait 1 for:", waittime1)
|
||||||
|
|
||||||
|
if words_line[0] == "patwait" and words_line[1] == "2":
|
||||||
|
wait2 = int(hex2dec(words_line[2]))
|
||||||
|
if verbose:
|
||||||
|
print("wait 2 at:", wait2)
|
||||||
|
if words_line[0] == "patwaittime" and words_line[1] == "2":
|
||||||
|
waittime2 = int(words_line[2])
|
||||||
|
if verbose:
|
||||||
|
print("wait 2 for:", waittime2)
|
||||||
|
|
||||||
|
if words_line[0] == "patwait" and words_line[1] == "3":
|
||||||
|
wait3 = int(hex2dec(words_line[2]))
|
||||||
|
if verbose:
|
||||||
|
print("wait 0 at:", wait3)
|
||||||
|
if words_line[0] == "patwaittime" and words_line[1] == "3":
|
||||||
|
waittime3 = int(words_line[2])
|
||||||
|
if verbose:
|
||||||
|
print("wait 0 for:", waittime3)
|
||||||
|
|
||||||
|
if words_line[0] == "patwait" and words_line[1] == "4":
|
||||||
|
wait4 = int(hex2dec(words_line[2]))
|
||||||
|
if verbose:
|
||||||
|
print("wait 1 at:", wait4)
|
||||||
|
if words_line[0] == "patwaittime" and words_line[1] == "4":
|
||||||
|
waittime4 = int(words_line[2])
|
||||||
|
if verbose:
|
||||||
|
print("wait 1 for:", waittime4)
|
||||||
|
|
||||||
|
if words_line[0] == "patwait" and words_line[1] == "5":
|
||||||
|
wait5 = int(hex2dec(words_line[2]))
|
||||||
|
if verbose:
|
||||||
|
print("wait 2 at:", wait5)
|
||||||
|
if words_line[0] == "patwaittime" and words_line[1] == "5":
|
||||||
|
waittime5 = int(words_line[2])
|
||||||
|
if verbose:
|
||||||
|
print("wait 2 for:", waittime5)
|
||||||
|
|
||||||
|
# ====== LOOPS ======
|
||||||
|
if words_line[0] == "patloop" and words_line[1] == "0":
|
||||||
|
loop0_start = int(hex2dec(words_line[2]))
|
||||||
|
loop0_end = int(hex2dec(words_line[3]))
|
||||||
|
if verbose:
|
||||||
|
print("loop 0 start:", loop0_start, ", end:", loop0_end)
|
||||||
|
if words_line[0] == "patnloop" and words_line[1] == "0":
|
||||||
|
nloop0 = int(words_line[2])
|
||||||
|
if verbose:
|
||||||
|
print("loop 0 times:", nloop0)
|
||||||
|
|
||||||
|
if words_line[0] == "patloop" and words_line[1] == "1":
|
||||||
|
loop1_start = int(hex2dec(words_line[2]))
|
||||||
|
loop1_end = int(hex2dec(words_line[3]))
|
||||||
|
if verbose:
|
||||||
|
print("loop 1 start:", loop1_start, ", end:", loop1_end)
|
||||||
|
if words_line[0] == "patnloop" and words_line[1] == "1":
|
||||||
|
nloop1 = int(words_line[2])
|
||||||
|
if verbose:
|
||||||
|
print("loop 1 times:", nloop1)
|
||||||
|
|
||||||
|
if words_line[0] == "patloop" and words_line[1] == "2":
|
||||||
|
loop2_start = int(hex2dec(words_line[2]))
|
||||||
|
loop2_end = int(hex2dec(words_line[3]))
|
||||||
|
if verbose:
|
||||||
|
print("loop 2 start:", loop2_start, ", end:", loop2_end)
|
||||||
|
if words_line[0] == "patnloop" and words_line[1] == "2":
|
||||||
|
nloop2 = int(words_line[2])
|
||||||
|
if verbose:
|
||||||
|
print("loop 2 times:", nloop2)
|
||||||
|
|
||||||
|
if words_line[0] == "patloop" and words_line[1] == "3":
|
||||||
|
loop3_start = int(hex2dec(words_line[2]))
|
||||||
|
loop3_end = int(hex2dec(words_line[3]))
|
||||||
|
if verbose:
|
||||||
|
print("loop 3 start:", loop3_start, ", end:", loop3_end)
|
||||||
|
if words_line[0] == "patnloop" and words_line[1] == "3":
|
||||||
|
nloop3 = int(words_line[2])
|
||||||
|
if verbose:
|
||||||
|
print("loop 3 times:", nloop3)
|
||||||
|
|
||||||
|
if words_line[0] == "patloop" and words_line[1] == "4":
|
||||||
|
loop4_start = int(hex2dec(words_line[2]))
|
||||||
|
loop4_end = int(hex2dec(words_line[3]))
|
||||||
|
if verbose:
|
||||||
|
print("loop 4 start:", loop4_start, ", end:", loop4_end)
|
||||||
|
if words_line[0] == "patnloop" and words_line[1] == "4":
|
||||||
|
nloop4 = int(words_line[2])
|
||||||
|
if verbose:
|
||||||
|
print("loop 4 times:", nloop4)
|
||||||
|
|
||||||
|
if words_line[0] == "patloop" and words_line[1] == "5":
|
||||||
|
loop5_start = int(hex2dec(words_line[2]))
|
||||||
|
loop5_end = int(hex2dec(words_line[3]))
|
||||||
|
if verbose:
|
||||||
|
print("loop 5 start:", loop5_start, ", end:", loop5_end)
|
||||||
|
if words_line[0] == "patnloop" and words_line[1] == "5":
|
||||||
|
nloop5 = int(words_line[2])
|
||||||
|
if verbose:
|
||||||
|
print("loop 5 times:", nloop5)
|
||||||
|
# print(out_bits)
|
||||||
|
|
||||||
|
# internal counter
|
||||||
|
avail_index = []
|
||||||
|
avail_name = []
|
||||||
|
# Remove non-used bits
|
||||||
|
for i in range(64):
|
||||||
|
# if out_bits[0][i] == 1:
|
||||||
|
if out_bits[i] == 1:
|
||||||
|
avail_index.append(i)
|
||||||
|
avail_name.append(table[i][1])
|
||||||
|
if verbose:
|
||||||
|
print(avail_index)
|
||||||
|
print(avail_name)
|
||||||
|
|
||||||
|
# number of effective used bits
|
||||||
|
nbiteff = len(avail_name)
|
||||||
|
|
||||||
|
# subMat = mat_ext[:,index]
|
||||||
|
# print(mat_pat.shape)
|
||||||
|
subMat = mat_pat.reshape(int(cnt), int(len(num_bits)))[0:, avail_index]
|
||||||
|
# subMat = mat_pat[avail_index]
|
||||||
|
timing = linspace(0, subMat.shape[0]-1, subMat.shape[0])
|
||||||
|
rcParams['figure.figsize'] = 15, 5
|
||||||
|
|
||||||
|
|
||||||
|
# ============= PLOTTING =============
|
||||||
|
|
||||||
|
rcParams["font.weight"] = "bold"
|
||||||
|
rcParams["axes.labelweight"] = "bold"
|
||||||
|
fig2, axs2 = subplots(nbiteff, sharex='all')
|
||||||
|
subplots_adjust(wspace=0, hspace=0)
|
||||||
|
# axs2[nbiteff - 1].set(xlabel='Timing [clk]')
|
||||||
|
for idx, i in enumerate(range(nbiteff)):
|
||||||
|
|
||||||
|
axs2[idx].plot(subMat.T[i], "-", drawstyle="steps-post", linewidth=2.0, color=colors_plot[idx % 2])
|
||||||
|
x_additional = range(len(subMat.T[i]) - 1, len(subMat.T[i]) + 2)
|
||||||
|
additional_stuff = [subMat.T[i][-1]] * 3
|
||||||
|
|
||||||
|
axs2[idx].plot(x_additional, additional_stuff,
|
||||||
|
"--", drawstyle="steps-post", linewidth=2.0, color=colors_plot[idx % 2], alpha=0.5)
|
||||||
|
axs2[idx].yaxis.set_ticks([0.5], minor=False)
|
||||||
|
axs2[idx].xaxis.set_ticks(arange(0, len(subMat.T[i]) + 10, clock_vertical_lines_spacing))
|
||||||
|
|
||||||
|
axs2[idx].yaxis.set_ticklabels([avail_name[i]])
|
||||||
|
axs2[idx].get_yticklabels()[0].set_color(colors_plot[idx % 2])
|
||||||
|
|
||||||
|
axs2[idx].grid(1, 'both', 'both', alpha=0.5)
|
||||||
|
axs2[idx].yaxis.grid(which="both", color=colors_plot[idx % 2], alpha=0.2)
|
||||||
|
if idx != nbiteff - 1:
|
||||||
|
if not show_clocks_number:
|
||||||
|
axs2[idx].xaxis.set_ticklabels([])
|
||||||
|
axs2[idx].set(xlabel=' ', ylim=(-0.2, 1.2))
|
||||||
|
else:
|
||||||
|
axs2[idx].set(xlabel='Timing [clk]', ylim=(-0.2, 1.2))
|
||||||
|
# axs2[idx].set_xlim(left=0)
|
||||||
|
axs2[idx].set_xlim(left=0, right=len(subMat.T[i]) + 1)
|
||||||
|
axs2[idx].spines['top'].set_visible(False)
|
||||||
|
axs2[idx].spines['right'].set_alpha(0.2)
|
||||||
|
axs2[idx].spines['right'].set_visible(True)
|
||||||
|
axs2[idx].spines['bottom'].set_visible(False)
|
||||||
|
axs2[idx].spines['left'].set_visible(False)
|
||||||
|
|
||||||
|
# =====================================================================================================
|
||||||
|
# Plot the wait lines
|
||||||
|
# Wait 0
|
||||||
|
if waittime0 is not None:
|
||||||
|
if waittime0 == 0:
|
||||||
|
axs2[idx].plot([wait0, wait0], [-10, 10],
|
||||||
|
linestyle=linestyles_wait[0], color=colors_wait[0], alpha=alpha_wait[0], linewidth=2.0)
|
||||||
|
axs2[idx].plot([wait0 + 1, wait0 + 1], [-10, 10],
|
||||||
|
linestyle=linestyles_wait[0], color=colors_wait[0], linewidth=2.0, alpha=alpha_wait[0])
|
||||||
|
axs2[idx].add_patch(Rectangle((wait0, -10), 1, 20,
|
||||||
|
label="wait 0: skipped" if idx == 0 else "",
|
||||||
|
facecolor=colors_wait[0], alpha=alpha_wait_rect[0], hatch='\\\\'))
|
||||||
|
else:
|
||||||
|
axs2[idx].plot([wait0, wait0], [-10, 10],
|
||||||
|
linestyle=linestyles_wait[0], color=colors_wait[0],
|
||||||
|
label="wait 0: " + str(waittime0) + " clk" if idx == 0 else "",
|
||||||
|
linewidth=2.0, alpha=alpha_wait[0])
|
||||||
|
|
||||||
|
# Wait 1
|
||||||
|
if waittime1 is not None:
|
||||||
|
if waittime1 == 0:
|
||||||
|
axs2[idx].plot([wait1, wait1], [-10, 10],
|
||||||
|
linestyle=linestyles_wait[1], color=colors_wait[1], alpha=alpha_wait[1], linewidth=2.0)
|
||||||
|
axs2[idx].plot([wait1 + 1, wait1 + 1], [-10, 10],
|
||||||
|
linestyle=linestyles_wait[1], color=colors_wait[1], linewidth=2.0, alpha=alpha_wait[1])
|
||||||
|
axs2[idx].add_patch(Rectangle((wait1, -10), 1, 20,
|
||||||
|
label="wait 1: skipped" if idx == 0 else "",
|
||||||
|
facecolor=colors_wait[1], alpha=alpha_wait_rect[1], hatch='\\\\'))
|
||||||
|
else:
|
||||||
|
axs2[idx].plot([wait1, wait1], [-10, 10],
|
||||||
|
linestyle=linestyles_wait[1], color=colors_wait[1],
|
||||||
|
label="wait 1: " + str(waittime1) + " clk" if idx == 0 else "",
|
||||||
|
linewidth=2.0, alpha=alpha_wait[1])
|
||||||
|
|
||||||
|
# Wait 2
|
||||||
|
if waittime2 is not None:
|
||||||
|
if waittime2 == 0:
|
||||||
|
axs2[idx].plot([wait2, wait2], [-10, 10],
|
||||||
|
linestyle=linestyles_wait[2], color=colors_wait[2], alpha=alpha_wait[2], linewidth=2.0)
|
||||||
|
axs2[idx].plot([wait2 + 1, wait2 + 1], [-10, 10],
|
||||||
|
linestyle=linestyles_wait[2], color=colors_wait[2], linewidth=2.0, alpha=alpha_wait[2])
|
||||||
|
axs2[idx].add_patch(Rectangle((wait2, -10), 1, 20,
|
||||||
|
label="wait 2: skipped" if idx == 0 else "",
|
||||||
|
facecolor=colors_wait[2], alpha=alpha_wait_rect[2], hatch='\\\\'))
|
||||||
|
else:
|
||||||
|
axs2[idx].plot([wait2, wait2], [-10, 10],
|
||||||
|
linestyle=linestyles_wait[2], color=colors_wait[2],
|
||||||
|
label="wait 2: " + str(waittime2) + " clk" if idx == 0 else "",
|
||||||
|
linewidth=2.0, alpha=alpha_wait[2])
|
||||||
|
|
||||||
|
# Wait 3
|
||||||
|
if waittime3 is not None:
|
||||||
|
if waittime3 == 0:
|
||||||
|
axs2[idx].plot([wait3, wait3], [-10, 10],
|
||||||
|
linestyle=linestyles_wait[3], color=colors_wait[3], alpha=alpha_wait[3], linewidth=2.0)
|
||||||
|
axs2[idx].plot([wait3 + 1, wait3 + 1], [-10, 10],
|
||||||
|
linestyle=linestyles_wait[3], color=colors_wait[3], linewidth=2.0, alpha=alpha_wait[3])
|
||||||
|
axs2[idx].add_patch(Rectangle((wait3, -10), 1, 20,
|
||||||
|
label="wait 3: skipped" if idx == 0 else "",
|
||||||
|
facecolor=colors_wait[3], alpha=alpha_wait_rect[3], hatch='\\\\'))
|
||||||
|
else:
|
||||||
|
axs2[idx].plot([wait3, wait3], [-10, 10],
|
||||||
|
linestyle=linestyles_wait[3], color=colors_wait[3],
|
||||||
|
label="wait 3: " + str(waittime3) + " clk" if idx == 0 else "",
|
||||||
|
linewidth=2.0, alpha=alpha_wait[3])
|
||||||
|
|
||||||
|
# Wait 4
|
||||||
|
if waittime4 is not None:
|
||||||
|
if waittime4 == 0:
|
||||||
|
axs2[idx].plot([wait4, wait4], [-10, 10],
|
||||||
|
linestyle=linestyles_wait[4], color=colors_wait[4], alpha=alpha_wait[4], linewidth=2.0)
|
||||||
|
axs2[idx].plot([wait4 + 1, wait4 + 1], [-10, 10],
|
||||||
|
linestyle=linestyles_wait[4], color=colors_wait[4], linewidth=2.0, alpha=alpha_wait[4])
|
||||||
|
axs2[idx].add_patch(Rectangle((wait4, -10), 1, 20,
|
||||||
|
label="wait 4: skipped" if idx == 0 else "",
|
||||||
|
facecolor=colors_wait[4], alpha=alpha_wait_rect[4], hatch='\\\\'))
|
||||||
|
else:
|
||||||
|
axs2[idx].plot([wait4, wait4], [-10, 10],
|
||||||
|
linestyle=linestyles_wait[4], color=colors_wait[4],
|
||||||
|
label="wait 4: " + str(waittime4) + " clk" if idx == 0 else "",
|
||||||
|
linewidth=2.0, alpha=alpha_wait[4])
|
||||||
|
|
||||||
|
# Wait 5
|
||||||
|
if waittime5 is not None:
|
||||||
|
if waittime5 == 0:
|
||||||
|
axs2[idx].plot([wait5, wait5], [-10, 10],
|
||||||
|
linestyle=linestyles_wait[5], color=colors_wait[5], alpha=alpha_wait[5], linewidth=2.0)
|
||||||
|
axs2[idx].plot([wait5 + 1, wait5 + 1], [-10, 10],
|
||||||
|
linestyle=linestyles_wait[5], color=colors_wait[5], linewidth=2.0, alpha=alpha_wait[5])
|
||||||
|
axs2[idx].add_patch(Rectangle((wait5, -10), 1, 20,
|
||||||
|
label="wait 5: skipped" if idx == 0 else "",
|
||||||
|
facecolor=colors_wait[5], alpha=alpha_wait_rect[5], hatch='\\\\'))
|
||||||
|
else:
|
||||||
|
axs2[idx].plot([wait5, wait5], [-10, 10],
|
||||||
|
linestyle=linestyles_wait[5], color=colors_wait[5],
|
||||||
|
label="wait 5: " + str(waittime5) + " clk" if idx == 0 else "",
|
||||||
|
linewidth=2.0, alpha=alpha_wait[5])
|
||||||
|
|
||||||
|
# =====================================================================================================
|
||||||
|
# Plot the loop lines
|
||||||
|
# Loop 0
|
||||||
|
if nloop0 is not None:
|
||||||
|
if nloop0 == 0:
|
||||||
|
axs2[idx].plot([loop0_start, loop0_start], [-10, 10],
|
||||||
|
linestyle=linestyles_loop[0], color=colors_loop[0],
|
||||||
|
alpha=alpha_loop[0], linewidth=2.0)
|
||||||
|
axs2[idx].plot([loop0_end + 1, loop0_end + 1], [-10, 10],
|
||||||
|
linestyle=linestyles_loop[0], color=colors_loop[0], alpha=alpha_loop[0], linewidth=2.0)
|
||||||
|
axs2[idx].add_patch(Rectangle((loop0_start, -10), loop0_end + 1 - loop0_start, 20,
|
||||||
|
label="loop 0: skipped" if idx == 0 else "",
|
||||||
|
facecolor=colors_loop[0], alpha=alpha_loop_rect[0], hatch='//'))
|
||||||
|
else:
|
||||||
|
axs2[idx].plot([loop0_start, loop0_start], [-10, 10],
|
||||||
|
linestyle=linestyles_loop[0], color=colors_loop[0], alpha=alpha_loop[0],
|
||||||
|
label="loop 0: " + str(nloop0) + " times" if idx == 0 else "", linewidth=2.0)
|
||||||
|
axs2[idx].plot([loop0_end, loop0_end], [-10, 10],
|
||||||
|
linestyle=linestyles_loop[0], color=colors_loop[0], alpha=alpha_loop[0], linewidth=2.0)
|
||||||
|
|
||||||
|
# Loop 1
|
||||||
|
if nloop1 is not None:
|
||||||
|
if nloop1 == 0:
|
||||||
|
axs2[idx].plot([loop1_start, loop1_start], [-10, 10],
|
||||||
|
linestyle=linestyles_loop[1], color=colors_loop[1],
|
||||||
|
alpha=alpha_loop[1], linewidth=2.0)
|
||||||
|
axs2[idx].plot([loop1_end + 1, loop1_end + 1], [-10, 10],
|
||||||
|
linestyle=linestyles_loop[1], color=colors_loop[1], alpha=alpha_loop[1], linewidth=2.0)
|
||||||
|
axs2[idx].add_patch(Rectangle((loop1_start, -10), loop1_end + 1 - loop1_start, 20,
|
||||||
|
label="loop 1: skipped" if idx == 0 else "",
|
||||||
|
facecolor=colors_loop[1], alpha=alpha_loop_rect[1], hatch='//'))
|
||||||
|
else:
|
||||||
|
axs2[idx].plot([loop1_start, loop1_start], [-10, 10],
|
||||||
|
linestyle=linestyles_loop[1], color=colors_loop[1], alpha=alpha_loop[1],
|
||||||
|
label="loop 1: " + str(nloop1) + " times" if idx == 0 else "", linewidth=2.0)
|
||||||
|
axs2[idx].plot([loop1_end, loop1_end], [-10, 10],
|
||||||
|
linestyle=linestyles_loop[1], color=colors_loop[1], alpha=alpha_loop[1], linewidth=2.0)
|
||||||
|
|
||||||
|
# Loop 2
|
||||||
|
if nloop2 is not None:
|
||||||
|
if nloop2 == 0:
|
||||||
|
axs2[idx].plot([loop2_start, loop2_start], [-10, 10],
|
||||||
|
linestyle=linestyles_loop[2], color=colors_loop[2],
|
||||||
|
alpha=alpha_loop[2], linewidth=2.0)
|
||||||
|
axs2[idx].plot([loop2_end + 1, loop2_end + 1], [-10, 10],
|
||||||
|
linestyle=linestyles_loop[2], color=colors_loop[2], alpha=alpha_loop[2], linewidth=2.0)
|
||||||
|
axs2[idx].add_patch(Rectangle((loop2_start, -10), loop2_end + 1 - loop2_start, 20,
|
||||||
|
label="loop 2: skipped" if idx == 0 else "",
|
||||||
|
facecolor=colors_loop[2], alpha=alpha_loop_rect[2], hatch='//'))
|
||||||
|
else:
|
||||||
|
axs2[idx].plot([loop2_start, loop2_start], [-10, 10],
|
||||||
|
linestyle=linestyles_loop[2], color=colors_loop[2], alpha=alpha_loop[2],
|
||||||
|
label="loop 2: " + str(nloop2) + " times" if idx == 0 else "", linewidth=2.0)
|
||||||
|
axs2[idx].plot([loop2_end, loop2_end], [-10, 10],
|
||||||
|
linestyle=linestyles_loop[2], color=colors_loop[2], alpha=alpha_loop[2], linewidth=2.0)
|
||||||
|
|
||||||
|
# Loop 3
|
||||||
|
if nloop3 is not None:
|
||||||
|
if nloop3 == 0:
|
||||||
|
axs2[idx].plot([loop3_start, loop3_start], [-10, 10],
|
||||||
|
linestyle=linestyles_loop[3], color=colors_loop[3],
|
||||||
|
alpha=alpha_loop[3], linewidth=2.0)
|
||||||
|
axs2[idx].plot([loop3_end + 1, loop3_end + 1], [-10, 10],
|
||||||
|
linestyle=linestyles_loop[3], color=colors_loop[3], alpha=alpha_loop[3], linewidth=2.0)
|
||||||
|
axs2[idx].add_patch(Rectangle((loop3_start, -10), loop3_end + 1 - loop3_start, 20,
|
||||||
|
label="loop 3: skipped" if idx == 0 else "",
|
||||||
|
facecolor=colors_loop[3], alpha=alpha_loop_rect[3], hatch='//'))
|
||||||
|
else:
|
||||||
|
axs2[idx].plot([loop3_start, loop3_start], [-10, 10],
|
||||||
|
linestyle=linestyles_loop[3], color=colors_loop[3], alpha=alpha_loop[3],
|
||||||
|
label="loop 3: " + str(nloop3) + " times" if idx == 0 else "", linewidth=2.0)
|
||||||
|
axs2[idx].plot([loop3_end, loop3_end], [-10, 10],
|
||||||
|
linestyle=linestyles_loop[3], color=colors_loop[3], alpha=alpha_loop[3], linewidth=2.0)
|
||||||
|
|
||||||
|
# Loop 4
|
||||||
|
if nloop4 is not None:
|
||||||
|
if nloop4 == 0:
|
||||||
|
axs2[idx].plot([loop4_start, loop4_start], [-10, 10],
|
||||||
|
linestyle=linestyles_loop[4], color=colors_loop[4],
|
||||||
|
alpha=alpha_loop[4], linewidth=2.0)
|
||||||
|
axs2[idx].plot([loop4_end + 1, loop4_end + 1], [-10, 10],
|
||||||
|
linestyle=linestyles_loop[4], color=colors_loop[4], alpha=alpha_loop[4], linewidth=2.0)
|
||||||
|
axs2[idx].add_patch(Rectangle((loop4_start, -10), loop4_end + 1 - loop4_start, 20,
|
||||||
|
label="loop 4: skipped" if idx == 0 else "",
|
||||||
|
facecolor=colors_loop[4], alpha=alpha_loop_rect[4], hatch='//'))
|
||||||
|
else:
|
||||||
|
axs2[idx].plot([loop4_start, loop4_start], [-10, 10],
|
||||||
|
linestyle=linestyles_loop[4], color=colors_loop[4], alpha=alpha_loop[4],
|
||||||
|
label="loop 4: " + str(nloop4) + " times" if idx == 0 else "", linewidth=2.0)
|
||||||
|
axs2[idx].plot([loop4_end, loop4_end], [-10, 10],
|
||||||
|
linestyle=linestyles_loop[4], color=colors_loop[4], alpha=alpha_loop[4], linewidth=2.0)
|
||||||
|
|
||||||
|
# Loop 5
|
||||||
|
if nloop5 is not None:
|
||||||
|
if nloop5 == 0:
|
||||||
|
axs2[idx].plot([loop5_start, loop5_start], [-10, 10],
|
||||||
|
linestyle=linestyles_loop[5], color=colors_loop[5],
|
||||||
|
alpha=alpha_loop[5], linewidth=2.0)
|
||||||
|
axs2[idx].plot([loop5_end + 1, loop5_end + 1], [-10, 10],
|
||||||
|
linestyle=linestyles_loop[5], color=colors_loop[5], alpha=alpha_loop[5], linewidth=2.0)
|
||||||
|
axs2[idx].add_patch(Rectangle((loop5_start, -10), loop5_end + 1 - loop5_start, 20,
|
||||||
|
label="loop 5: skipped" if idx == 0 else "",
|
||||||
|
facecolor=colors_loop[5], alpha=alpha_loop_rect[5], hatch='//'))
|
||||||
|
else:
|
||||||
|
axs2[idx].plot([loop5_start, loop5_start], [-10, 10],
|
||||||
|
linestyle=linestyles_loop[5], color=colors_loop[5], alpha=alpha_loop[5],
|
||||||
|
label="loop 5: " + str(nloop5) + " times" if idx == 0 else "", linewidth=2.0)
|
||||||
|
axs2[idx].plot([loop5_end, loop5_end], [-10, 10],
|
||||||
|
linestyle=linestyles_loop[5], color=colors_loop[5], alpha=alpha_loop[5], linewidth=2.0)
|
||||||
|
|
||||||
|
|
||||||
|
n_cols = count_nonzero([waittime0 != 0, waittime1 != 0, waittime2 != 0, waittime3 != 0, waittime4 != 0, waittime5 != 0,
|
||||||
|
nloop0 != 0, nloop1 != 0, nloop2 != 0, nloop3 != 0, nloop4 != 0, nloop5 != 0])
|
||||||
|
fig2.legend(loc="upper center", ncol=n_cols)
|
||||||
|
# manager = get_current_fig_manager()
|
||||||
|
# manager.window.showMaximized()
|
||||||
|
|
||||||
|
figure = plt.gcf() # get current figure
|
||||||
|
figure.set_size_inches(20, 10)
|
||||||
|
# when saving, specify the DPI
|
||||||
|
# tight_layout()
|
||||||
|
plt.savefig(Folder+"/"+File_pat+".png", dpi=300)
|
||||||
|
|
||||||
|
# Remove the white space around the plot -- only works on Unix (ImageMagick command)
|
||||||
|
os.system(f'mogrify -trim {Folder}/{File_pat}.png')
|
||||||
|
|
||||||
|
show()
|
@ -14,7 +14,6 @@ pycmd = dir(Detector)
|
|||||||
# dacs are in general not included in the python commands and we expect to
|
# dacs are in general not included in the python commands and we expect to
|
||||||
# set them from the specialized class or using an enum
|
# set them from the specialized class or using an enum
|
||||||
dacs = [
|
dacs = [
|
||||||
'adcvpp',
|
|
||||||
'iodelay',
|
'iodelay',
|
||||||
'list',
|
'list',
|
||||||
'rxb_lb',
|
'rxb_lb',
|
||||||
|
@ -7,7 +7,7 @@ Build upon the pybind11 example found here: https://github.com/pybind/python_exa
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
sys.path.append('../libs/pybind11')
|
sys.path.append('../libs/pybind')
|
||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
from pybind11.setup_helpers import Pybind11Extension, build_ext
|
from pybind11.setup_helpers import Pybind11Extension, build_ext
|
||||||
|
|
||||||
@ -22,19 +22,25 @@ def get_conda_path():
|
|||||||
return os.environ['CONDA_PREFIX']
|
return os.environ['CONDA_PREFIX']
|
||||||
|
|
||||||
|
|
||||||
#TODO migrate to CMake build?
|
#TODO migrate to CMake build or fetch files from cmake?
|
||||||
ext_modules = [
|
ext_modules = [
|
||||||
Pybind11Extension(
|
Pybind11Extension(
|
||||||
'_slsdet',
|
'_slsdet',
|
||||||
['src/main.cpp',
|
['src/main.cpp',
|
||||||
'src/current.cpp',
|
|
||||||
'src/enums.cpp',
|
'src/enums.cpp',
|
||||||
|
'src/current.cpp',
|
||||||
'src/detector.cpp',
|
'src/detector.cpp',
|
||||||
'src/network.cpp',
|
'src/network.cpp',
|
||||||
'src/pattern.cpp',
|
'src/pattern.cpp',
|
||||||
'src/scan.cpp',],
|
'src/scan.cpp',
|
||||||
|
'src/duration.cpp',
|
||||||
|
'src/DurationWrapper.cpp',
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
,
|
||||||
include_dirs=[
|
include_dirs=[
|
||||||
os.path.join('../libs/pybind11/include'),
|
os.path.join('../libs/pybind/include'),
|
||||||
os.path.join(get_conda_path(), 'include'),
|
os.path.join(get_conda_path(), 'include'),
|
||||||
|
|
||||||
],
|
],
|
||||||
|
@ -2,8 +2,9 @@
|
|||||||
|
|
||||||
BIT32_MASK=0xFFFFFFFF
|
BIT32_MASK=0xFFFFFFFF
|
||||||
MAX_RX_DBIT=64
|
MAX_RX_DBIT=64
|
||||||
DEFAULT_PORTNO=1952
|
DEFAULT_TCP_CNTRL_PORTNO=1952
|
||||||
DEFAULT_UDP_PORTNO=50001
|
DEFAULT_TCP_STOP_PORTNO=1953
|
||||||
|
DEFAULT_TCP_RX_PORTNO=1954
|
||||||
DEFAULT_ZMQ_CL_PORTNO=30001
|
DEFAULT_ZMQ_CL_PORTNO=30001
|
||||||
DEFAULT_ZMQ_RX_PORTNO=30001
|
DEFAULT_ZMQ_RX_PORTNO=30001
|
||||||
DEFAULT_UDP_SRC_PORTNO=32410
|
DEFAULT_UDP_SRC_PORTNO=32410
|
||||||
|
@ -14,7 +14,7 @@ streamingInterface = slsDetectorDefs.streamingInterface
|
|||||||
defs = slsDetectorDefs
|
defs = slsDetectorDefs
|
||||||
|
|
||||||
from .utils import element_if_equal, all_equal, get_set_bits, list_to_bitmask
|
from .utils import element_if_equal, all_equal, get_set_bits, list_to_bitmask
|
||||||
from .utils import Geometry, to_geo, element, reduce_time, is_iterable
|
from .utils import Geometry, to_geo, element, reduce_time, is_iterable, hostname_list
|
||||||
from _slsdet import xy
|
from _slsdet import xy
|
||||||
from . import utils as ut
|
from . import utils as ut
|
||||||
from .proxy import JsonProxy, SlowAdcProxy, ClkDivProxy, MaxPhaseProxy, ClkFreqProxy, PatLoopProxy, PatNLoopProxy, PatWaitProxy, PatWaitTimeProxy
|
from .proxy import JsonProxy, SlowAdcProxy, ClkDivProxy, MaxPhaseProxy, ClkFreqProxy, PatLoopProxy, PatNLoopProxy, PatWaitProxy, PatWaitTimeProxy
|
||||||
@ -162,12 +162,8 @@ class Detector(CppDetectorApi):
|
|||||||
|
|
||||||
@hostname.setter
|
@hostname.setter
|
||||||
def hostname(self, hostnames):
|
def hostname(self, hostnames):
|
||||||
if isinstance(hostnames, str):
|
args = hostname_list(hostnames)
|
||||||
hostnames = [hostnames]
|
self.setHostname(args)
|
||||||
if isinstance(hostnames, list):
|
|
||||||
self.setHostname(hostnames)
|
|
||||||
else:
|
|
||||||
raise ValueError("hostname needs to be string or list of strings")
|
|
||||||
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -225,9 +221,17 @@ class Detector(CppDetectorApi):
|
|||||||
Example
|
Example
|
||||||
-------
|
-------
|
||||||
>>> d.detectorserverversion
|
>>> d.detectorserverversion
|
||||||
'0x200910'
|
'7.0.0'
|
||||||
"""
|
"""
|
||||||
return ut.lhex(self.getDetectorServerVersion())
|
return self.getDetectorServerVersion()
|
||||||
|
|
||||||
|
@property
|
||||||
|
@element
|
||||||
|
def hardwareversion(self):
|
||||||
|
"""
|
||||||
|
[Jungfrau][Gotthard2][Myhten3][Gotthard][Ctb][Moench] Hardware version of detector.
|
||||||
|
"""
|
||||||
|
return ut.lhex(self.getHardwareVersion())
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
@ -249,21 +253,21 @@ class Detector(CppDetectorApi):
|
|||||||
Example
|
Example
|
||||||
-------
|
-------
|
||||||
>>> d.clientversion
|
>>> d.clientversion
|
||||||
'0x200810'
|
'7.0.1'
|
||||||
"""
|
"""
|
||||||
return hex(self.getClientVersion())
|
return self.getClientVersion()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def rx_version(self):
|
def rx_version(self):
|
||||||
"""Receiver version in format [0xYYMMDD]."""
|
"""Receiver version """
|
||||||
return ut.lhex(self.getReceiverVersion())
|
return self.getReceiverVersion()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def rx_threads(self):
|
def rx_threads(self):
|
||||||
"""
|
"""
|
||||||
Get thread ids from the receiver in order of [parent, tcp, listener 0, processor 0, streamer 0, listener 1, processor 1, streamer 1, arping].
|
Get kernel thread ids from the receiver in order of [parent, tcp, listener 0, processor 0, streamer 0, listener 1, processor 1, streamer 1, arping].
|
||||||
|
|
||||||
Note
|
Note
|
||||||
-----
|
-----
|
||||||
@ -458,16 +462,35 @@ class Detector(CppDetectorApi):
|
|||||||
-----
|
-----
|
||||||
[Mythen3] sets exposure time to all gate signals in auto and trigger mode (internal gating). To specify gateIndex, use getExptime or setExptime.
|
[Mythen3] sets exposure time to all gate signals in auto and trigger mode (internal gating). To specify gateIndex, use getExptime or setExptime.
|
||||||
|
|
||||||
:getter: always returns in seconds. To get in datetime.delta, use getExptime
|
:getter: always returns in seconds. To get in DurationWrapper, use getExptime
|
||||||
|
|
||||||
Example
|
Example
|
||||||
-----------
|
-----------
|
||||||
|
>>> # setting directly in seconds
|
||||||
>>> d.exptime = 1.05
|
>>> d.exptime = 1.05
|
||||||
>>> d.exptime = datetime.timedelta(minutes = 3, seconds = 1.23)
|
>>>
|
||||||
|
>>> # setting directly in seconds
|
||||||
|
>>> d.exptime = 5e-07
|
||||||
|
>>>
|
||||||
|
>>> # using timedelta (up to microseconds precision)
|
||||||
|
>>> from datatime import timedelta
|
||||||
|
>>> d.exptime = timedelta(seconds = 1, microseconds = 3)
|
||||||
|
>>>
|
||||||
|
>>> # using DurationWrapper to set in seconds
|
||||||
|
>>> from slsdet import DurationWrapper
|
||||||
|
>>> d.exptime = DurationWrapper(1.2)
|
||||||
|
>>>
|
||||||
|
>>> # using DurationWrapper to set in ns
|
||||||
|
>>> t = DurationWrapper()
|
||||||
|
>>> t.set_count(500)
|
||||||
|
>>> d.exptime = t
|
||||||
|
>>>
|
||||||
|
>>> # to get in seconds
|
||||||
>>> d.exptime
|
>>> d.exptime
|
||||||
181.23
|
181.23
|
||||||
|
>>>
|
||||||
>>> d.getExptime()
|
>>> d.getExptime()
|
||||||
[datetime.timedelta(seconds=181, microseconds=230000)]
|
[sls::DurationWrapper(total_seconds: 1e-08 count: 10)]
|
||||||
"""
|
"""
|
||||||
if self.type == detectorType.MYTHEN3:
|
if self.type == detectorType.MYTHEN3:
|
||||||
res = self.getExptimeForAllGates()
|
res = self.getExptimeForAllGates()
|
||||||
@ -495,16 +518,35 @@ class Detector(CppDetectorApi):
|
|||||||
|
|
||||||
Note
|
Note
|
||||||
-----
|
-----
|
||||||
:getter: always returns in seconds. To get in datetime.delta, use getPeriod
|
:getter: always returns in seconds. To get in DurationWrapper, use getPeriod
|
||||||
|
|
||||||
Example
|
Example
|
||||||
-----------
|
-----------
|
||||||
|
>>> # setting directly in seconds
|
||||||
>>> d.period = 1.05
|
>>> d.period = 1.05
|
||||||
>>> d.period = datetime.timedelta(minutes = 3, seconds = 1.23)
|
>>>
|
||||||
|
>>> # setting directly in seconds
|
||||||
|
>>> d.period = 5e-07
|
||||||
|
>>>
|
||||||
|
>>> # using timedelta (up to microseconds precision)
|
||||||
|
>>> from datatime import timedelta
|
||||||
|
>>> d.period = timedelta(seconds = 1, microseconds = 3)
|
||||||
|
>>>
|
||||||
|
>>> # using DurationWrapper to set in seconds
|
||||||
|
>>> from slsdet import DurationWrapper
|
||||||
|
>>> d.period = DurationWrapper(1.2)
|
||||||
|
>>>
|
||||||
|
>>> # using DurationWrapper to set in ns
|
||||||
|
>>> t = DurationWrapper()
|
||||||
|
>>> t.set_count(500)
|
||||||
|
>>> d.period = t
|
||||||
|
>>>
|
||||||
|
>>> # to get in seconds
|
||||||
>>> d.period
|
>>> d.period
|
||||||
181.23
|
181.23
|
||||||
>>> d.getPeriod()
|
>>>
|
||||||
[datetime.timedelta(seconds=181, microseconds=230000)]
|
>>> d.getExptime()
|
||||||
|
sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)
|
||||||
"""
|
"""
|
||||||
res = self.getPeriod()
|
res = self.getPeriod()
|
||||||
return reduce_time(res)
|
return reduce_time(res)
|
||||||
@ -524,7 +566,7 @@ class Detector(CppDetectorApi):
|
|||||||
-----
|
-----
|
||||||
[Gotthard2] only in continuous mode.
|
[Gotthard2] only in continuous mode.
|
||||||
|
|
||||||
:getter: always returns in seconds. To get in datetime.delta, use getPeriodLeft
|
:getter: always returns in seconds. To get in DurationWrapper, use getPeriodLeft
|
||||||
:setter: Not Implemented
|
:setter: Not Implemented
|
||||||
|
|
||||||
Example
|
Example
|
||||||
@ -532,7 +574,7 @@ class Detector(CppDetectorApi):
|
|||||||
>>> d.periodl
|
>>> d.periodl
|
||||||
181.23
|
181.23
|
||||||
>>> d.getPeriodLeft()
|
>>> d.getPeriodLeft()
|
||||||
[datetime.timedelta(seconds=181, microseconds=230000)]
|
[sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)]
|
||||||
"""
|
"""
|
||||||
return self.getPeriodLeft()
|
return self.getPeriodLeft()
|
||||||
|
|
||||||
@ -540,21 +582,40 @@ class Detector(CppDetectorApi):
|
|||||||
@element
|
@element
|
||||||
def delay(self):
|
def delay(self):
|
||||||
"""
|
"""
|
||||||
[Gotthard][Jungfrau][CTB][Moench][Mythen3][Gotthard2] Delay after trigger, accepts either a value in seconds or datetime.timedelta
|
[Gotthard][Jungfrau][CTB][Moench][Mythen3][Gotthard2] Delay after trigger, accepts either a value in seconds, DurationWrapper or datetime.timedelta
|
||||||
|
|
||||||
Note
|
Note
|
||||||
-----
|
-----
|
||||||
|
|
||||||
:getter: always returns in seconds. To get in datetime.delta, use getDelayAfterTrigger
|
:getter: always returns in seconds. To get in DurationWrapper, use getDelayAfterTrigger
|
||||||
|
|
||||||
Example
|
Example
|
||||||
-----------
|
-----------
|
||||||
|
>>> # setting directly in seconds
|
||||||
>>> d.delay = 1.05
|
>>> d.delay = 1.05
|
||||||
>>> d.delay = datetime.timedelta(minutes = 3, seconds = 1.23)
|
>>>
|
||||||
|
>>> # setting directly in seconds
|
||||||
|
>>> d.delay = 5e-07
|
||||||
|
>>>
|
||||||
|
>>> # using timedelta (up to microseconds precision)
|
||||||
|
>>> from datatime import timedelta
|
||||||
|
>>> d.delay = timedelta(seconds = 1, microseconds = 3)
|
||||||
|
>>>
|
||||||
|
>>> # using DurationWrapper to set in seconds
|
||||||
|
>>> from slsdet import DurationWrapper
|
||||||
|
>>> d.delay = DurationWrapper(1.2)
|
||||||
|
>>>
|
||||||
|
>>> # using DurationWrapper to set in ns
|
||||||
|
>>> t = DurationWrapper()
|
||||||
|
>>> t.set_count(500)
|
||||||
|
>>> d.delay = t
|
||||||
|
>>>
|
||||||
|
>>> # to get in seconds
|
||||||
>>> d.delay
|
>>> d.delay
|
||||||
181.23
|
181.23
|
||||||
|
>>>
|
||||||
>>> d.getDelayAfterTrigger()
|
>>> d.getDelayAfterTrigger()
|
||||||
[datetime.timedelta(seconds=181, microseconds=230000)]
|
sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)
|
||||||
"""
|
"""
|
||||||
return ut.reduce_time(self.getDelayAfterTrigger())
|
return ut.reduce_time(self.getDelayAfterTrigger())
|
||||||
|
|
||||||
@ -566,13 +627,13 @@ class Detector(CppDetectorApi):
|
|||||||
@element
|
@element
|
||||||
def delayl(self):
|
def delayl(self):
|
||||||
"""
|
"""
|
||||||
[Gotthard][Jungfrau][CTB][Moench][Mythen3][Gotthard2] Delay left after trigger during acquisition, accepts either a value in seconds or datetime.timedelta
|
[Gotthard][Jungfrau][CTB][Moench][Mythen3][Gotthard2] Delay left after trigger during acquisition, accepts either a value in seconds, datetime.timedelta or DurationWrapper
|
||||||
|
|
||||||
Note
|
Note
|
||||||
-----
|
-----
|
||||||
[Gotthard2] only in continuous mdoe.
|
[Gotthard2] only in continuous mdoe.
|
||||||
|
|
||||||
:getter: always returns in seconds. To get in datetime.delta, use getDelayAfterTriggerLeft
|
:getter: always returns in seconds. To get in DurationWrapper, use getDelayAfterTriggerLeft
|
||||||
:setter: Not Implemented
|
:setter: Not Implemented
|
||||||
|
|
||||||
Example
|
Example
|
||||||
@ -580,7 +641,7 @@ class Detector(CppDetectorApi):
|
|||||||
>>> d.delayl
|
>>> d.delayl
|
||||||
181.23
|
181.23
|
||||||
>>> d.getDelayAfterTriggerLeft()
|
>>> d.getDelayAfterTriggerLeft()
|
||||||
[datetime.timedelta(seconds=181, microseconds=230000)]
|
[sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)]
|
||||||
"""
|
"""
|
||||||
return ut.reduce_time(self.getDelayAfterTriggerLeft())
|
return ut.reduce_time(self.getDelayAfterTriggerLeft())
|
||||||
|
|
||||||
@ -619,25 +680,46 @@ class Detector(CppDetectorApi):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def txndelay_frame(self):
|
def txdelay(self):
|
||||||
|
"""
|
||||||
|
[Eiger][Jungfrau][Mythen3] Set transmission delay for all modules in the detector using the step size provided.
|
||||||
|
|
||||||
|
Note
|
||||||
|
----
|
||||||
|
Sets up the following for every module:\n
|
||||||
|
\t\t[Eiger] txdelay_left to (2 * mod_index * n_delay), \n
|
||||||
|
\t\t[Eiger] txdelay_right to ((2 * mod_index + 1) * n_delay) and \n
|
||||||
|
\t\t[Eiger] txdelay_frame to (2 *num_modules * n_delay) \n
|
||||||
|
\t\t[Jungfrau][Mythen3] txdelay_frame to (num_modules * n_delay)\n\n
|
||||||
|
Please refer txdelay_left, txdelay_right and txdelay_frame for details.
|
||||||
|
"""
|
||||||
|
return self.getTransmissionDelay()
|
||||||
|
|
||||||
|
@txdelay.setter
|
||||||
|
def txdelay(self, args):
|
||||||
|
ut.set_using_dict(self.setTransmissionDelay, args)
|
||||||
|
|
||||||
|
@property
|
||||||
|
@element
|
||||||
|
def txdelay_frame(self):
|
||||||
"""
|
"""
|
||||||
[Eiger][Jungfrau][Mythen3] Transmission delay of first udp packet being streamed out of the module.\n
|
[Eiger][Jungfrau][Mythen3] Transmission delay of first udp packet being streamed out of the module.\n
|
||||||
|
|
||||||
Note
|
Note
|
||||||
----
|
----
|
||||||
[Jungfrau] [0-31] Each value represents 1 ms. \n
|
[Jungfrau] [0-31] Each value represents 1 ms. \n
|
||||||
[Eiger] Additional delay to txndelay_left and txndelay_right. Each value represents 10ns. Typical value is 50000. \n
|
[Eiger] Additional delay to txdelay_left and txdelay_right. Each value represents 10ns. Typical value is 50000. \n
|
||||||
[Mythen3] [0-16777215] Each value represents 8 ns (125 MHz clock), max is 134 ms.
|
[Mythen3] [0-16777215] Each value represents 8 ns (125 MHz clock), max is 134 ms.
|
||||||
"""
|
"""
|
||||||
return self.getTransmissionDelayFrame()
|
return self.getTransmissionDelayFrame()
|
||||||
|
|
||||||
@txndelay_frame.setter
|
@txdelay_frame.setter
|
||||||
def txndelay_frame(self, args):
|
def txdelay_frame(self, args):
|
||||||
ut.set_using_dict(self.setTransmissionDelayFrame, args)
|
ut.set_using_dict(self.setTransmissionDelayFrame, args)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def txndelay_left(self):
|
def txdelay_left(self):
|
||||||
"""[Eiger] Transmission delay of first packet in an image being streamed out of the module's left UDP port.
|
"""[Eiger] Transmission delay of first packet in an image being streamed out of the module's left UDP port.
|
||||||
|
|
||||||
Note
|
Note
|
||||||
@ -646,13 +728,13 @@ class Detector(CppDetectorApi):
|
|||||||
"""
|
"""
|
||||||
return self.getTransmissionDelayLeft()
|
return self.getTransmissionDelayLeft()
|
||||||
|
|
||||||
@txndelay_left.setter
|
@txdelay_left.setter
|
||||||
def txndelay_left(self, args):
|
def txdelay_left(self, args):
|
||||||
ut.set_using_dict(self.setTransmissionDelayLeft, args)
|
ut.set_using_dict(self.setTransmissionDelayLeft, args)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def txndelay_right(self):
|
def txdelay_right(self):
|
||||||
"""
|
"""
|
||||||
[Eiger] Transmission delay of first packet in an image being streamed out of the module's right UDP port.
|
[Eiger] Transmission delay of first packet in an image being streamed out of the module's right UDP port.
|
||||||
|
|
||||||
@ -662,8 +744,8 @@ class Detector(CppDetectorApi):
|
|||||||
"""
|
"""
|
||||||
return self.getTransmissionDelayRight()
|
return self.getTransmissionDelayRight()
|
||||||
|
|
||||||
@txndelay_right.setter
|
@txdelay_right.setter
|
||||||
def txndelay_right(self, args):
|
def txdelay_right(self, args):
|
||||||
ut.set_using_dict(self.setTransmissionDelayRight, args)
|
ut.set_using_dict(self.setTransmissionDelayRight, args)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -698,7 +780,8 @@ class Detector(CppDetectorApi):
|
|||||||
|
|
||||||
@rx_hostname.setter
|
@rx_hostname.setter
|
||||||
def rx_hostname(self, hostname):
|
def rx_hostname(self, hostname):
|
||||||
self.setRxHostname(hostname)
|
args = hostname_list(hostname)
|
||||||
|
self.setRxHostname(args)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
@ -1482,6 +1565,20 @@ class Detector(CppDetectorApi):
|
|||||||
def trimval(self, value):
|
def trimval(self, value):
|
||||||
ut.set_using_dict(self.setAllTrimbits, value)
|
ut.set_using_dict(self.setAllTrimbits, value)
|
||||||
|
|
||||||
|
@property
|
||||||
|
@element
|
||||||
|
def fliprows(self):
|
||||||
|
"""
|
||||||
|
[Eiger] flips rows paramater sent to slsreceiver to stream as json parameter to flip rows in gui. \n
|
||||||
|
[Jungfrau] flips rows in the detector itself. For bottom module and number of interfaces must be set to 2. slsReceiver and slsDetectorGui does not handle.
|
||||||
|
"""
|
||||||
|
return self.getFlipRows()
|
||||||
|
|
||||||
|
@fliprows.setter
|
||||||
|
def fliprows(self, value):
|
||||||
|
ut.set_using_dict(self.setFlipRows, value)
|
||||||
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def master(self):
|
def master(self):
|
||||||
@ -1507,6 +1604,19 @@ class Detector(CppDetectorApi):
|
|||||||
def sync(self, value):
|
def sync(self, value):
|
||||||
ut.set_using_dict(self.setSynchronization, value)
|
ut.set_using_dict(self.setSynchronization, value)
|
||||||
|
|
||||||
|
@property
|
||||||
|
@element
|
||||||
|
def badchannels(self):
|
||||||
|
"""
|
||||||
|
[fname|none|0]\n\t[Gotthard2][Mythen3] Sets the bad channels (from file of bad channel numbers) to be masked out. None or 0 unsets all the badchannels.\n
|
||||||
|
[Mythen3] Also does trimming
|
||||||
|
"""
|
||||||
|
return self.getBadChannels()
|
||||||
|
|
||||||
|
@badchannels.setter
|
||||||
|
def badchannels(self, value):
|
||||||
|
ut.set_using_dict(self.setBadChannels, value)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@element
|
@element
|
||||||
def lock(self):
|
def lock(self):
|
||||||
@ -1716,11 +1826,21 @@ class Detector(CppDetectorApi):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def versions(self):
|
def versions(self):
|
||||||
|
if self.type == detectorType.EIGER:
|
||||||
|
return {'type': self.type,
|
||||||
|
'package': self.packageversion,
|
||||||
|
'client': self.clientversion,
|
||||||
|
'firmware': self.firmwareversion,
|
||||||
|
'detectorserver': self.detectorserverversion,
|
||||||
|
'kernel': self.kernelversion,
|
||||||
|
'receiver': self.rx_version}
|
||||||
|
|
||||||
return {'type': self.type,
|
return {'type': self.type,
|
||||||
'package': self.packageversion,
|
'package': self.packageversion,
|
||||||
'client': self.clientversion,
|
'client': self.clientversion,
|
||||||
'firmware': self.firmwareversion,
|
'firmware': self.firmwareversion,
|
||||||
'detectorserver': self.detectorserverversion,
|
'detectorserver': self.detectorserverversion,
|
||||||
|
'hardware':self.hardwareversion,
|
||||||
'kernel': self.kernelversion,
|
'kernel': self.kernelversion,
|
||||||
'receiver': self.rx_version}
|
'receiver': self.rx_version}
|
||||||
|
|
||||||
@ -1995,16 +2115,35 @@ class Detector(CppDetectorApi):
|
|||||||
----
|
----
|
||||||
Subperiod = subexptime + subdeadtime.
|
Subperiod = subexptime + subdeadtime.
|
||||||
|
|
||||||
:getter: always returns in seconds. To get in datetime.delta, use getSubExptime
|
:getter: always returns in seconds. To get in DurationWrapper, use getSubExptime
|
||||||
|
|
||||||
Example
|
Example
|
||||||
-----------
|
-----------
|
||||||
|
>>> # setting directly in seconds
|
||||||
>>> d.subexptime = 1.230203
|
>>> d.subexptime = 1.230203
|
||||||
>>> d.subexptime = datetime.timedelta(seconds = 1.23, microseconds = 203)
|
>>>
|
||||||
|
>>> # setting directly in seconds
|
||||||
|
>>> d.subexptime = 5e-07
|
||||||
|
>>>
|
||||||
|
>>> # using timedelta (up to microseconds precision)
|
||||||
|
>>> from datatime import timedelta
|
||||||
|
>>> d.subexptime = timedelta(seconds = 1.23, microseconds = 203)
|
||||||
|
>>>
|
||||||
|
>>> # using DurationWrapper to set in seconds
|
||||||
|
>>> from slsdet import DurationWrapper
|
||||||
|
>>> d.subexptime = DurationWrapper(1.2)
|
||||||
|
>>>
|
||||||
|
>>> # using DurationWrapper to set in ns
|
||||||
|
>>> t = DurationWrapper()
|
||||||
|
>>> t.set_count(500)
|
||||||
|
>>> d.subexptime = t
|
||||||
|
>>>
|
||||||
|
>>> # to get in seconds
|
||||||
>>> d.subexptime
|
>>> d.subexptime
|
||||||
1.230203
|
181.23
|
||||||
|
>>>
|
||||||
>>> d.getSubExptime()
|
>>> d.getSubExptime()
|
||||||
[datetime.timedelta(seconds = 1, microseconds = 203)]
|
sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)
|
||||||
"""
|
"""
|
||||||
res = self.getSubExptime()
|
res = self.getSubExptime()
|
||||||
return reduce_time(res)
|
return reduce_time(res)
|
||||||
@ -2036,22 +2175,41 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
def subdeadtime(self):
|
def subdeadtime(self):
|
||||||
"""
|
"""
|
||||||
[Eiger] Dead time of EIGER subframes in 32 bit mode, accepts either a value in seconds or datetime.timedelta
|
[Eiger] Dead time of EIGER subframes in 32 bit mode, accepts either a value in seconds, datetime.timedelta or DurationWrapper
|
||||||
|
|
||||||
Note
|
Note
|
||||||
----
|
----
|
||||||
Subperiod = subexptime + subdeadtime.
|
Subperiod = subexptime + subdeadtime.
|
||||||
|
|
||||||
:getter: always returns in seconds. To get in datetime.delta, use getSubDeadTime
|
:getter: always returns in seconds. To get in DurationWrapper, use getSubDeadTime
|
||||||
|
|
||||||
Example
|
Example
|
||||||
-----------
|
-----------
|
||||||
|
>>> # setting directly in seconds
|
||||||
>>> d.subdeadtime = 1.230203
|
>>> d.subdeadtime = 1.230203
|
||||||
>>> d.subdeadtime = datetime.timedelta(seconds = 1.23, microseconds = 203)
|
>>>
|
||||||
|
>>> # setting directly in seconds
|
||||||
|
>>> d.subdeadtime = 5e-07
|
||||||
|
>>>
|
||||||
|
>>> # using timedelta (up to microseconds precision)
|
||||||
|
>>> from datatime import timedelta
|
||||||
|
>>> d.subdeadtime = timedelta(seconds = 1.23, microseconds = 203)
|
||||||
|
>>>
|
||||||
|
>>> # using DurationWrapper to set in seconds
|
||||||
|
>>> from slsdet import DurationWrapper
|
||||||
|
>>> d.subdeadtime = DurationWrapper(1.2)
|
||||||
|
>>>
|
||||||
|
>>> # using DurationWrapper to set in ns
|
||||||
|
>>> t = DurationWrapper()
|
||||||
|
>>> t.set_count(500)
|
||||||
|
>>> d.subdeadtime = t
|
||||||
|
>>>
|
||||||
|
>>> # to get in seconds
|
||||||
>>> d.subdeadtime
|
>>> d.subdeadtime
|
||||||
1.230203
|
181.23
|
||||||
|
>>>
|
||||||
>>> d.getSubDeadTime()
|
>>> d.getSubDeadTime()
|
||||||
[datetime.timedelta(seconds = 1, microseconds = 203)]
|
sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)
|
||||||
"""
|
"""
|
||||||
res = self.getSubDeadTime()
|
res = self.getSubDeadTime()
|
||||||
return reduce_time(res)
|
return reduce_time(res)
|
||||||
@ -2227,16 +2385,35 @@ class Detector(CppDetectorApi):
|
|||||||
-----
|
-----
|
||||||
It is only possible for chipv1.1.
|
It is only possible for chipv1.1.
|
||||||
|
|
||||||
:getter: always returns in seconds. To get in datetime.delta, use getComparatorDisableTime
|
:getter: always returns in seconds. To get in DurationWrapper, use getComparatorDisableTime
|
||||||
|
|
||||||
Example
|
Example
|
||||||
-----------
|
-----------
|
||||||
|
>>> # setting directly in seconds
|
||||||
>>> d.compdisabletime = 1.05
|
>>> d.compdisabletime = 1.05
|
||||||
>>> d.compdisabletime = datetime.timedelta(minutes = 3, seconds = 1.23)
|
>>>
|
||||||
|
>>> # setting directly in seconds
|
||||||
|
>>> d.compdisabletime = 5e-07
|
||||||
|
>>>
|
||||||
|
>>> # using timedelta (up to microseconds precision)
|
||||||
|
>>> from datatime import timedelta
|
||||||
|
>>> d.compdisabletime = timedelta(seconds = 1, microseconds = 3)
|
||||||
|
>>>
|
||||||
|
>>> # using DurationWrapper to set in seconds
|
||||||
|
>>> from slsdet import DurationWrapper
|
||||||
|
>>> d.compdisabletime = DurationWrapper(1.2)
|
||||||
|
>>>
|
||||||
|
>>> # using DurationWrapper to set in ns
|
||||||
|
>>> t = DurationWrapper()
|
||||||
|
>>> t.set_count(500)
|
||||||
|
>>> d.compdisabletime = t
|
||||||
|
>>>
|
||||||
|
>>> # to get in seconds
|
||||||
>>> d.compdisabletime
|
>>> d.compdisabletime
|
||||||
181.23
|
181.23
|
||||||
|
>>>
|
||||||
>>> d.getComparatorDisableTime()
|
>>> d.getComparatorDisableTime()
|
||||||
[datetime.timedelta(seconds=181, microseconds=230000)]
|
sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)
|
||||||
"""
|
"""
|
||||||
return ut.reduce_time(self.getComparatorDisableTime())
|
return ut.reduce_time(self.getComparatorDisableTime())
|
||||||
|
|
||||||
@ -2294,23 +2471,42 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
def storagecell_delay(self):
|
def storagecell_delay(self):
|
||||||
"""
|
"""
|
||||||
[Jungfrau] Additional time delay between 2 consecutive exposures in burst mode, accepts either a value in seconds or datetime.timedelta
|
[Jungfrau] Additional time delay between 2 consecutive exposures in burst mode, accepts either a value in seconds, datetime.timedelta or DurationWrapper
|
||||||
|
|
||||||
Note
|
Note
|
||||||
-----
|
-----
|
||||||
Only applicable for chipv1.0. For advanced users only \n
|
Only applicable for chipv1.0. For advanced users only \n
|
||||||
Value: 0-1638375 ns (resolution of 25ns)
|
Value: 0-1638375 ns (resolution of 25ns)
|
||||||
|
|
||||||
:getter: always returns in seconds. To get in datetime.delta, use getStorageCellDelay
|
:getter: always returns in seconds. To get in DurationWrapper, use getStorageCellDelay
|
||||||
|
|
||||||
Example
|
Example
|
||||||
-----------
|
-----------
|
||||||
>>> d.storagecell_delay = 0.00056
|
>>> # setting directly in seconds
|
||||||
>>> d.storagecell_delay = datetime.timedelta(microseconds = 45)
|
>>> d.storagecell_delay = 1.05
|
||||||
|
>>>
|
||||||
|
>>> # setting directly in seconds
|
||||||
|
>>> d.storagecell_delay = 5e-07
|
||||||
|
>>>
|
||||||
|
>>> # using timedelta (up to microseconds precision)
|
||||||
|
>>> from datatime import timedelta
|
||||||
|
>>> d.storagecell_delay = timedelta(seconds = 1, microseconds = 3)
|
||||||
|
>>>
|
||||||
|
>>> # using DurationWrapper to set in seconds
|
||||||
|
>>> from slsdet import DurationWrapper
|
||||||
|
>>> d.storagecell_delay = DurationWrapper(1.2)
|
||||||
|
>>>
|
||||||
|
>>> # using DurationWrapper to set in ns
|
||||||
|
>>> t = DurationWrapper()
|
||||||
|
>>> t.set_count(500)
|
||||||
|
>>> d.storagecell_delay = t
|
||||||
|
>>>
|
||||||
|
>>> # to get in seconds
|
||||||
>>> d.storagecell_delay
|
>>> d.storagecell_delay
|
||||||
4.5e-05
|
181.23
|
||||||
|
>>>
|
||||||
>>> d.getStorageCellDelay()
|
>>> d.getStorageCellDelay()
|
||||||
[datetime.timedelta(microseconds=45)]
|
sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)
|
||||||
"""
|
"""
|
||||||
return ut.reduce_time(self.getStorageCellDelay())
|
return ut.reduce_time(self.getStorageCellDelay())
|
||||||
|
|
||||||
@ -2584,18 +2780,36 @@ class Detector(CppDetectorApi):
|
|||||||
Note
|
Note
|
||||||
-----
|
-----
|
||||||
|
|
||||||
:getter: always returns in seconds. To get in datetime.delta, use getBurstPeriod
|
:getter: always returns in seconds. To get in DurationWrapper, use getBurstPeriod
|
||||||
:setter: Not Implemented
|
:setter: Not Implemented
|
||||||
|
|
||||||
Example
|
Example
|
||||||
-----------
|
-----------
|
||||||
|
>>> # setting directly in seconds
|
||||||
>>> d.burstperiod = 1.05
|
>>> d.burstperiod = 1.05
|
||||||
>>> d.burstperiod = datetime.timedelta(minutes = 3, seconds = 1.23)
|
>>>
|
||||||
|
>>> # setting directly in seconds
|
||||||
|
>>> d.burstperiod = 5e-07
|
||||||
|
>>>
|
||||||
|
>>> # using timedelta (up to microseconds precision)
|
||||||
|
>>> from datatime import timedelta
|
||||||
|
>>> d.burstperiod = timedelta(seconds = 1, microseconds = 3)
|
||||||
|
>>>
|
||||||
|
>>> # using DurationWrapper to set in seconds
|
||||||
|
>>> from slsdet import DurationWrapper
|
||||||
|
>>> d.burstperiod = DurationWrapper(1.2)
|
||||||
|
>>>
|
||||||
|
>>> # using DurationWrapper to set in ns
|
||||||
|
>>> t = DurationWrapper()
|
||||||
|
>>> t.set_count(500)
|
||||||
|
>>> d.burstperiod = t
|
||||||
|
>>>
|
||||||
|
>>> # to get in seconds
|
||||||
>>> d.burstperiod
|
>>> d.burstperiod
|
||||||
181.23
|
181.23
|
||||||
|
>>>
|
||||||
>>> d.getBurstPeriod()
|
>>> d.getBurstPeriod()
|
||||||
[datetime.timedelta(seconds=181, microseconds=230000)]
|
sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)
|
||||||
|
|
||||||
"""
|
"""
|
||||||
return ut.reduce_time(self.getBurstPeriod())
|
return ut.reduce_time(self.getBurstPeriod())
|
||||||
|
|
||||||
@ -2720,25 +2934,41 @@ class Detector(CppDetectorApi):
|
|||||||
@property
|
@property
|
||||||
def gatedelay(self):
|
def gatedelay(self):
|
||||||
"""
|
"""
|
||||||
[Mythen3] Gate Delay of all gate signals in auto and trigger mode (internal gating), accepts either a value in seconds or datetime.timedelta
|
[Mythen3] Gate Delay of all gate signals in auto and trigger mode (internal gating), accepts either a value in seconds, datetime.timedelta or DurationWrapper
|
||||||
|
|
||||||
Note
|
Note
|
||||||
-----
|
-----
|
||||||
To specify gateIndex, use getGateDelay or setGateDelay.
|
To specify gateIndex, use getGateDelay or setGateDelay.
|
||||||
|
|
||||||
:getter: always returns in seconds. To get in datetime.delta, use getGateDelayForAllGates or getGateDelay(gateIndex)
|
:getter: always returns in seconds. To get in DurationWrapper, use getGateDelayForAllGates or getGateDelay(gateIndex)
|
||||||
|
|
||||||
Example
|
Example
|
||||||
-----------
|
-----------
|
||||||
|
>>> # setting directly in seconds
|
||||||
>>> d.gatedelay = 1.05
|
>>> d.gatedelay = 1.05
|
||||||
>>> d.gatedelay = datetime.timedelta(minutes = 3, seconds = 1.23)
|
>>>
|
||||||
|
>>> # setting directly in seconds
|
||||||
|
>>> d.gatedelay = 5e-07
|
||||||
|
>>>
|
||||||
|
>>> # using timedelta (up to microseconds precision)
|
||||||
|
>>> from datatime import timedelta
|
||||||
|
>>> d.gatedelay = timedelta(seconds = 1, microseconds = 3)
|
||||||
|
>>>
|
||||||
|
>>> # using DurationWrapper to set in seconds
|
||||||
|
>>> from slsdet import DurationWrapper
|
||||||
|
>>> d.gatedelay = DurationWrapper(1.2)
|
||||||
|
>>>
|
||||||
|
>>> # using DurationWrapper to set in ns
|
||||||
|
>>> t = DurationWrapper()
|
||||||
|
>>> t.set_count(500)
|
||||||
|
>>> d.gatedelay = t
|
||||||
|
>>>
|
||||||
|
>>> # to get in seconds
|
||||||
>>> d.gatedelay
|
>>> d.gatedelay
|
||||||
181.23
|
181.23
|
||||||
>>> d.setGateDelay(1, datetime.timedelta(seconds = 2))
|
>>>
|
||||||
>>> d.gatedelay
|
|
||||||
>>> [1.0, 2.0, 1.0]
|
|
||||||
>>> d.getExptimeForAllGates()
|
>>> d.getExptimeForAllGates()
|
||||||
>>> [[datetime.timedelta(seconds=181, microseconds=230000), datetime.timedelta(seconds=181, microseconds=230000), datetime.timedelta(seconds=181, microseconds=230000)]]
|
sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)
|
||||||
"""
|
"""
|
||||||
return reduce_time(self.getGateDelayForAllGates())
|
return reduce_time(self.getGateDelayForAllGates())
|
||||||
|
|
||||||
@ -3542,7 +3772,7 @@ class Detector(CppDetectorApi):
|
|||||||
Note
|
Note
|
||||||
-----
|
-----
|
||||||
|
|
||||||
:getter: always returns in seconds. To get in datetime.delta, use getExptimeLeft
|
:getter: always returns in seconds. To get in DurationWrapper, use getExptimeLeft
|
||||||
:setter: Not Implemented
|
:setter: Not Implemented
|
||||||
|
|
||||||
Example
|
Example
|
||||||
@ -3550,7 +3780,7 @@ class Detector(CppDetectorApi):
|
|||||||
>>> d.exptimel
|
>>> d.exptimel
|
||||||
181.23
|
181.23
|
||||||
>>> d.getExptimeLeft()
|
>>> d.getExptimeLeft()
|
||||||
[datetime.timedelta(seconds=181, microseconds=230000)]
|
[sls::DurationWrapper(total_seconds: 181.23 count: 181230000000)]
|
||||||
"""
|
"""
|
||||||
t = self.getExptimeLeft()
|
t = self.getExptimeLeft()
|
||||||
return reduce_time(t)
|
return reduce_time(t)
|
||||||
|
@ -261,3 +261,20 @@ def merge_args(*args):
|
|||||||
|
|
||||||
else:
|
else:
|
||||||
raise ValueError("Multiple dictionaries passes cannot merge args")
|
raise ValueError("Multiple dictionaries passes cannot merge args")
|
||||||
|
|
||||||
|
|
||||||
|
def hostname_list(args):
|
||||||
|
"""
|
||||||
|
Generates a list from a hostname string
|
||||||
|
* Lists are passed through
|
||||||
|
* as are tuples (conversion in pybind11 to vector)
|
||||||
|
* if + is found it splits the string
|
||||||
|
"""
|
||||||
|
if isinstance(args, (list, tuple)):
|
||||||
|
return args
|
||||||
|
elif(isinstance(args, str)):
|
||||||
|
hosts = args.split('+')
|
||||||
|
hosts = [it for it in hosts if len(it)]
|
||||||
|
return hosts
|
||||||
|
else:
|
||||||
|
raise ValueError("hostname needs to be string or list of strings")
|
||||||
|
@ -55,16 +55,22 @@ void init_det(py::module &m) {
|
|||||||
(int (Detector::*)() const) & Detector::getShmId);
|
(int (Detector::*)() const) & Detector::getShmId);
|
||||||
CppDetectorApi.def("getPackageVersion", (std::string(Detector::*)() const) &
|
CppDetectorApi.def("getPackageVersion", (std::string(Detector::*)() const) &
|
||||||
Detector::getPackageVersion);
|
Detector::getPackageVersion);
|
||||||
CppDetectorApi.def("getClientVersion", (int64_t(Detector::*)() const) &
|
CppDetectorApi.def("getClientVersion", (std::string(Detector::*)() const) &
|
||||||
Detector::getClientVersion);
|
Detector::getClientVersion);
|
||||||
CppDetectorApi.def("getFirmwareVersion",
|
CppDetectorApi.def("getFirmwareVersion",
|
||||||
(Result<int64_t>(Detector::*)(sls::Positions) const) &
|
(Result<int64_t>(Detector::*)(sls::Positions) const) &
|
||||||
Detector::getFirmwareVersion,
|
Detector::getFirmwareVersion,
|
||||||
py::arg() = Positions{});
|
py::arg() = Positions{});
|
||||||
CppDetectorApi.def("getDetectorServerVersion",
|
CppDetectorApi.def(
|
||||||
(Result<int64_t>(Detector::*)(sls::Positions) const) &
|
"getDetectorServerVersion",
|
||||||
Detector::getDetectorServerVersion,
|
(Result<std::string>(Detector::*)(sls::Positions) const) &
|
||||||
py::arg() = Positions{});
|
Detector::getDetectorServerVersion,
|
||||||
|
py::arg() = Positions{});
|
||||||
|
CppDetectorApi.def(
|
||||||
|
"getHardwareVersion",
|
||||||
|
(Result<std::string>(Detector::*)(sls::Positions) const) &
|
||||||
|
Detector::getHardwareVersion,
|
||||||
|
py::arg() = Positions{});
|
||||||
CppDetectorApi.def(
|
CppDetectorApi.def(
|
||||||
"getKernelVersion",
|
"getKernelVersion",
|
||||||
(Result<std::string>(Detector::*)(sls::Positions) const) &
|
(Result<std::string>(Detector::*)(sls::Positions) const) &
|
||||||
@ -78,10 +84,11 @@ void init_det(py::module &m) {
|
|||||||
(Result<int>(Detector::*)(sls::Positions) const) &
|
(Result<int>(Detector::*)(sls::Positions) const) &
|
||||||
Detector::getModuleId,
|
Detector::getModuleId,
|
||||||
py::arg() = Positions{});
|
py::arg() = Positions{});
|
||||||
CppDetectorApi.def("getReceiverVersion",
|
CppDetectorApi.def(
|
||||||
(Result<int64_t>(Detector::*)(sls::Positions) const) &
|
"getReceiverVersion",
|
||||||
Detector::getReceiverVersion,
|
(Result<std::string>(Detector::*)(sls::Positions) const) &
|
||||||
py::arg() = Positions{});
|
Detector::getReceiverVersion,
|
||||||
|
py::arg() = Positions{});
|
||||||
CppDetectorApi.def(
|
CppDetectorApi.def(
|
||||||
"getDetectorType",
|
"getDetectorType",
|
||||||
(Result<defs::detectorType>(Detector::*)(sls::Positions) const) &
|
(Result<defs::detectorType>(Detector::*)(sls::Positions) const) &
|
||||||
@ -202,6 +209,31 @@ void init_det(py::module &m) {
|
|||||||
CppDetectorApi.def(
|
CppDetectorApi.def(
|
||||||
"setSynchronization",
|
"setSynchronization",
|
||||||
(void (Detector::*)(bool)) & Detector::setSynchronization, py::arg());
|
(void (Detector::*)(bool)) & Detector::setSynchronization, py::arg());
|
||||||
|
CppDetectorApi.def(
|
||||||
|
"getBadChannels",
|
||||||
|
(void (Detector::*)(const std::string &, sls::Positions) const) &
|
||||||
|
Detector::getBadChannels,
|
||||||
|
py::arg(), py::arg() = Positions{});
|
||||||
|
CppDetectorApi.def(
|
||||||
|
"setBadChannels",
|
||||||
|
(void (Detector::*)(const std::string &, sls::Positions)) &
|
||||||
|
Detector::setBadChannels,
|
||||||
|
py::arg(), py::arg() = Positions{});
|
||||||
|
CppDetectorApi.def(
|
||||||
|
"getBadChannels",
|
||||||
|
(Result<std::vector<int>>(Detector::*)(sls::Positions) const) &
|
||||||
|
Detector::getBadChannels,
|
||||||
|
py::arg() = Positions{});
|
||||||
|
CppDetectorApi.def(
|
||||||
|
"setBadChannels",
|
||||||
|
(void (Detector::*)(const std::vector<int>, sls::Positions)) &
|
||||||
|
Detector::setBadChannels,
|
||||||
|
py::arg(), py::arg() = Positions{});
|
||||||
|
CppDetectorApi.def(
|
||||||
|
"setBadChannels",
|
||||||
|
(void (Detector::*)(const std::vector<std::vector<int>>)) &
|
||||||
|
Detector::setBadChannels,
|
||||||
|
py::arg());
|
||||||
CppDetectorApi.def("isVirtualDetectorServer",
|
CppDetectorApi.def("isVirtualDetectorServer",
|
||||||
(Result<bool>(Detector::*)(sls::Positions) const) &
|
(Result<bool>(Detector::*)(sls::Positions) const) &
|
||||||
Detector::isVirtualDetectorServer,
|
Detector::isVirtualDetectorServer,
|
||||||
@ -766,6 +798,12 @@ void init_det(py::module &m) {
|
|||||||
(void (Detector::*)(int, sls::Positions)) &
|
(void (Detector::*)(int, sls::Positions)) &
|
||||||
Detector::setTransmissionDelayRight,
|
Detector::setTransmissionDelayRight,
|
||||||
py::arg(), py::arg() = Positions{});
|
py::arg(), py::arg() = Positions{});
|
||||||
|
CppDetectorApi.def("getTransmissionDelay",
|
||||||
|
(int (Detector::*)() const) &
|
||||||
|
Detector::getTransmissionDelay);
|
||||||
|
CppDetectorApi.def(
|
||||||
|
"setTransmissionDelay",
|
||||||
|
(void (Detector::*)(int)) & Detector::setTransmissionDelay, py::arg());
|
||||||
CppDetectorApi.def("getUseReceiverFlag",
|
CppDetectorApi.def("getUseReceiverFlag",
|
||||||
(Result<bool>(Detector::*)(sls::Positions) const) &
|
(Result<bool>(Detector::*)(sls::Positions) const) &
|
||||||
Detector::getUseReceiverFlag,
|
Detector::getUseReceiverFlag,
|
||||||
@ -1340,16 +1378,6 @@ void init_det(py::module &m) {
|
|||||||
(void (Detector::*)(const int, const int, const int, sls::Positions)) &
|
(void (Detector::*)(const int, const int, const int, sls::Positions)) &
|
||||||
Detector::setADCConfiguration,
|
Detector::setADCConfiguration,
|
||||||
py::arg(), py::arg(), py::arg(), py::arg() = Positions{});
|
py::arg(), py::arg(), py::arg(), py::arg() = Positions{});
|
||||||
CppDetectorApi.def(
|
|
||||||
"getBadChannels",
|
|
||||||
(void (Detector::*)(const std::string &, sls::Positions) const) &
|
|
||||||
Detector::getBadChannels,
|
|
||||||
py::arg(), py::arg() = Positions{});
|
|
||||||
CppDetectorApi.def(
|
|
||||||
"setBadChannels",
|
|
||||||
(void (Detector::*)(const std::string &, sls::Positions)) &
|
|
||||||
Detector::setBadChannels,
|
|
||||||
py::arg(), py::arg() = Positions{});
|
|
||||||
CppDetectorApi.def("getCounterMask",
|
CppDetectorApi.def("getCounterMask",
|
||||||
(Result<uint32_t>(Detector::*)(sls::Positions) const) &
|
(Result<uint32_t>(Detector::*)(sls::Positions) const) &
|
||||||
Detector::getCounterMask,
|
Detector::getCounterMask,
|
||||||
@ -1493,6 +1521,14 @@ void init_det(py::module &m) {
|
|||||||
(void (Detector::*)(defs::dacIndex, int, sls::Positions)) &
|
(void (Detector::*)(defs::dacIndex, int, sls::Positions)) &
|
||||||
Detector::setVoltage,
|
Detector::setVoltage,
|
||||||
py::arg(), py::arg(), py::arg() = Positions{});
|
py::arg(), py::arg(), py::arg() = Positions{});
|
||||||
|
CppDetectorApi.def("getADCVpp",
|
||||||
|
(Result<int>(Detector::*)(bool, sls::Positions) const) &
|
||||||
|
Detector::getADCVpp,
|
||||||
|
py::arg() = false, py::arg() = Positions{});
|
||||||
|
CppDetectorApi.def("setADCVpp",
|
||||||
|
(void (Detector::*)(int, bool, sls::Positions)) &
|
||||||
|
Detector::setADCVpp,
|
||||||
|
py::arg(), py::arg() = false, py::arg() = Positions{});
|
||||||
CppDetectorApi.def("getADCEnableMask",
|
CppDetectorApi.def("getADCEnableMask",
|
||||||
(Result<uint32_t>(Detector::*)(sls::Positions) const) &
|
(Result<uint32_t>(Detector::*)(sls::Positions) const) &
|
||||||
Detector::getADCEnableMask,
|
Detector::getADCEnableMask,
|
||||||
|
@ -12,6 +12,7 @@ void init_duration(py::module &m) {
|
|||||||
.def("total_seconds", &DurationWrapper::total_seconds)
|
.def("total_seconds", &DurationWrapper::total_seconds)
|
||||||
.def("count", &DurationWrapper::count)
|
.def("count", &DurationWrapper::count)
|
||||||
.def("set_count", &DurationWrapper::set_count)
|
.def("set_count", &DurationWrapper::set_count)
|
||||||
|
.def("__eq__", &DurationWrapper::operator==)
|
||||||
.def("__repr__", [](const DurationWrapper &self) {
|
.def("__repr__", [](const DurationWrapper &self) {
|
||||||
std::stringstream ss;
|
std::stringstream ss;
|
||||||
ss << "sls::DurationWrapper(total_seconds: " << self.total_seconds()
|
ss << "sls::DurationWrapper(total_seconds: " << self.total_seconds()
|
||||||
|
@ -8,7 +8,7 @@ Testing functions from utils.py
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from slsdet.utils import *
|
from slsdet.utils import *
|
||||||
from slsdet import IpAddr, MacAddr
|
from slsdet import IpAddr, MacAddr, DurationWrapper
|
||||||
import datetime as dt
|
import datetime as dt
|
||||||
import pathlib
|
import pathlib
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@ -22,7 +22,11 @@ def test_iterable():
|
|||||||
|
|
||||||
|
|
||||||
def test_reduce_time_to_single_value_from_list():
|
def test_reduce_time_to_single_value_from_list():
|
||||||
t = 3 * [dt.timedelta(seconds=1)]
|
t = [dt.timedelta(seconds=1) for i in range(3)]
|
||||||
|
assert reduce_time(t) == 1
|
||||||
|
|
||||||
|
def test_reduce_time_to_single_value_from_list_DurationWrapper():
|
||||||
|
t = [DurationWrapper(1) for i in range(3)]
|
||||||
assert reduce_time(t) == 1
|
assert reduce_time(t) == 1
|
||||||
|
|
||||||
|
|
||||||
@ -83,6 +87,12 @@ def test_all_equal_str_fails():
|
|||||||
assert all_equal('aaab') == False
|
assert all_equal('aaab') == False
|
||||||
|
|
||||||
|
|
||||||
|
def test_all_equal_DurationWrapper():
|
||||||
|
assert all_equal([DurationWrapper(1), DurationWrapper(1)])
|
||||||
|
|
||||||
|
def test_all_equal_DurationWrapper_fail():
|
||||||
|
assert not all_equal([DurationWrapper(1), DurationWrapper(2)])
|
||||||
|
|
||||||
def test_element_if_equal_int():
|
def test_element_if_equal_int():
|
||||||
assert element_if_equal([5, 5]) == 5
|
assert element_if_equal([5, 5]) == 5
|
||||||
|
|
||||||
@ -342,3 +352,32 @@ def test_merge_args_tuple():
|
|||||||
|
|
||||||
def test_merge_args_dict_with_tuple():
|
def test_merge_args_dict_with_tuple():
|
||||||
assert merge_args({0: (1,2)}, 3) == ({0: (1,2,3)},)
|
assert merge_args({0: (1,2)}, 3) == ({0: (1,2,3)},)
|
||||||
|
|
||||||
|
|
||||||
|
def test_hostname_to_list():
|
||||||
|
s = "localhost"
|
||||||
|
r = hostname_list(s)
|
||||||
|
assert r == [s]
|
||||||
|
|
||||||
|
def test_hostname_to_list_passthrough():
|
||||||
|
args = ["localhost"]
|
||||||
|
ret = hostname_list(args)
|
||||||
|
assert ret == args
|
||||||
|
|
||||||
|
args = ("localhost",)
|
||||||
|
ret = hostname_list(args)
|
||||||
|
assert ret == args
|
||||||
|
|
||||||
|
def test_splitting_hostname():
|
||||||
|
args = 'apple+banana+pear+'
|
||||||
|
ret = hostname_list(args)
|
||||||
|
assert ret == ['apple', 'banana', 'pear']
|
||||||
|
|
||||||
|
#not sensitive to trailing +
|
||||||
|
args = 'apple+banana+pear'
|
||||||
|
ret = hostname_list(args)
|
||||||
|
assert ret == ['apple', 'banana', 'pear']
|
||||||
|
|
||||||
|
def test_hostame_throws_on_wrong_args():
|
||||||
|
with pytest.raises(Exception) as e:
|
||||||
|
hostname_list(5)
|
||||||
|
@ -1 +0,0 @@
|
|||||||
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv6.1.0
|
|
1
serverBin/ctbDetectorServerv7.0.0.rc3
Symbolic link
1
serverBin/ctbDetectorServerv7.0.0.rc3
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../slsDetectorServers/ctbDetectorServer/bin/ctbDetectorServerv7.0.0.rc3
|
@ -1 +0,0 @@
|
|||||||
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv6.1.0
|
|
1
serverBin/eigerDetectorServerv7.0.0.rc3
Symbolic link
1
serverBin/eigerDetectorServerv7.0.0.rc3
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../slsDetectorServers/eigerDetectorServer/bin/eigerDetectorServerv7.0.0.rc3
|
@ -1 +0,0 @@
|
|||||||
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv6.1.0
|
|
1
serverBin/gotthard2DetectorServerv7.0.0.rc3
Symbolic link
1
serverBin/gotthard2DetectorServerv7.0.0.rc3
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../slsDetectorServers/gotthard2DetectorServer/bin/gotthard2DetectorServerv7.0.0.rc3
|
@ -1 +0,0 @@
|
|||||||
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv6.1.0
|
|
1
serverBin/gotthardDetectorServerv7.0.0.rc3
Symbolic link
1
serverBin/gotthardDetectorServerv7.0.0.rc3
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../slsDetectorServers/gotthardDetectorServer/bin/gotthardDetectorServerv7.0.0.rc3
|
@ -1 +0,0 @@
|
|||||||
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv6.1.0
|
|
1
serverBin/jungfrauDetectorServerv7.0.0.rc3
Symbolic link
1
serverBin/jungfrauDetectorServerv7.0.0.rc3
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../slsDetectorServers/jungfrauDetectorServer/bin/jungfrauDetectorServerv7.0.0.rc3
|
@ -1 +0,0 @@
|
|||||||
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv6.1.0
|
|
1
serverBin/moenchDetectorServerv7.0.0.rc3
Symbolic link
1
serverBin/moenchDetectorServerv7.0.0.rc3
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../slsDetectorServers/moenchDetectorServer/bin/moenchDetectorServerv7.0.0.rc3
|
@ -1 +0,0 @@
|
|||||||
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv6.1.0
|
|
1
serverBin/mythen3DetectorServerv7.0.0.rc3
Symbolic link
1
serverBin/mythen3DetectorServerv7.0.0.rc3
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../slsDetectorServers/mythen3DetectorServer/bin/mythen3DetectorServerv7.0.0.rc3
|
@ -171,17 +171,19 @@ class jungfrauHighZSingleChipData : public slsDetectorData<uint16_t> {
|
|||||||
/* return NULL; */
|
/* return NULL; */
|
||||||
/* }; */
|
/* }; */
|
||||||
|
|
||||||
virtual char *readNextFrame(ifstream &filebin) {
|
// not present in base class
|
||||||
int ff = -1, np = -1;
|
|
||||||
return readNextFrame(filebin, ff, np);
|
|
||||||
};
|
|
||||||
|
|
||||||
virtual char *readNextFrame(ifstream &filebin, int &ff) {
|
virtual char *readNextFrame(std::ifstream &filebin) {
|
||||||
|
int ff=-1;
|
||||||
|
return readNextFrame(filebin, ff);
|
||||||
|
}
|
||||||
|
virtual char *readNextFrame(std::ifstream &filebin, int &ff) {
|
||||||
int np = -1;
|
int np = -1;
|
||||||
return readNextFrame(filebin, ff, np);
|
return readNextFrame(filebin, ff, np);
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual char *readNextFrame(ifstream &filebin, int &ff, int &np) {
|
// not present in base class
|
||||||
|
virtual char *readNextFrame(std::ifstream &filebin, int &ff, int &np) {
|
||||||
char *data = new char[dataSize];
|
char *data = new char[dataSize];
|
||||||
char *d = readNextFrame(filebin, ff, np, data);
|
char *d = readNextFrame(filebin, ff, np, data);
|
||||||
if (d == NULL) {
|
if (d == NULL) {
|
||||||
@ -191,18 +193,10 @@ class jungfrauHighZSingleChipData : public slsDetectorData<uint16_t> {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual char *readNextFrame(ifstream &filebin, int &ff, int &np,
|
// not present in base class
|
||||||
|
virtual char *readNextFrame(std::ifstream &filebin, int &ff, int &np,
|
||||||
char *data) {
|
char *data) {
|
||||||
char *retval = 0;
|
|
||||||
int nd;
|
|
||||||
int fnum = -1;
|
|
||||||
np = 0;
|
np = 0;
|
||||||
int pn;
|
|
||||||
|
|
||||||
// cout << dataSize << endl;
|
|
||||||
if (ff >= 0)
|
|
||||||
fnum = ff;
|
|
||||||
|
|
||||||
if (filebin.is_open()) {
|
if (filebin.is_open()) {
|
||||||
if (filebin.read(data, dataSize)) {
|
if (filebin.read(data, dataSize)) {
|
||||||
ff = getFrameNumber(data);
|
ff = getFrameNumber(data);
|
||||||
@ -210,8 +204,8 @@ class jungfrauHighZSingleChipData : public slsDetectorData<uint16_t> {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return NULL;
|
return nullptr;
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
@ -225,7 +219,7 @@ class jungfrauHighZSingleChipData : public slsDetectorData<uint16_t> {
|
|||||||
found
|
found
|
||||||
|
|
||||||
*/
|
*/
|
||||||
virtual char *findNextFrame(char *data, int &ndata, int dsize) {
|
char *findNextFrame(char *data, int &ndata, int dsize) override {
|
||||||
if (dsize < dataSize)
|
if (dsize < dataSize)
|
||||||
ndata = dsize;
|
ndata = dsize;
|
||||||
else
|
else
|
||||||
@ -233,6 +227,7 @@ class jungfrauHighZSingleChipData : public slsDetectorData<uint16_t> {
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// int getPacketNumber(int x, int y) {return dataMap[y][x]/packetSize;};
|
// int getPacketNumber(int x, int y) {return dataMap[y][x]/packetSize;};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -207,7 +207,7 @@ class jungfrauLGADStrixelsData : public slsDetectorData<uint16_t> {
|
|||||||
|
|
||||||
int getFrameNumber(char *buff) {
|
int getFrameNumber(char *buff) {
|
||||||
return ((header *)buff)->detHeader.frameNumber;
|
return ((header *)buff)->detHeader.frameNumber;
|
||||||
}
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
||||||
@ -220,74 +220,10 @@ class jungfrauLGADStrixelsData : public slsDetectorData<uint16_t> {
|
|||||||
*/
|
*/
|
||||||
int getPacketNumber(char *buff) {
|
int getPacketNumber(char *buff) {
|
||||||
return ((header *)buff)->detHeader.packetNumber;
|
return ((header *)buff)->detHeader.packetNumber;
|
||||||
}
|
};
|
||||||
|
|
||||||
/* int getFrameNumber(char *buff) { */
|
|
||||||
|
|
||||||
/* // return ((jf_header *)buff)->bunchNumber; */
|
|
||||||
/* }; */
|
|
||||||
|
|
||||||
/* /\** */
|
|
||||||
|
|
||||||
/* Returns the packet number for the given dataset. purely virtual func */
|
|
||||||
/* \param buff pointer to the dataset */
|
|
||||||
/* \returns packet number number */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* *\/ */
|
|
||||||
/* int getPacketNumber(char *buff) { */
|
|
||||||
/* return 0; */
|
|
||||||
/* } ; */
|
|
||||||
|
|
||||||
/* /\** */
|
|
||||||
|
|
||||||
/* Loops over a memory slot until a complete frame is found (i.e. all
|
|
||||||
* packets 0 to nPackets, same frame number). purely virtual func */
|
|
||||||
/* \param data pointer to the memory to be analyzed */
|
|
||||||
/* \param ndata reference to the amount of data found for the frame, in
|
|
||||||
* case the frame is incomplete at the end of the memory slot */
|
|
||||||
/* \param dsize size of the memory slot to be analyzed */
|
|
||||||
/* \returns pointer to the beginning of the last good frame (might be
|
|
||||||
* incomplete if ndata smaller than dataSize), or NULL if no frame is found
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* *\/ */
|
|
||||||
/* virtual char *findNextFrame(char *data, int &ndata, int
|
|
||||||
* dsize){ndata=dsize; setDataSize(dsize); return data;}; */
|
|
||||||
|
|
||||||
/* /\** */
|
|
||||||
|
|
||||||
/* Loops over a file stream until a complete frame is found (i.e. all
|
|
||||||
* packets 0 to nPackets, same frame number). Can be overloaded for
|
|
||||||
* different kind of detectors! */
|
|
||||||
/* \param filebin input file stream (binary) */
|
|
||||||
/* \returns pointer to the begin of the last good frame, NULL if no
|
|
||||||
* frame is found or last frame is incomplete */
|
|
||||||
|
|
||||||
/* */
|
|
||||||
/* char *readNextFrame(ifstream &filebin){ */
|
|
||||||
/* // int afifo_length=0; */
|
|
||||||
/* uint16_t *afifo_cont; */
|
|
||||||
/* int ib=0; */
|
|
||||||
/* if (filebin.is_open()) { */
|
|
||||||
/* afifo_cont=new uint16_t[dataSize/2]; */
|
|
||||||
/* while (filebin.read(((char*)afifo_cont)+ib,2)) { */
|
|
||||||
/* ib+=2; */
|
|
||||||
/* if (ib==dataSize) break; */
|
|
||||||
/* } */
|
|
||||||
/* if (ib>0) { */
|
|
||||||
/* iframe++; */
|
|
||||||
/* // cout << ib << "-" << endl; */
|
|
||||||
/* return (char*)afifo_cont; */
|
|
||||||
/* } else { */
|
|
||||||
/* delete [] afifo_cont; */
|
|
||||||
/* return NULL; */
|
|
||||||
/* } */
|
|
||||||
/* } */
|
|
||||||
/* return NULL; */
|
|
||||||
/* }; */
|
|
||||||
|
|
||||||
char *readNextFrame(ifstream &filebin) {
|
char *readNextFrame(ifstream &filebin) {
|
||||||
int ff = -1, np = -1;
|
int ff = -1, np = -1;
|
||||||
return readNextFrame(filebin, ff, np);
|
return readNextFrame(filebin, ff, np);
|
||||||
|
188
slsDetectorCalibration/dataStructures/jungfrauModuleData.h
Normal file
188
slsDetectorCalibration/dataStructures/jungfrauModuleData.h
Normal file
@ -0,0 +1,188 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
#ifndef JUNGFRAUMODULEDATA_H
|
||||||
|
#define JUNGFRAUMODULEDATA_H
|
||||||
|
#include "slsDetectorData.h"
|
||||||
|
|
||||||
|
//#define VERSION_V2
|
||||||
|
/**
|
||||||
|
@short structure for a Detector Packet or Image Header
|
||||||
|
@li frameNumber is the frame number
|
||||||
|
@li expLength is the subframe number (32 bit eiger) or real time exposure
|
||||||
|
time in 100ns (others)
|
||||||
|
@li packetNumber is the packet number
|
||||||
|
@li bunchId is the bunch id from beamline
|
||||||
|
@li timestamp is the time stamp with 10 MHz clock
|
||||||
|
@li modId is the unique module id (unique even for left, right, top, bottom)
|
||||||
|
@li xCoord is the x coordinate in the complete detector system
|
||||||
|
@li yCoord is the y coordinate in the complete detector system
|
||||||
|
@li zCoord is the z coordinate in the complete detector system
|
||||||
|
@li debug is for debugging purposes
|
||||||
|
@li roundRNumber is the round robin set number
|
||||||
|
@li detType is the detector type see :: detectorType
|
||||||
|
@li version is the version number of this structure format
|
||||||
|
*/
|
||||||
|
typedef struct {
|
||||||
|
uint64_t bunchNumber; /**< is the frame number */
|
||||||
|
uint64_t pre; /**< something */
|
||||||
|
|
||||||
|
} jf_header;
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
class jungfrauModuleData : public slsDetectorData<uint16_t> {
|
||||||
|
|
||||||
|
private:
|
||||||
|
int iframe;
|
||||||
|
|
||||||
|
public:
|
||||||
|
/**
|
||||||
|
Implements the slsReceiverData structure for the moench02 prototype read
|
||||||
|
out by a module i.e. using the slsReceiver (160x160 pixels, 40 packets
|
||||||
|
1286 large etc.) \param c crosstalk parameter for the output buffer
|
||||||
|
|
||||||
|
*/
|
||||||
|
#ifndef ZMQ
|
||||||
|
#define off sizeof(jf_header)
|
||||||
|
#endif
|
||||||
|
#ifdef ZMQ
|
||||||
|
#define off 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
jungfrauModuleData()
|
||||||
|
: slsDetectorData<uint16_t>(1024, 512,
|
||||||
|
1024* 512 * 2 + off) {
|
||||||
|
|
||||||
|
for (int ix = 0; ix < 1024; ix++) {
|
||||||
|
for (int iy = 0; iy < 512; iy++) {
|
||||||
|
dataMap[iy][ix] = off + (1024 * iy + ix) * 2;
|
||||||
|
#ifdef HIGHZ
|
||||||
|
dataMask[iy][ix] = 0x3fff;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
iframe = 0;
|
||||||
|
// cout << "data struct created" << endl;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
Returns the value of the selected channel for the given dataset as
|
||||||
|
double. \param data pointer to the dataset (including headers etc) \param
|
||||||
|
ix pixel number in the x direction \param iy pixel number in the y
|
||||||
|
direction \returns data for the selected channel, with inversion if
|
||||||
|
required as double
|
||||||
|
|
||||||
|
*/
|
||||||
|
virtual double getValue(char *data, int ix, int iy = 0) {
|
||||||
|
|
||||||
|
uint16_t val = getChannel(data, ix, iy) & 0x3fff;
|
||||||
|
/* if (ix==0 && iy==0) */
|
||||||
|
/* cout << val << endl; */
|
||||||
|
return val;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
Returns the frame number for the given dataset. Purely virtual func.
|
||||||
|
\param buff pointer to the dataset
|
||||||
|
\returns frame number
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* class jfrau_packet_header_t { */
|
||||||
|
/* public: */
|
||||||
|
/* unsigned char reserved[4]; */
|
||||||
|
/* unsigned char packetNumber[1]; */
|
||||||
|
/* unsigned char frameNumber[3]; */
|
||||||
|
/* unsigned char bunchid[8]; */
|
||||||
|
/* }; */
|
||||||
|
|
||||||
|
int getFrameNumber(char *buff) {
|
||||||
|
return ((jf_header *)buff)->bunchNumber;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
Returns the packet number for the given dataset. purely virtual func
|
||||||
|
\param buff pointer to the dataset
|
||||||
|
\returns packet number number
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
*/
|
||||||
|
int getPacketNumber(char *buff) {
|
||||||
|
return 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
char *readNextFrame(ifstream &filebin) {
|
||||||
|
int ff = -1, np = -1;
|
||||||
|
return readNextFrame(filebin, ff, np);
|
||||||
|
};
|
||||||
|
|
||||||
|
char *readNextFrame(ifstream &filebin, int &ff) {
|
||||||
|
int np = -1;
|
||||||
|
return readNextFrame(filebin, ff, np);
|
||||||
|
};
|
||||||
|
|
||||||
|
char *readNextFrame(ifstream &filebin, int &ff, int &np) {
|
||||||
|
char *data = new char[dataSize];
|
||||||
|
char *d = readNextFrame(filebin, ff, np, data);
|
||||||
|
if (d == NULL) {
|
||||||
|
delete[] data;
|
||||||
|
data = NULL;
|
||||||
|
}
|
||||||
|
return data;
|
||||||
|
};
|
||||||
|
|
||||||
|
char *readNextFrame(ifstream &filebin, int &ff, int &np,char *data) {
|
||||||
|
char *retval = 0;
|
||||||
|
int nd;
|
||||||
|
int fnum = -1;
|
||||||
|
np = 0;
|
||||||
|
int pn;
|
||||||
|
|
||||||
|
// cout << dataSize << endl;
|
||||||
|
if (ff >= 0)
|
||||||
|
fnum = ff;
|
||||||
|
|
||||||
|
if (filebin.is_open()) {
|
||||||
|
if (filebin.read(data, dataSize)) {
|
||||||
|
ff = getFrameNumber(data);
|
||||||
|
np = getPacketNumber(data);
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return NULL;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
Loops over a memory slot until a complete frame is found (i.e. all
|
||||||
|
packets 0 to nPackets, same frame number). purely virtual func \param
|
||||||
|
data pointer to the memory to be analyzed \param ndata reference to the
|
||||||
|
amount of data found for the frame, in case the frame is incomplete at
|
||||||
|
the end of the memory slot \param dsize size of the memory slot to be
|
||||||
|
analyzed \returns pointer to the beginning of the last good frame (might
|
||||||
|
be incomplete if ndata smaller than dataSize), or NULL if no frame is
|
||||||
|
found
|
||||||
|
|
||||||
|
*/
|
||||||
|
virtual char *findNextFrame(char *data, int &ndata, int dsize) {
|
||||||
|
if (dsize < dataSize)
|
||||||
|
ndata = dsize;
|
||||||
|
else
|
||||||
|
ndata = dataSize;
|
||||||
|
return data;
|
||||||
|
};
|
||||||
|
|
||||||
|
// int getPacketNumber(int x, int y) {return dataMap[y][x]/packetSize;};
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif
|
@ -2,7 +2,36 @@
|
|||||||
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#ifndef MOENCH03T1RECDATANEW_H
|
#ifndef MOENCH03T1RECDATANEW_H
|
||||||
#define MOENCH03T1RECDATANEW_H
|
#define MOENCH03T1RECDATANEW_H
|
||||||
|
//#define MYROOT
|
||||||
|
|
||||||
|
#ifndef MYROOT
|
||||||
#include "sls/sls_detector_defs.h"
|
#include "sls/sls_detector_defs.h"
|
||||||
|
#endif
|
||||||
|
#ifdef MYROOT
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
uint64_t frameNumber;
|
||||||
|
uint32_t expLength;
|
||||||
|
uint32_t packetNumber;
|
||||||
|
uint64_t bunchId;
|
||||||
|
uint64_t timestamp;
|
||||||
|
uint16_t modId;
|
||||||
|
uint16_t row;
|
||||||
|
uint16_t column;
|
||||||
|
uint16_t reserved;
|
||||||
|
uint32_t debug;
|
||||||
|
uint16_t roundRNumber;
|
||||||
|
uint8_t detType;
|
||||||
|
uint8_t version;
|
||||||
|
} sls_detector_header;
|
||||||
|
#define MAX_NUM_PACKETS 512
|
||||||
|
// using sls_bitset = std::bitset<MAX_NUM_PACKETS>;
|
||||||
|
// using bitset_storage = uint8_t[MAX_NUM_PACKETS / 8];
|
||||||
|
struct sls_receiver_header {
|
||||||
|
sls_detector_header detHeader; /**< is the detector header */
|
||||||
|
uint8_t packetsMask[64]; /**< is the packets caught bit mask */
|
||||||
|
};
|
||||||
|
#endif
|
||||||
#include "slsDetectorData.h"
|
#include "slsDetectorData.h"
|
||||||
|
|
||||||
class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
||||||
@ -17,8 +46,12 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
|||||||
double ghost[200][25];
|
double ghost[200][25];
|
||||||
|
|
||||||
// Single point of definition if we need to customize
|
// Single point of definition if we need to customize
|
||||||
|
#ifndef MYROOT
|
||||||
using header = sls::defs::sls_receiver_header;
|
using header = sls::defs::sls_receiver_header;
|
||||||
|
#endif
|
||||||
|
#ifdef MYROOT
|
||||||
|
sls_receiver_header header;
|
||||||
|
#endif
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
Implements the slsReceiverData structure for the moench02 prototype read
|
Implements the slsReceiverData structure for the moench02 prototype read
|
||||||
@ -47,7 +80,7 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
|||||||
int npackets = 40;
|
int npackets = 40;
|
||||||
int i;
|
int i;
|
||||||
int adc4(0);
|
int adc4(0);
|
||||||
|
int off=sizeof(header);
|
||||||
for (int ip = 0; ip < npackets; ip++) {
|
for (int ip = 0; ip < npackets; ip++) {
|
||||||
for (int is = 0; is < 128; is++) {
|
for (int is = 0; is < 128; is++) {
|
||||||
|
|
||||||
@ -62,13 +95,13 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
|||||||
} else {
|
} else {
|
||||||
row = 200 + i / sc_width;
|
row = 200 + i / sc_width;
|
||||||
}
|
}
|
||||||
dataMap[row][col] = sizeof(header) +
|
dataMap[row][col] = off +
|
||||||
(nadc * i + iadc) * 2; //+16*(ip+1);
|
(nadc * i + iadc) * 2; //+16*(ip+1);
|
||||||
#ifdef HIGHZ
|
#ifdef HIGHZ
|
||||||
dataMask[row][col] = 0x3fff; // invert data
|
dataMask[row][col] = 0x3fff; // invert data
|
||||||
#endif
|
#endif
|
||||||
if (dataMap[row][col] < 0 ||
|
if (dataMap[row][col] < 0 ||
|
||||||
dataMap[row][col] >= nSamples * 2 * 32)
|
dataMap[row][col] >= off + nSamples * 2 * 32)
|
||||||
std::cout << "Error: pointer " << dataMap[row][col]
|
std::cout << "Error: pointer " << dataMap[row][col]
|
||||||
<< " out of range " << std::endl;
|
<< " out of range " << std::endl;
|
||||||
}
|
}
|
||||||
@ -88,7 +121,7 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
|||||||
xmap[ibyte] = -1;
|
xmap[ibyte] = -1;
|
||||||
ymap[ibyte] = -1;
|
ymap[ibyte] = -1;
|
||||||
}
|
}
|
||||||
int off = sizeof(header) / 2;
|
off = sizeof(header) / 2;
|
||||||
for (ipacket = 0; ipacket < npackets; ipacket++) {
|
for (ipacket = 0; ipacket < npackets; ipacket++) {
|
||||||
for (ibyte = 0; ibyte < 8192 / 2; ibyte++) {
|
for (ibyte = 0; ibyte < 8192 / 2; ibyte++) {
|
||||||
i = ipacket * 8208 / 2 + ibyte;
|
i = ipacket * 8208 / 2 + ibyte;
|
||||||
@ -175,7 +208,7 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
int getFrameNumber(char *buff) {
|
int getFrameNumber(char *buff) {
|
||||||
return ((header *)buff)->detHeader.frameNumber;
|
return ((sls::defs::sls_receiver_header *)buff)->detHeader.frameNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -188,7 +221,7 @@ class moench03T1ReceiverDataNew : public slsDetectorData<uint16_t> {
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
int getPacketNumber(char *buff) {
|
int getPacketNumber(char *buff) {
|
||||||
return ((header *)buff)->detHeader.packetNumber;
|
return ((sls::defs::sls_receiver_header *)buff)->detHeader.packetNumber;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *readNextFrame(std::ifstream &filebin) override {
|
char *readNextFrame(std::ifstream &filebin) override {
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
#include "slsDetectorData.h"
|
#include "slsDetectorData.h"
|
||||||
#include "sls/sls_detector_defs.h"
|
#include "sls/sls_detector_defs.h"
|
||||||
|
|
||||||
|
#define CTB
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
class moench04CtbZmq10GbData : public slsDetectorData<uint16_t> {
|
class moench04CtbZmq10GbData : public slsDetectorData<uint16_t> {
|
||||||
|
|
||||||
@ -17,6 +19,9 @@ class moench04CtbZmq10GbData : public slsDetectorData<uint16_t> {
|
|||||||
const int dSamples;
|
const int dSamples;
|
||||||
int off;
|
int off;
|
||||||
|
|
||||||
|
// Single point of definition if we need to customize
|
||||||
|
using header = sls::defs::sls_receiver_header;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/**
|
/**
|
||||||
Implements the slsReceiverData structure for the moench02 prototype read
|
Implements the slsReceiverData structure for the moench02 prototype read
|
||||||
@ -28,7 +33,7 @@ class moench04CtbZmq10GbData : public slsDetectorData<uint16_t> {
|
|||||||
// slsDetectorData<uint16_t>(400, 400, nas*2*32+nds*8), aSamples(nas),
|
// slsDetectorData<uint16_t>(400, 400, nas*2*32+nds*8), aSamples(nas),
|
||||||
// dSamples(nds), nadc(32), sc_width(25), sc_height(200) {
|
// dSamples(nds), nadc(32), sc_width(25), sc_height(200) {
|
||||||
|
|
||||||
moench04CtbZmq10GbData(int nas = 5000, int nds = 0)
|
moench04CtbZmq10GbData(int nas = 5000, int nds = 0, int oo = 2 * 2)
|
||||||
: slsDetectorData<uint16_t>(400, 400,
|
: slsDetectorData<uint16_t>(400, 400,
|
||||||
#ifdef RAWDATA
|
#ifdef RAWDATA
|
||||||
sizeof(slsDetectorDefs::sls_receiver_header) +
|
sizeof(slsDetectorDefs::sls_receiver_header) +
|
||||||
@ -36,7 +41,7 @@ class moench04CtbZmq10GbData : public slsDetectorData<uint16_t> {
|
|||||||
((nas > 0) && (nds > 0)
|
((nas > 0) && (nds > 0)
|
||||||
? max(nas, nds) * (32 * 2 + 8)
|
? max(nas, nds) * (32 * 2 + 8)
|
||||||
: nas * 32 * 2 + nds * 8)),
|
: nas * 32 * 2 + nds * 8)),
|
||||||
nadc(32), sc_width(25), sc_height(200), aSamples(nas), dSamples(nds) {
|
nadc(32), sc_width(25), sc_height(200), aSamples(nas), dSamples(nds), off(oo) {
|
||||||
#ifdef RAWDATA
|
#ifdef RAWDATA
|
||||||
off=sizeof(slsDetectorDefs::sls_receiver_header);
|
off=sizeof(slsDetectorDefs::sls_receiver_header);
|
||||||
#endif
|
#endif
|
||||||
@ -86,14 +91,10 @@ class moench04CtbZmq10GbData : public slsDetectorData<uint16_t> {
|
|||||||
} else {
|
} else {
|
||||||
row = 200 + i / sc_width;
|
row = 200 + i / sc_width;
|
||||||
}
|
}
|
||||||
if (nds > 0)
|
dataMap[row][col] =
|
||||||
dataMap[row][col] =
|
((nadc ) * i + iadc) * 2 + off;
|
||||||
((nadc + 4) * i + iadc) * 2 + off; //+16*(ip+1);
|
|
||||||
else
|
|
||||||
dataMap[row][col] =
|
|
||||||
(nadc * i + iadc) * 2 + off; //+16*(ip+1);
|
|
||||||
if (dataMap[row][col] < 0 ||
|
if (dataMap[row][col] < 0 ||
|
||||||
dataMap[row][col] >= aSamples * 2 * 32 + off)
|
dataMap[row][col] >= aSamples * 2 * 32 + off)
|
||||||
cout << "Error: pointer " << dataMap[row][col]
|
cout << "Error: pointer " << dataMap[row][col]
|
||||||
<< " out of range " << endl;
|
<< " out of range " << endl;
|
||||||
}
|
}
|
||||||
@ -108,6 +109,7 @@ class moench04CtbZmq10GbData : public slsDetectorData<uint16_t> {
|
|||||||
|
|
||||||
int getGain(char *data, int x, int y) {
|
int getGain(char *data, int x, int y) {
|
||||||
// int aoff=aSamples*2*32;
|
// int aoff=aSamples*2*32;
|
||||||
|
int aoff=off+aSamples*2*32;
|
||||||
int irow;
|
int irow;
|
||||||
int isc = x / sc_width;
|
int isc = x / sc_width;
|
||||||
int icol = x % sc_width;
|
int icol = x % sc_width;
|
||||||
|
@ -1,15 +1,17 @@
|
|||||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
#module add CBFlib/0.9.5
|
#module add CBFlib/0.9.5
|
||||||
INCDIR=-I. -I../ -I../interpolations -I../interpolations/etaVEL -I../dataStructures -I../../slsSupportLib/include/ -I../../slsReceiverSoftware/include/ -I../tiffio/include/
|
INCDIR=-I. -I../ -I../interpolations -I../interpolations/etaVEL -I../dataStructures -I../../slsSupportLib/include/ -I../../slsReceiverSoftware/include/ -I../tiffio/include
|
||||||
|
|
||||||
LDFLAG= ../tiffio/src/tiffIO.cpp -L/usr/lib64/ -lpthread -lm -lstdc++ -pthread -lrt -ltiff -O3 -std=c++11
|
LDFLAG= ../tiffio/src/tiffIO.cpp -L/usr/lib64/ -lpthread -lm -lstdc++ -pthread -lrt -ltiff -O3 -std=c++11
|
||||||
|
|
||||||
MAIN=jungfrauClusterFinder.cpp
|
MAIN=jungfrauClusterFinder.cpp
|
||||||
|
|
||||||
|
|
||||||
all: jungfrauClusterFinder jungfrauMakeEta jungfrauInterpolation jungfrauNoInterpolation jungfrauPhotonCounter jungfrauAnalog
|
all: jungfrauRawDataProcess
|
||||||
|
|
||||||
|
jungfrauRawDataProcess: jungfrauRawDataProcess.cpp $(INCS) clean
|
||||||
|
g++ -o jungfrauRawDataProcess jungfrauRawDataProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DSAVE_ALL
|
||||||
|
|
||||||
|
|
||||||
jungfrauClusterFinder: jungfrauClusterFinder.cpp $(INCS) clean
|
jungfrauClusterFinder: jungfrauClusterFinder.cpp $(INCS) clean
|
||||||
|
@ -0,0 +1,64 @@
|
|||||||
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
#module add CBFlib/0.9.5
|
||||||
|
INCDIR=-I. -I../ -I../interpolations -I../interpolations/etaVEL -I../dataStructures -I../../slsSupportLib/include/ -I../../slsReceiverSoftware/include/ -I../tiffio/include
|
||||||
|
|
||||||
|
LDFLAG= ../tiffio/src/tiffIO.cpp -L/usr/lib64/ -lpthread -lm -lstdc++ -pthread -lrt -ltiff -O3 -std=c++11
|
||||||
|
|
||||||
|
MAIN=jungfrauClusterFinder.cpp
|
||||||
|
|
||||||
|
|
||||||
|
all: jungfrauRawDataProcess
|
||||||
|
|
||||||
|
jungfrauRawDataProcess: jungfrauRawDataProcess.cpp $(INCS) clean
|
||||||
|
g++ -o jungfrauRawDataProcess jungfrauRawDataProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DSAVE_ALL -DMODULE
|
||||||
|
|
||||||
|
jungfrauRawDataProcessStrx: jungfrauRawDataProcess.cpp $(INCS) clean
|
||||||
|
g++ -o jungfrauRawDataProcessStrx jungfrauRawDataProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DSAVE_ALL -DJFSTRX
|
||||||
|
|
||||||
|
jungfrauRawDataProcessStrxAldo: jungfrauRawDataProcess.cpp $(INCS) clean
|
||||||
|
g++ -o jungfrauRawDataProcessStrxAldo jungfrauRawDataProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DSAVE_ALL -DJFSTRX -DALDO
|
||||||
|
|
||||||
|
jungfrauRawDataProcessStrxOld: jungfrauRawDataProcess.cpp $(INCS) clean
|
||||||
|
g++ -o jungfrauRawDataProcessStrxOld jungfrauRawDataProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DSAVE_ALL -DJFSTRXOLD
|
||||||
|
|
||||||
|
jungfrauRawDataProcessStrxOldAldo: jungfrauRawDataProcess.cpp $(INCS) clean
|
||||||
|
g++ -o jungfrauRawDataProcessStrxOldAldo jungfrauRawDataProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DSAVE_ALL -DJFSTRXOLD -DALDO
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
jungfrauClusterFinder: jungfrauClusterFinder.cpp $(INCS) clean
|
||||||
|
g++ -o jungfrauClusterFinder jungfrauClusterFinder.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DSAVE_ALL
|
||||||
|
|
||||||
|
|
||||||
|
jungfrauClusterFinderHighZ: jungfrauClusterFinder.cpp $(INCS) clean
|
||||||
|
g++ -o jungfrauClusterFinderHighZ jungfrauClusterFinder.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DSAVE_ALL -DHIGHZ
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
jungfrauMakeEta: jungfrauInterpolation.cpp $(INCS) clean
|
||||||
|
g++ -o jungfrauMakeEta jungfrauInterpolation.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DFF
|
||||||
|
|
||||||
|
jungfrauInterpolation: jungfrauInterpolation.cpp $(INCS) clean
|
||||||
|
g++ -o jungfrauInterpolation jungfrauInterpolation.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF)
|
||||||
|
|
||||||
|
jungfrauNoInterpolation: jungfrauNoInterpolation.cpp $(INCS) clean
|
||||||
|
g++ -o jungfrauNoInterpolation jungfrauNoInterpolation.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF)
|
||||||
|
|
||||||
|
jungfrauPhotonCounter: jungfrauPhotonCounter.cpp $(INCS) clean
|
||||||
|
g++ -o jungfrauPhotonCounter jungfrauPhotonCounter.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWRECEIVER
|
||||||
|
|
||||||
|
jungfrauAnalog: jungfrauPhotonCounter.cpp $(INCS) clean
|
||||||
|
g++ -o jungfrauAnalog jungfrauPhotonCounter.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWRECEIVER -DANALOG
|
||||||
|
|
||||||
|
jungfrauPhotonCounterHighZ: jungfrauPhotonCounter.cpp $(INCS) clean
|
||||||
|
g++ -o jungfrauPhotonCounterHighZ jungfrauPhotonCounter.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWRECEIVER -DHIGHZ
|
||||||
|
|
||||||
|
jungfrauAnalogHighZ: jungfrauPhotonCounter.cpp $(INCS) clean
|
||||||
|
g++ -o jungfrauAnalogHighZ jungfrauPhotonCounter.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWRECEIVER -DANALOG -DHIGHZ
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -f jungfrauClusterFinder jungfrauMakeEta jungfrauInterpolation jungfrauNoInterpolation jungfrauPhotonCounter jungfrauAnalog
|
||||||
|
|
||||||
|
|
@ -1,25 +1,19 @@
|
|||||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
|
||||||
INCDIR= -I. -I../dataStructures ../tiffIO.cpp -I../ -I../interpolations/ -I../../slsSupportLib/include/ -I../../slsReceiverSoftware/include/ -I../../libs/rapidjson/
|
INCDIR= -I. -I../dataStructures ../tiffio/src/tiffIO.cpp -I../ -I../interpolations/ -I../../slsSupportLib/include/ -I../../slsReceiverSoftware/include/ -I../../libs/rapidjson/ -I../tiffio/include
|
||||||
LDFLAG= -L/usr/lib64/ -lpthread -lm -lstdc++ -lzmq -pthread -lrt -ltiff -O3 -std=c++11 -Wall -L../../build/bin/ -lSlsSupport
|
LDFLAG= -L/usr/lib64/ -lpthread -lm -lstdc++ -lzmq -pthread -lrt -ltiff -O3 -std=c++11 -Wall -L../../build/bin/ -lSlsSupport
|
||||||
#-L../../bin -lhdf5 -L.
|
#-L../../bin -lhdf5 -L.
|
||||||
|
|
||||||
#DESTDIR?=../bin
|
#DESTDIR?=../bin
|
||||||
|
|
||||||
all: moenchZmqProcess moenchZmq04Process
|
all: jungfrauZmqProcess
|
||||||
#moenchZmqProcessCtbGui
|
#jungfrauZmqProcessCtbGui
|
||||||
|
|
||||||
moenchZmqProcess: moenchZmqProcess.cpp clean
|
jungfrauZmqProcess: jungfrauZmqProcess.cpp clean
|
||||||
g++ -o moenchZmqProcess moenchZmqProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWZMQ -DINTERP
|
g++ -o jungfrauZmqProcess jungfrauZmqProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWZMQ -DINTERP
|
||||||
|
|
||||||
moenchZmq04Process: moenchZmqProcess.cpp clean
|
|
||||||
g++ -o moench04ZmqProcess moenchZmqProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWZMQ -DINTERP -DMOENCH04
|
|
||||||
|
|
||||||
#moenchZmqProcessCtbGui: moenchZmqProcess.cpp clean
|
|
||||||
# g++ -o moenchZmqProcessCtbGui moenchZmqProcess.cpp $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF) -DNEWZMQ -DINTERP -DCTBGUI
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f moenchZmqProcess
|
rm -f jungfrauZmqProcess
|
||||||
|
|
||||||
|
|
||||||
|
@ -0,0 +1,26 @@
|
|||||||
|
ROOTSYS=/opt/cern/v6/root
|
||||||
|
#/afs/psi.ch/project/sls_det_sof/roottware/root_v5.34.23_sl6_64bit
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
LIBZMQDIR = $(PWD)
|
||||||
|
LIBZMQ = -L$(LIBZMQDIR) -lzmq
|
||||||
|
SHLIB_PATH=/opt/cern/v6/root/lib
|
||||||
|
CMAKE_PREFIX_PATH=/opt/cern/v6/root
|
||||||
|
DYLD_LIBRARY_PATH=/opt/cern/v6/root/lib
|
||||||
|
|
||||||
|
|
||||||
|
INCDIR= -I. -I../dataStructures ../tiffio/src/tiffIO.cpp -I../ -I../interpolations/ -I../../slsSupportLib/include/ -I../../slsReceiverSoftware/include/ -I../../libs/rapidjson/ -I../tiffio/include
|
||||||
|
LDFLAG= -L/usr/lib64/ -lpthread -lm -lstdc++ -lzmq -pthread -lrt -ltiff -O3 -std=c++11 -Wall -L../../build/bin/ -lSlsSupport
|
||||||
|
#-L../../bin -lhdf5 -L.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
default: onlinedisp_zmq
|
||||||
|
|
||||||
|
onlinedisp_zmq: onlinedisp_zmq.cpp onlinedisp_zmq.h
|
||||||
|
# flags from root-config --cflags --glibs
|
||||||
|
g++ -o onlinedisp_zmq onlinedisp_zmq.cpp -I. -I$(ROOTSYS)/include -Wall -g -lm -L. -lzmq -pthread -lrt -L$(ROOTSYS)/lib -lGui -lCore -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -m64 $(LDFLAG) $(INCDIR) $(LIBHDF5) $(LIBRARYCBF)
|
||||||
|
|
||||||
|
#-lCint
|
||||||
|
|
10
slsDetectorCalibration/jungfrauExecutables/examples.txt
Normal file
10
slsDetectorCalibration/jungfrauExecutables/examples.txt
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
|
||||||
|
sls_detector_put rx_jsonpara detectorMode counting
|
||||||
|
sls_detector_put rx_jsonpara frameMode newPedestal
|
||||||
|
sls_detector_put rx_jsonpara frameMode frame
|
||||||
|
sls_detector_put rx_jsonpara detectorMode analog
|
||||||
|
sls_detector_put rx_jsonpara threshold 150
|
||||||
|
sls_detector_put rx_jsonpara threshold 0
|
||||||
|
sls_detector_put rx_jsonpara threshold 300
|
||||||
|
sls_detector_put rx_zmqhwm 50
|
@ -0,0 +1,418 @@
|
|||||||
|
// SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
|
// Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
|
//#include "sls/ansi.h"
|
||||||
|
#include <iostream>
|
||||||
|
#undef CORR
|
||||||
|
|
||||||
|
#define C_GHOST 0.0004
|
||||||
|
|
||||||
|
#define CM_ROWS 50
|
||||||
|
|
||||||
|
#define RAWDATA
|
||||||
|
|
||||||
|
#ifndef JFSTRX
|
||||||
|
#ifndef JFSTRXOLD
|
||||||
|
#ifndef MODULE
|
||||||
|
#include "jungfrauHighZSingleChipData.h"
|
||||||
|
#endif
|
||||||
|
#ifdef MODULE
|
||||||
|
#include "jungfrauModuleData.h"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#ifdef JFSTRX
|
||||||
|
#include "jungfrauLGADStrixelsData.h"
|
||||||
|
#endif
|
||||||
|
#ifdef JFSTRXOLD
|
||||||
|
#include "jungfrauStrixelsHalfModuleOldDesign.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "multiThreadedCountingDetector.h"
|
||||||
|
#include "singlePhotonDetector.h"
|
||||||
|
|
||||||
|
#include <fstream>
|
||||||
|
#include <map>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
|
||||||
|
#include <ctime>
|
||||||
|
using namespace std;
|
||||||
|
|
||||||
|
int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
|
if (argc < 5) {
|
||||||
|
cout << "Usage is " << argv[0]
|
||||||
|
<< "indir outdir fname(no extension) fextension [runmin] [runmax] [pedfile (raw or tiff)] [threshold] "
|
||||||
|
"[nframes] [xmin xmax ymin ymax] [gainmap]"
|
||||||
|
<< endl;
|
||||||
|
cout << "threshold <0 means analog; threshold=0 means cluster finder; "
|
||||||
|
"threshold>0 means photon counting"
|
||||||
|
<< endl;
|
||||||
|
cout << "nframes <0 means sum everything; nframes=0 means one file per "
|
||||||
|
"run; nframes>0 means one file every nframes"
|
||||||
|
<< endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int fifosize = 1000;
|
||||||
|
int nthreads = 10;
|
||||||
|
int csize = 3;
|
||||||
|
int nsigma = 5;
|
||||||
|
int nped = 10000;
|
||||||
|
|
||||||
|
int cf = 0;
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef JFSTRX
|
||||||
|
#ifndef JFSTRXOLD
|
||||||
|
#ifndef MODULE
|
||||||
|
jungfrauHighZSingleChipData *decoder = new jungfrauHighZSingleChipData();
|
||||||
|
int nx = 256, ny = 256;
|
||||||
|
#endif
|
||||||
|
#ifdef MODULE
|
||||||
|
jungfrauModuleData *decoder = new jungfrauModuleData();
|
||||||
|
int nx = 1024, ny = 512;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#ifdef JFSTRX
|
||||||
|
cout << "bbb" << endl;
|
||||||
|
jungfrauLGADStrixelsData *decoder = new jungfrauLGADStrixelsData();
|
||||||
|
int nx = 1024/5, ny = 512*5;
|
||||||
|
#endif
|
||||||
|
#ifdef JFSTRXOLD
|
||||||
|
cout << "ccc" << endl;
|
||||||
|
jungfrauStrixelsHalfModuleOldDesign *decoder = new jungfrauStrixelsHalfModuleOldDesign();
|
||||||
|
int nx = 1024*3, ny = 512/3;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
decoder->getDetectorSize(nx, ny);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
cout << "Detector size is " << nx << " " << ny << endl;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
double *gainmap = NULL;
|
||||||
|
//float *gm;
|
||||||
|
|
||||||
|
int ff, np;
|
||||||
|
// cout << " data size is " << dsize;
|
||||||
|
|
||||||
|
ifstream filebin;
|
||||||
|
char *indir = argv[1];
|
||||||
|
char *outdir = argv[2];
|
||||||
|
char *fformat = argv[3];
|
||||||
|
char *fext = argv[4];
|
||||||
|
int runmin = 0;
|
||||||
|
|
||||||
|
// cout << "argc is " << argc << endl;
|
||||||
|
if (argc >= 6) {
|
||||||
|
runmin = atoi(argv[5]);
|
||||||
|
}
|
||||||
|
|
||||||
|
int runmax = runmin;
|
||||||
|
|
||||||
|
if (argc >= 7) {
|
||||||
|
runmax = atoi(argv[6]);
|
||||||
|
}
|
||||||
|
|
||||||
|
char *pedfile = NULL;
|
||||||
|
if (argc >= 8) {
|
||||||
|
pedfile = argv[7];
|
||||||
|
}
|
||||||
|
double thr = 0;
|
||||||
|
double thr1 = 1;
|
||||||
|
|
||||||
|
if (argc >= 9) {
|
||||||
|
thr = atof(argv[8]);
|
||||||
|
}
|
||||||
|
|
||||||
|
int nframes = 0;
|
||||||
|
|
||||||
|
if (argc >= 10) {
|
||||||
|
nframes = atoi(argv[9]);
|
||||||
|
}
|
||||||
|
|
||||||
|
int xmin = 0, xmax = nx, ymin = 0, ymax = ny;
|
||||||
|
if (argc >= 14) {
|
||||||
|
xmin = atoi(argv[10]);
|
||||||
|
xmax = atoi(argv[11]);
|
||||||
|
ymin = atoi(argv[12]);
|
||||||
|
ymax = atoi(argv[13]);
|
||||||
|
}
|
||||||
|
|
||||||
|
char *gainfname = NULL;
|
||||||
|
if (argc > 14) {
|
||||||
|
gainfname = argv[14];
|
||||||
|
cout << "Gain map file name is: " << gainfname << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
char ffname[10000];
|
||||||
|
char fname[10000];
|
||||||
|
char imgfname[10000];
|
||||||
|
char cfname[10000];
|
||||||
|
|
||||||
|
std::time_t end_time;
|
||||||
|
|
||||||
|
FILE *of = NULL;
|
||||||
|
cout << "input directory is " << indir << endl;
|
||||||
|
cout << "output directory is " << outdir << endl;
|
||||||
|
cout << "input file is " << fformat << endl;
|
||||||
|
cout << "runmin is " << runmin << endl;
|
||||||
|
cout << "runmax is " << runmax << endl;
|
||||||
|
if (pedfile)
|
||||||
|
cout << "pedestal file is " << pedfile << endl;
|
||||||
|
if (thr > 0)
|
||||||
|
cout << "threshold is " << thr << endl;
|
||||||
|
cout << "Nframes is " << nframes << endl;
|
||||||
|
|
||||||
|
uint32_t nnx, nny;
|
||||||
|
|
||||||
|
singlePhotonDetector *filter = new singlePhotonDetector(
|
||||||
|
decoder, csize, nsigma, 1, NULL, nped, 200, -1, -1, gainmap, NULL);
|
||||||
|
|
||||||
|
if (gainfname) {
|
||||||
|
|
||||||
|
if (filter->readGainMap(gainfname))
|
||||||
|
cout << "using gain map " << gainfname << endl;
|
||||||
|
else
|
||||||
|
cout << "Could not open gain map " << gainfname << endl;
|
||||||
|
} else
|
||||||
|
thr = 0.15 * thr;
|
||||||
|
filter->newDataSet();
|
||||||
|
//int dsize = decoder->getDataSize();
|
||||||
|
|
||||||
|
if (thr > 0) {
|
||||||
|
cout << "threshold is " << thr << endl;
|
||||||
|
filter->setThreshold(thr);
|
||||||
|
cf = 0;
|
||||||
|
|
||||||
|
} else
|
||||||
|
cf = 1;
|
||||||
|
|
||||||
|
filter->setROI(xmin, xmax, ymin, ymax);
|
||||||
|
std::time(&end_time);
|
||||||
|
cout << std::ctime(&end_time) << endl;
|
||||||
|
|
||||||
|
char *buff;
|
||||||
|
|
||||||
|
// multiThreadedAnalogDetector *mt=new
|
||||||
|
// multiThreadedAnalogDetector(filter,nthreads,fifosize);
|
||||||
|
multiThreadedCountingDetector *mt =
|
||||||
|
new multiThreadedCountingDetector(filter, nthreads, fifosize);
|
||||||
|
#ifndef ANALOG
|
||||||
|
mt->setDetectorMode(ePhotonCounting);
|
||||||
|
cout << "Counting!" << endl;
|
||||||
|
if (thr > 0) {
|
||||||
|
cf = 0;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
//{
|
||||||
|
#ifdef ANALOG
|
||||||
|
mt->setDetectorMode(eAnalog);
|
||||||
|
cout << "Analog!" << endl;
|
||||||
|
cf = 0;
|
||||||
|
// thr1=thr;
|
||||||
|
#endif
|
||||||
|
// }
|
||||||
|
|
||||||
|
mt->StartThreads();
|
||||||
|
mt->popFree(buff);
|
||||||
|
|
||||||
|
// cout << "mt " << endl;
|
||||||
|
|
||||||
|
int ifr = 0;
|
||||||
|
|
||||||
|
char froot[1000];
|
||||||
|
double *ped=new double[nx * ny];//, *ped1;
|
||||||
|
|
||||||
|
int pos,pos1;
|
||||||
|
|
||||||
|
if (pedfile) {
|
||||||
|
|
||||||
|
if (string(pedfile).find(".dat") != std::string::npos) {
|
||||||
|
pos1=string(pedfile).rfind("/");
|
||||||
|
strcpy(froot,pedfile+pos1);
|
||||||
|
pos=string(froot).find(".dat");
|
||||||
|
froot[pos]='\0';
|
||||||
|
}
|
||||||
|
|
||||||
|
cout << "PEDESTAL " << endl;
|
||||||
|
// sprintf(imgfname, "%s/pedestals.tiff", outdir);
|
||||||
|
|
||||||
|
if (string(pedfile).find(".tif") == std::string::npos) {
|
||||||
|
sprintf(fname, "%s", pedfile);
|
||||||
|
cout << fname << endl;
|
||||||
|
std::time(&end_time);
|
||||||
|
//cout << "aaa" << std::ctime(&end_time) << endl;
|
||||||
|
|
||||||
|
mt->setFrameMode(ePedestal);
|
||||||
|
// sprintf(fn,fformat,irun);
|
||||||
|
filebin.open((const char *)(fname), ios::in | ios::binary);
|
||||||
|
// //open file
|
||||||
|
if (filebin.is_open()) {
|
||||||
|
ff = -1;
|
||||||
|
while (decoder->readNextFrame(filebin, ff, np, buff)) {
|
||||||
|
// if (np == 40) {
|
||||||
|
if ((ifr+1) % 100 == 0) {
|
||||||
|
cout << " ****" << decoder->getValue(buff,20,20);// << endl;
|
||||||
|
}
|
||||||
|
mt->pushData(buff);
|
||||||
|
mt->nextThread();
|
||||||
|
mt->popFree(buff);
|
||||||
|
ifr++;
|
||||||
|
if (ifr % 100 == 0) {
|
||||||
|
cout << " ****" << ifr << " " << ff << " " << np << endl;
|
||||||
|
} //else
|
||||||
|
//cout << ifr << " " << ff << " " << np << endl;
|
||||||
|
if (ifr>=1000)
|
||||||
|
break;
|
||||||
|
ff = -1;
|
||||||
|
}
|
||||||
|
filebin.close();
|
||||||
|
while (mt->isBusy()) {
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
sprintf(imgfname, "%s/%s_ped.tiff", outdir, froot);
|
||||||
|
mt->writePedestal(imgfname);
|
||||||
|
sprintf(imgfname, "%s/%s_rms.tiff", outdir, froot);
|
||||||
|
mt->writePedestalRMS(imgfname);
|
||||||
|
|
||||||
|
} else
|
||||||
|
cout << "Could not open pedestal file " << fname
|
||||||
|
<< " for reading " << endl;
|
||||||
|
} else {
|
||||||
|
float *pp = ReadFromTiff(pedfile, nny, nnx);
|
||||||
|
if (pp && (int)nnx == nx && (int)nny == ny) {
|
||||||
|
for (int i = 0; i < nx * ny; i++) {
|
||||||
|
ped[i] = pp[i];
|
||||||
|
}
|
||||||
|
delete[] pp;
|
||||||
|
mt->setPedestal(ped);
|
||||||
|
cout << "Pedestal set from tiff file " << pedfile << endl;
|
||||||
|
} else {
|
||||||
|
cout << "Could not open pedestal tiff file " << pedfile
|
||||||
|
<< " for reading " << endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
std::time(&end_time);
|
||||||
|
cout << std::ctime(&end_time) << endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
ifr = 0;
|
||||||
|
int ifile = 0;
|
||||||
|
|
||||||
|
mt->setFrameMode(eFrame);
|
||||||
|
|
||||||
|
for (int irun = runmin; irun <= runmax; irun++) {
|
||||||
|
cout << "DATA ";
|
||||||
|
// sprintf(fn,fformat,irun);
|
||||||
|
sprintf(ffname, "%s/%s.%s", indir, fformat, fext);
|
||||||
|
sprintf(fname, (const char*)ffname, irun);
|
||||||
|
sprintf(ffname, "%s/%s.tiff", outdir, fformat);
|
||||||
|
sprintf(imgfname, (const char*)ffname, irun);
|
||||||
|
sprintf(ffname, "%s/%s.clust", outdir, fformat);
|
||||||
|
sprintf(cfname, (const char*)ffname, irun);
|
||||||
|
cout << fname << " ";
|
||||||
|
cout << imgfname << endl;
|
||||||
|
std::time(&end_time);
|
||||||
|
cout << std::ctime(&end_time) << endl;
|
||||||
|
// cout << fname << " " << outfname << " " << imgfname << endl;
|
||||||
|
filebin.open((const char *)(fname), ios::in | ios::binary);
|
||||||
|
// //open file
|
||||||
|
ifile = 0;
|
||||||
|
if (filebin.is_open()) {
|
||||||
|
if (thr <= 0 && cf != 0) { // cluster finder
|
||||||
|
if (of == NULL) {
|
||||||
|
of = fopen(cfname, "w");
|
||||||
|
if (of) {
|
||||||
|
mt->setFilePointer(of);
|
||||||
|
cout << "file pointer set " << endl;
|
||||||
|
} else {
|
||||||
|
cout << "Could not open " << cfname << " for writing "
|
||||||
|
<< endl;
|
||||||
|
mt->setFilePointer(NULL);
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// //while read frame
|
||||||
|
ff = -1;
|
||||||
|
ifr = 0;
|
||||||
|
while (decoder->readNextFrame(filebin, ff, np, buff)) {
|
||||||
|
// if (np == 40) {
|
||||||
|
// //push
|
||||||
|
|
||||||
|
if ((ifr+1) % 100 == 0) {
|
||||||
|
cout << " ****" << decoder->getValue(buff,20,20);// << endl;
|
||||||
|
}
|
||||||
|
mt->pushData(buff);
|
||||||
|
// // //pop
|
||||||
|
mt->nextThread();
|
||||||
|
mt->popFree(buff);
|
||||||
|
|
||||||
|
ifr++;
|
||||||
|
if (ifr % 100 == 0)
|
||||||
|
cout << " " << ifr << " " << ff << endl;
|
||||||
|
if (nframes > 0) {
|
||||||
|
if (ifr % nframes == 0) {
|
||||||
|
sprintf(ffname, "%s/%s_f%05d.tiff", outdir, fformat,
|
||||||
|
ifile);
|
||||||
|
sprintf(imgfname, (const char*)ffname, irun);
|
||||||
|
mt->writeImage(imgfname, thr1);
|
||||||
|
mt->clearImage();
|
||||||
|
ifile++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// } else
|
||||||
|
// cout << ifr << " " << ff << " " << np << endl;
|
||||||
|
ff = -1;
|
||||||
|
}
|
||||||
|
cout << "--" << endl;
|
||||||
|
filebin.close();
|
||||||
|
while (mt->isBusy()) {
|
||||||
|
;
|
||||||
|
}
|
||||||
|
if (nframes >= 0) {
|
||||||
|
if (nframes > 0) {
|
||||||
|
sprintf(ffname, "%s/%s_f%05d.tiff", outdir, fformat, ifile);
|
||||||
|
sprintf(imgfname, (const char*)ffname, irun);
|
||||||
|
} else {
|
||||||
|
sprintf(ffname, "%s/%s.tiff", outdir, fformat);
|
||||||
|
sprintf(imgfname, (const char*)ffname, irun);
|
||||||
|
}
|
||||||
|
cout << "Writing tiff to " << imgfname << " " << thr1 << endl;
|
||||||
|
mt->writeImage(imgfname, thr1);
|
||||||
|
mt->clearImage();
|
||||||
|
if (of) {
|
||||||
|
fclose(of);
|
||||||
|
of = NULL;
|
||||||
|
mt->setFilePointer(NULL);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
std::time(&end_time);
|
||||||
|
cout << std::ctime(&end_time) << endl;
|
||||||
|
} else
|
||||||
|
cout << "Could not open " << fname << " for reading " << endl;
|
||||||
|
}
|
||||||
|
if (nframes < 0) {
|
||||||
|
sprintf(ffname, "%s/%s.tiff", outdir, fformat);
|
||||||
|
strcpy(imgfname, ffname);
|
||||||
|
cout << "Writing tiff to " << imgfname << " " << thr1 << endl;
|
||||||
|
mt->writeImage(imgfname, thr1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
679
slsDetectorCalibration/jungfrauExecutables/onlinedisp_zmq.cpp
Normal file
679
slsDetectorCalibration/jungfrauExecutables/onlinedisp_zmq.cpp
Normal file
@ -0,0 +1,679 @@
|
|||||||
|
#include "onlinedisp_zmq.h"
|
||||||
|
bool hasallpede;
|
||||||
|
TH1F * his102;TH1F * his101;
|
||||||
|
int processedf;
|
||||||
|
sls::zmqHeader zHeader;
|
||||||
|
#define PEDEFNAME "current_pede.dat"
|
||||||
|
#define NPRO 50
|
||||||
|
#define NPRI 50
|
||||||
|
|
||||||
|
//#define JFSTRX
|
||||||
|
#ifdef JFSTRX
|
||||||
|
#include "jungfrauLGADStrixelsData.h"
|
||||||
|
#else
|
||||||
|
#include "jungfrauModuleData.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
int main(int argc, char* argv[])
|
||||||
|
{
|
||||||
|
goout=1;
|
||||||
|
hasallpede=false;
|
||||||
|
dophotonmap=true; if ((argc<3)) {printf("USAGE: command photon_energy_(peakinADC) [rx_ip] [port] \n"); return -1 ;}
|
||||||
|
else {
|
||||||
|
phene=atoi(argv[1]);
|
||||||
|
if (phene<0) dophotonmap=false;
|
||||||
|
threshold=float (phene/2);
|
||||||
|
printf( " \n");
|
||||||
|
printf( "phene %d \n",phene);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (argc>=3) {
|
||||||
|
strcpy(serverip,argv[2]);
|
||||||
|
printf("ip is %s ",serverip);
|
||||||
|
}
|
||||||
|
|
||||||
|
portnum=30001;
|
||||||
|
if (argc>=4 ){ portnum= atoi(argv[3]);
|
||||||
|
}
|
||||||
|
printf(", port number is %d ",portnum); printf(". \n");
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef JFSTRX
|
||||||
|
cout << "JFSTRX" << endl;
|
||||||
|
jungfrauLGADStrixelsData *decoder = new jungfrauLGADStrixelsData();
|
||||||
|
nx = 1024/5; ny= 512*5;
|
||||||
|
#else
|
||||||
|
nx = 1024; ny= 512;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
gain_flag=false;
|
||||||
|
pede_flag=false;
|
||||||
|
bw_flag=false;
|
||||||
|
|
||||||
|
HDraw_every=20;
|
||||||
|
fixranges=false;
|
||||||
|
|
||||||
|
|
||||||
|
hchptr = (short*) malloc(NCH*sizeof(short));
|
||||||
|
|
||||||
|
startsocket(); //create and connect ZMQ
|
||||||
|
|
||||||
|
for (ipx=0;ipx<NCH;ipx++) hchptr[(ipx)]=0;
|
||||||
|
|
||||||
|
|
||||||
|
// cout<< decoder->getValue((char*)(hchptr),279,130)<<endl;
|
||||||
|
|
||||||
|
|
||||||
|
nonblock(NB_ENABLE);
|
||||||
|
|
||||||
|
cout <<"opening the rootapp" <<endl;
|
||||||
|
|
||||||
|
rootapp = new TApplication("Online JF display",&argc, argv);
|
||||||
|
|
||||||
|
LoadPaletteFalse();
|
||||||
|
|
||||||
|
char hname[100];
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
his1000= new TH2F("his1000","2d , ev. pede corrected",nx,-0.5,nx-0.5,ny,-0.5,ny-0.5);
|
||||||
|
his1000->SetOption("colz");
|
||||||
|
his2000= new TH2F("his2000","2d gain ",nx,-0.5,nx-0.5,ny,-0.5,ny-0.5);
|
||||||
|
his2000->GetZaxis()->SetRangeUser(0,4);
|
||||||
|
|
||||||
|
if (dophotonmap) {
|
||||||
|
his3000= new TH2F("his3000"," photon map ",nx,-0.5,nx-0.5,ny,-0.5,ny-0.5);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
his3000= new TH2F("his3000"," raw adc ",nx,-0.5,nx-0.5,ny,-0.5,ny-0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
his4500= new TH2F("his45000","L vs R",101,-50,500,101,-50,500);
|
||||||
|
hchip=new TH1I*[8];
|
||||||
|
for (i=0;i<8;i++) {
|
||||||
|
sprintf(hname,"hchip%d",i);
|
||||||
|
hchip[i] = new TH1I(hname,hname,NBIN,MIN_POS,MAX_POS);
|
||||||
|
}
|
||||||
|
|
||||||
|
cout <<"end of histo booking" <<endl;
|
||||||
|
if (A2==NULL) A2 = new TCanvas("A2","Plotting Canvas gain",150,10,500,250);
|
||||||
|
if (A3==NULL) A3 = new TCanvas("A3","Plotting Canvas ADC",150,360,1200,550);
|
||||||
|
if (A4==NULL) A4 = new TCanvas("A4","Plotting Canvas PHs",750,300,1000,800);
|
||||||
|
A4->Clear();
|
||||||
|
A4->Divide(4,2,0.005,0.005);
|
||||||
|
if (A5==NULL) A5 = new TCanvas("A5","Plotting Canvas Photon Map",750,300,1000,600);
|
||||||
|
if (A6==NULL) A6 = new TCanvas("A6","Plotting Canvas LvsR",650,250,650,660);
|
||||||
|
|
||||||
|
gSystem->ProcessEvents();
|
||||||
|
int running=0;
|
||||||
|
char runc[15]="*\\-/|";
|
||||||
|
printhelp();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
while (1==1) { // loop on streamed frames
|
||||||
|
|
||||||
|
if(!zmqSocket->ReceiveHeader(0,zHeader, SLS_DETECTOR_JSON_HEADER_VERSION)){
|
||||||
|
cout<< "Receiver stopped, waiting for new stream" << endl;
|
||||||
|
zmqSocket->Disconnect();
|
||||||
|
zmqSocket->Connect();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
|
||||||
|
// if (((icount++)%10)==0) cout <<"recived frameindex "<<zHeader.frameIndex <<endl;
|
||||||
|
//cout <<"there" <<endl;
|
||||||
|
zmqSocket->ReceiveData(0, (char *)(&image_data), NCH*2);
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
framesinstream++;
|
||||||
|
running++;
|
||||||
|
|
||||||
|
fill1Ds=true; //alway fill 1d and LR plots
|
||||||
|
//if (((framesinstream%(int(HDraw_every)))==(int (HDraw_every)-1))) {fill1Ds=true;}else{fill1Ds=false;}
|
||||||
|
if (((framesinstream%(HDraw_every))==(HDraw_every)-1)) {show2Ds=true;}else{show2Ds=false;}
|
||||||
|
if (((framesinstream%NPRI)==NPRI-1)) { cout<<"\r "<<"frame (from start): "<<framesinstream<<" " << runc[((running/NPRI)%5)]<< " discarded frames %=" << (1-float(processedf)/float(zHeader.frameIndex-frameIndex_old))*100 << " current framenumber= " <<zHeader.frameIndex << " "<<std::flush; processedf=0;frameIndex_old=zHeader.frameIndex;}
|
||||||
|
|
||||||
|
|
||||||
|
npacket=0;
|
||||||
|
if (show2Ds) {
|
||||||
|
his1000->Reset();
|
||||||
|
his2000->Reset();
|
||||||
|
if (!dophotonmap) his3000->Reset(); //FOR RAW ADC DISPLAY
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if ((fill1Ds)or(show2Ds)or(dophotonmap)) { // do something, otherwise skip to the next
|
||||||
|
processedf++;
|
||||||
|
|
||||||
|
for (i=0 ;i<NCH;i++) {
|
||||||
|
|
||||||
|
adcvalue= (image_data[i]) & 0x3fff;
|
||||||
|
|
||||||
|
if ((image_data[i] & 0xc000)!=0){ gain = (image_data[i]>>14) & 0x3;} else {gain=0;}
|
||||||
|
if (pede_flag){
|
||||||
|
|
||||||
|
if (gain_flag)
|
||||||
|
{
|
||||||
|
if ((gain==0)||(!hasallpede)) adcpedecorr=(adcvalue&0x3fff)*fgaind[i]-fpeded[i]*fgaind[i];
|
||||||
|
|
||||||
|
if ((gain==1)&&hasallpede) adcpedecorr=(fpedeG1d[i]*fgaind[i]+G1Poffset-adcvalue*fgaind[i])*30.0;
|
||||||
|
if ((gain==3)&&hasallpede) adcpedecorr=(fpedeG2d[i]*fgaind[i]+G2Poffset-adcvalue*fgaind[i])*340.0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
|
||||||
|
{
|
||||||
|
|
||||||
|
if ((gain==0)||(!hasallpede)) adcpedecorr=(adcvalue&0x3fff)-fpeded[i];
|
||||||
|
if ((gain==1)&&hasallpede) adcpedecorr=(fpedeG1d[i]+G1Poffset-adcvalue)*30.0;
|
||||||
|
if ((gain==3)&&hasallpede) adcpedecorr=(fpedeG2d[i]+G2Poffset-adcvalue)*340.0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
} else {adcpedecorr=float (adcvalue);} //end of if pede
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if ((adcpedecorr>threshold)&&(pede_flag)) hchptr[(i)]= hchptr[(i)]+(int)((adcpedecorr+threshold)/phene);
|
||||||
|
|
||||||
|
|
||||||
|
if (fill1Ds) {
|
||||||
|
if (((i%1024)<1004)&&((i%1024)>20)&&((i/1024)>20)) { //skip the pix near guardring for PH plots
|
||||||
|
ichip= i/(256*256*4)*4+((i/256)%4) ;
|
||||||
|
|
||||||
|
hchip[ichip]->Fill(adcpedecorr,1);
|
||||||
|
|
||||||
|
if (((i%256)<253)&&((i%256)>2)) his4500->Fill(adcpedecorrold,adcpedecorr,1);
|
||||||
|
adcpedecorrold=adcpedecorr;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}//if (fill1Ds)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if ((show2Ds)) {
|
||||||
|
factor=2.0;
|
||||||
|
value=adcpedecorr;
|
||||||
|
if ((i%256==0)||(i%256==255)) value=int(value/factor);
|
||||||
|
if ((i/1024==255)||(i/1024==256)||(i/1024==767)||(i/1024==768)) value=int(value/factor);
|
||||||
|
|
||||||
|
his1000->Fill(float(i%1024),float(int (i/1024)),value);
|
||||||
|
|
||||||
|
if (!dophotonmap) his3000->Fill(float(i%1024),float(int (i/1024)) ,adcvalue);
|
||||||
|
|
||||||
|
his2000->Fill(float(i%1024),float(int (i/1024)) ,gain);
|
||||||
|
|
||||||
|
value=(int)(hchptr[i]);
|
||||||
|
|
||||||
|
if ((i%256==0)||(i%256==255)) value=int(value/factor);
|
||||||
|
if ((i/1024==255)||(i/1024==256)||(i/1024==767)||(i/1024==768)) value=int(value/factor);
|
||||||
|
if (dophotonmap) his3000->Fill(float(i%1024),float(int (i/1024)),float(value));
|
||||||
|
|
||||||
|
}
|
||||||
|
}// for (i=0 ;i<NCH-0;i++)
|
||||||
|
}// /end of do something
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if ((show2Ds)) {
|
||||||
|
|
||||||
|
for (ipx=0;ipx<NCH;ipx++) hchptr[(ipx)]=0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Plot2DHistos(); Plot1DHistos();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ifp=kbhit();
|
||||||
|
processifp(ifp);
|
||||||
|
|
||||||
|
if (((framesinstream%NPRO))==NPRO-1) gSystem->ProcessEvents();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}// end of infinite loop
|
||||||
|
|
||||||
|
rootapp->Run();
|
||||||
|
nonblock(NB_DISABLE);
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
void processifp(int ifp){
|
||||||
|
|
||||||
|
if (ifp!=0){
|
||||||
|
c=fgetc(stdin);
|
||||||
|
if (c=='s') {if (goout==0){goout=1;}else {myloop();}}
|
||||||
|
if (c=='S') SetRanges();
|
||||||
|
if (c=='+') { HDraw_every=HDraw_every*0.8;cout<< endl <<"Drawing every "<< HDraw_every<<" frames "<<endl; }
|
||||||
|
if (c=='-') { HDraw_every=HDraw_every*1.25;cout<< endl <<"Drawing every "<< HDraw_every<<" frames "<<endl;}
|
||||||
|
if (c=='G') {gain_flag=not gain_flag ;if (gain_flag) {cout<<"gain corr enab."<< endl;}else {cout<<"gain corr disab."<< endl;}}
|
||||||
|
if (c=='[') { G1Poffset=G1Poffset-10;cout<< endl <<"G1Poffset "<<G1Poffset<<endl; }
|
||||||
|
if (c==']') { G1Poffset=G1Poffset+10;cout<< endl <<"G1Poffset "<<G1Poffset<<endl; }
|
||||||
|
if (c=='{') { G2Poffset=G2Poffset-10;cout<< endl <<"G2Poffset "<<G2Poffset<<endl; }
|
||||||
|
if (c=='}') { G2Poffset=G2Poffset+10;cout<< endl <<"G2Poffset "<<G2Poffset<<endl; }
|
||||||
|
if (c=='p') { //stopsocket();
|
||||||
|
loadpede();//startsocket();
|
||||||
|
}
|
||||||
|
if (c=='b') {LoadPaletteBW(1.1111);bw_flag=true; }
|
||||||
|
if (c=='B') {LoadPaletteBW(0.9);bw_flag=true; }
|
||||||
|
if (c=='O') savepede();
|
||||||
|
if (c=='o') readpede();
|
||||||
|
if (c=='P') loadallpede();
|
||||||
|
if (c=='u') his1000->SetOption("surf2z");
|
||||||
|
if (c=='C') his1000->SetOption("colz");
|
||||||
|
|
||||||
|
if (c=='q') exit(0);
|
||||||
|
if (c=='r') historeset();
|
||||||
|
if (c=='R') axisreset();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
void loadallpede(){
|
||||||
|
cout <<"not implemented "<< endl;
|
||||||
|
// hasallpede=true;
|
||||||
|
|
||||||
|
// system("./sls_detector_put setbit 0x5d 12 "); //setting to FSG1 ;
|
||||||
|
|
||||||
|
// loadpede();
|
||||||
|
// loadpede();
|
||||||
|
// for (i=0;i<NCH;i++) {fpedeG1d[i]=fpeded[i];}
|
||||||
|
|
||||||
|
// system("./sls_detector_put setbit 0x5d 13 "); //setting to FSG0 ;
|
||||||
|
// sleep(1);
|
||||||
|
// loadpede();
|
||||||
|
// loadpede();
|
||||||
|
// for (i=0;i<NCH;i++) {fpedeG2d[i]=fpeded[i];}
|
||||||
|
// system("./sls_detector_put clearbit 0x5d 12 "); //setting to G0;
|
||||||
|
// system("./sls_detector_put clearbit 0x5d 13 "); //setting to G0;
|
||||||
|
// sleep(2);
|
||||||
|
|
||||||
|
// loadpede();
|
||||||
|
// loadpede();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
void loadpede(void){
|
||||||
|
//startsocket();
|
||||||
|
framesinstream=0;
|
||||||
|
pede_flag=true;
|
||||||
|
nframes=0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
for (ipx=0;ipx<NCH;ipx++) fpeded[ipx]=0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
while (framesinstream<50) { // loop on files
|
||||||
|
|
||||||
|
|
||||||
|
if (!zmqSocket->ReceiveHeader(0,zHeader, SLS_DETECTOR_JSON_HEADER_VERSION)){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
cout <<"received frameindex "<<zHeader.frameIndex << endl;
|
||||||
|
|
||||||
|
zmqSocket->ReceiveData(0, (char *)(&image_data), NCH*2);
|
||||||
|
framesinstream++;nframes++;
|
||||||
|
for (ipx=0;ipx<NCH;ipx++) fpeded[ipx]=(fpeded[ipx]*(nframes-1)+(float)(image_data[ipx]&0x3fff))/(float)(nframes);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
for (ipx=0;ipx<NCH;ipx++) { ipeded[ipx]=(short)(fpeded[ipx]);
|
||||||
|
if (ipx%60033==0) printf("i=%d pede= %d %f .\n",ipx, ipeded[ipx],fpeded[ipx]);
|
||||||
|
}
|
||||||
|
printf("total frames for pede: %d \n",nframes);
|
||||||
|
//stopsocket();
|
||||||
|
|
||||||
|
printhelp();
|
||||||
|
}
|
||||||
|
|
||||||
|
int kbhit()
|
||||||
|
{
|
||||||
|
struct timeval tv;
|
||||||
|
fd_set fds;
|
||||||
|
tv.tv_sec = 0;
|
||||||
|
tv.tv_usec = 0;
|
||||||
|
FD_ZERO(&fds);
|
||||||
|
FD_SET(STDIN_FILENO, &fds); //STDIN_FILENO is 0
|
||||||
|
select(STDIN_FILENO+1, &fds, NULL, NULL, &tv);
|
||||||
|
return FD_ISSET(STDIN_FILENO, &fds);
|
||||||
|
}
|
||||||
|
void myloop(void){ //wait doing nothing.
|
||||||
|
goout=0;
|
||||||
|
int ifp;
|
||||||
|
|
||||||
|
|
||||||
|
while (goout==0){
|
||||||
|
|
||||||
|
ifp=kbhit();
|
||||||
|
processifp(ifp);
|
||||||
|
|
||||||
|
|
||||||
|
gSystem->ProcessEvents();
|
||||||
|
usleep(5000);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void printhelp(){
|
||||||
|
cout<< endl << "s=start/pause| p/n=getnewpede/raw | o/O=read/save pede | n=nopede(raw) | r/R=rst His/Axis | +/- = faster/slower ref. |q=exit | U/C sUrf2/Colz " <<endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
void historeset(){
|
||||||
|
|
||||||
|
his4500->Reset();
|
||||||
|
his3000->Reset();
|
||||||
|
for (i=0;i<8;i++) {
|
||||||
|
hchip[i]->Reset();
|
||||||
|
|
||||||
|
}
|
||||||
|
Plot2DHistos();
|
||||||
|
Plot1DHistos();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void SetRanges() {
|
||||||
|
string str;
|
||||||
|
std::cin.clear();
|
||||||
|
//cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
|
||||||
|
|
||||||
|
cout<< endl;
|
||||||
|
cout<< " adc min " <<endl;
|
||||||
|
//getline(cin, str);
|
||||||
|
// adcmin= stoi(str);
|
||||||
|
std::cin >> adcmin;
|
||||||
|
cout<< " adc max " <<endl;
|
||||||
|
std::cin >> adcmax;
|
||||||
|
cout<< " p.map min " <<endl;
|
||||||
|
std::cin >> pmmin;
|
||||||
|
cout<< " p.map max " <<endl;
|
||||||
|
std::cin >> pmmax;
|
||||||
|
|
||||||
|
fixranges=true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void axisreset(){
|
||||||
|
fixranges=false;
|
||||||
|
his1000->GetXaxis()->UnZoom();
|
||||||
|
|
||||||
|
his1000->GetYaxis()->UnZoom();
|
||||||
|
his1000->GetZaxis()->UnZoom();
|
||||||
|
his2000->GetXaxis()->UnZoom();
|
||||||
|
his2000->GetYaxis()->UnZoom();
|
||||||
|
|
||||||
|
his3000->GetZaxis()->UnZoom();
|
||||||
|
|
||||||
|
for (i=0;i<8;i++) {
|
||||||
|
hchip[i]->GetXaxis()->UnZoom();
|
||||||
|
hchip[i]->GetYaxis()->UnZoom();
|
||||||
|
}
|
||||||
|
|
||||||
|
his4500->GetXaxis()->UnZoom();
|
||||||
|
his4500->GetYaxis()->UnZoom();
|
||||||
|
his4500->GetZaxis()->UnZoom();
|
||||||
|
|
||||||
|
Plot2DHistos();
|
||||||
|
Plot1DHistos();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void nonblock(int state)
|
||||||
|
{
|
||||||
|
struct termios ttystate;
|
||||||
|
//get the terminal state
|
||||||
|
tcgetattr(STDIN_FILENO, &ttystate);
|
||||||
|
if (state==NB_ENABLE)
|
||||||
|
{
|
||||||
|
//turn off canonical mode
|
||||||
|
ttystate.c_lflag &= ~ICANON;
|
||||||
|
//minimum of number input read.
|
||||||
|
ttystate.c_cc[VMIN] = 1;
|
||||||
|
}
|
||||||
|
else if (state==NB_DISABLE)
|
||||||
|
{ //turn on canonical mode
|
||||||
|
ttystate.c_lflag |= ICANON;
|
||||||
|
}
|
||||||
|
//set the terminal attributes.
|
||||||
|
tcsetattr(STDIN_FILENO, TCSANOW, &ttystate);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void LoadPaletteFalse(){
|
||||||
|
const Int_t NRGBs = 5;
|
||||||
|
const Int_t NCont = 90;
|
||||||
|
|
||||||
|
Double_t stops[NRGBs] = { 0.00, 0.34, 0.61, 0.84, 1.00 };
|
||||||
|
Double_t red[NRGBs] = { 0.00, 0.00, 0.87, 1.00, 0.51 };
|
||||||
|
Double_t green[NRGBs] = { 0.00, 0.81, 1.00, 0.20, 0.00 };
|
||||||
|
Double_t blue[NRGBs] = { 0.51, 1.00, 0.12, 0.00, 0.00 };
|
||||||
|
TColor::CreateGradientColorTable(NRGBs, stops, red,green, blue, NCont);
|
||||||
|
gStyle->SetNumberContours(NCont);
|
||||||
|
TColor::CreateGradientColorTable(NRGBs, stops, red,green ,blue, NCont);
|
||||||
|
gStyle->SetNumberContours(NCont);
|
||||||
|
|
||||||
|
}
|
||||||
|
void LoadPaletteBW(float gammatune){
|
||||||
|
|
||||||
|
vgamma=vgamma*gammatune;
|
||||||
|
cout<< "gamma is "<<vgamma<<endl;
|
||||||
|
const Int_t NRGBs = 99;
|
||||||
|
const Int_t NCont = 990;
|
||||||
|
Double_t stops[NRGBs] ;
|
||||||
|
Double_t red[NRGBs] ;
|
||||||
|
Double_t green[NRGBs];
|
||||||
|
Double_t blue[NRGBs] ;
|
||||||
|
|
||||||
|
for (int iRGB=0;iRGB<NRGBs;iRGB++){
|
||||||
|
|
||||||
|
|
||||||
|
stops[iRGB] =(1/float(NRGBs)*float(iRGB));
|
||||||
|
red[iRGB] = pow(stops[iRGB],vgamma);
|
||||||
|
green[iRGB] = red[iRGB];
|
||||||
|
blue[iRGB] =red[iRGB];
|
||||||
|
// cout << iRGB<<" "<< stops[iRGB] <<" " << red[iRGB]<<endl;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
TColor::CreateGradientColorTable(NRGBs, stops, red, green, blue, NCont);
|
||||||
|
gStyle->SetNumberContours(NCont);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// TColor::SetPalette(52,0,1);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Plot1DHistos(void){
|
||||||
|
|
||||||
|
if (hchip[0]->GetXaxis()->GetLast()!=oldh0xlast){
|
||||||
|
oldh0xlast=hchip[0]->GetXaxis()->GetLast();
|
||||||
|
oldh0xfirst=hchip[0]->GetXaxis()->GetFirst();
|
||||||
|
for (int ipad=1; ipad<8;ipad++) {
|
||||||
|
hchip[ipad]->GetXaxis()->SetRange(oldh0xfirst,oldh0xlast);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
for (int ipad=0; ipad<8;ipad++) {
|
||||||
|
A4->cd(ipad+1);
|
||||||
|
gStyle->SetOptStat(1); gPad->SetLogy();
|
||||||
|
hchip[ipad%4+(1-int(ipad/4))*4]->Draw();
|
||||||
|
|
||||||
|
}
|
||||||
|
A4->cd();
|
||||||
|
A4->Update();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Plot2DHistos(void){
|
||||||
|
gStyle->SetOptStat(0);
|
||||||
|
A3->cd();
|
||||||
|
|
||||||
|
// if (bw_flag) LoadPaletteBW(1.0);
|
||||||
|
|
||||||
|
if (fixranges) {
|
||||||
|
|
||||||
|
his1000->GetZaxis()->SetRangeUser(float(adcmin),float(adcmax));
|
||||||
|
his3000->GetZaxis()->SetRangeUser(float(pmmin),float(pmmax));
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
his1000->SetMinimum(-200);
|
||||||
|
his1000->Draw();
|
||||||
|
|
||||||
|
A3->Update();
|
||||||
|
A2->cd();
|
||||||
|
// if (bw_flag) LoadPaletteFalse();
|
||||||
|
his2000->GetXaxis()->SetRange(his1000->GetXaxis()->GetFirst(),his1000->GetXaxis()->GetLast());
|
||||||
|
his2000->GetYaxis()->SetRange(his1000->GetYaxis()->GetFirst(),his1000->GetYaxis()->GetLast());
|
||||||
|
|
||||||
|
his2000->Draw("colz");
|
||||||
|
A2->Update();
|
||||||
|
A5->cd();
|
||||||
|
|
||||||
|
his3000->GetXaxis()->SetRange(his1000->GetXaxis()->GetFirst(),his1000->GetXaxis()->GetLast());
|
||||||
|
his3000->GetYaxis()->SetRange(his1000->GetYaxis()->GetFirst(),his1000->GetYaxis()->GetLast());
|
||||||
|
his3000->Draw("colz");
|
||||||
|
A5->Update();
|
||||||
|
|
||||||
|
A6->cd();
|
||||||
|
his4500->Draw("colz");
|
||||||
|
A6->Update();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void startsocket(void) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
zmqSocket = new sls::ZmqSocket(serverip, portnum);
|
||||||
|
|
||||||
|
} catch (...) {
|
||||||
|
cprintf(RED,
|
||||||
|
"Error: Could not create Zmq socket on port %d with ip %s\n",
|
||||||
|
portnum, serverip);
|
||||||
|
delete zmqSocket;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
zmqSocket->SetReceiveHighWaterMark(3);
|
||||||
|
zmqSocket->SetReceiveBuffer(1024*1024);
|
||||||
|
zmqSocket->Connect();
|
||||||
|
|
||||||
|
|
||||||
|
cout<<"Zmq Client[] "<< zmqSocket->GetZmqServerAddress()<<endl;
|
||||||
|
|
||||||
|
|
||||||
|
haveconnection=true;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void tryconnect(void)
|
||||||
|
|
||||||
|
{
|
||||||
|
int itry=0;
|
||||||
|
cout<< endl;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
while (haveconnection==false) {
|
||||||
|
sleep(1);
|
||||||
|
cout<<"\r trying to (re)connect " <<itry++ << " " << endl ;
|
||||||
|
startsocket();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void stopsocket(void) {
|
||||||
|
// cout<<" cfd " << cfd << endl;;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
delete zmqSocket;
|
||||||
|
zmqSocket=0;
|
||||||
|
//zmqSocket->~ZmqSocket ();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
haveconnection=false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
void savepede(void) {
|
||||||
|
|
||||||
|
int pfd;
|
||||||
|
|
||||||
|
pfd=open(PEDEFNAME,O_CREAT|O_WRONLY, 0666);
|
||||||
|
if (pfd==-1) perror("open pede file");
|
||||||
|
|
||||||
|
write(pfd,fpeded,2*NCH*sizeof(float));
|
||||||
|
write(pfd,fpedeG1d,2*NCH*sizeof(float));
|
||||||
|
write(pfd,fpedeG2d,2*NCH*sizeof(float));
|
||||||
|
close(pfd);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void readpede(void) {
|
||||||
|
|
||||||
|
int pfd;
|
||||||
|
|
||||||
|
pfd=open(PEDEFNAME,O_RDONLY);
|
||||||
|
if (pfd==-1) perror("open pede file");
|
||||||
|
|
||||||
|
read(pfd,fpeded,NCH*2*sizeof(float));
|
||||||
|
read(pfd,fpedeG1d,NCH*2*sizeof(float));
|
||||||
|
read(pfd,fpedeG2d,NCH*2*sizeof(float));
|
||||||
|
|
||||||
|
close(pfd);
|
||||||
|
pede_flag=true;
|
||||||
|
hasallpede=true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
204
slsDetectorCalibration/jungfrauExecutables/onlinedisp_zmq.h
Normal file
204
slsDetectorCalibration/jungfrauExecutables/onlinedisp_zmq.h
Normal file
@ -0,0 +1,204 @@
|
|||||||
|
|
||||||
|
/**************************************************************************/
|
||||||
|
/* Header files section needs cleanup */
|
||||||
|
/**************************************************************************/
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include "sls/ZmqSocket.h"
|
||||||
|
|
||||||
|
#include "sls/tiffIO.h"
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
#include <stdlib.h> /* exit() */
|
||||||
|
#include <string.h> /* memset(), memcpy() */
|
||||||
|
#include <sys/utsname.h> /* uname() */
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/socket.h> /* socket(), bind(),
|
||||||
|
listen(), accept() */
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <netinet/in.h>
|
||||||
|
#include <netinet/tcp.h>
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
#include <netdb.h>
|
||||||
|
#include <unistd.h> /* fork(), write(), close() */
|
||||||
|
#include <time.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
#include <sys/mman.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <cmath>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <rapidjson/document.h> //json header in zmq stream
|
||||||
|
#include <omp.h>
|
||||||
|
#define NTHREADS 2
|
||||||
|
|
||||||
|
#include <chrono>
|
||||||
|
#include <cstdio>
|
||||||
|
#include <ctime> // time_t
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
using namespace std::chrono;
|
||||||
|
using namespace sls;
|
||||||
|
|
||||||
|
#include "TCanvas.h"
|
||||||
|
#include "TH1F.h"
|
||||||
|
#include "TF1.h"
|
||||||
|
#include "TH2F.h"
|
||||||
|
#include "TMath.h"
|
||||||
|
#include "TFile.h"
|
||||||
|
#include "TStyle.h"
|
||||||
|
#include "TSystem.h"
|
||||||
|
#include "TTimer.h"
|
||||||
|
#include "TProfile.h"
|
||||||
|
#include "TColor.h"
|
||||||
|
#include <iostream>
|
||||||
|
#include <fstream>
|
||||||
|
#include <termios.h>
|
||||||
|
#include <TApplication.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <math.h>
|
||||||
|
#include <fstream>
|
||||||
|
#include <iomanip>
|
||||||
|
#include <sstream>
|
||||||
|
#include <string>
|
||||||
|
#include <vector>
|
||||||
|
#include <iostream>
|
||||||
|
#include "sls/ansi.h"
|
||||||
|
#define SLS_DETECTOR_JSON_HEADER_VERSION 0x4
|
||||||
|
|
||||||
|
#define PI 3.14159265
|
||||||
|
|
||||||
|
#define FALSE 0
|
||||||
|
#define OFFSET 0
|
||||||
|
#define NBIN 500
|
||||||
|
#define MIN_POS -500.5 // 400.5
|
||||||
|
#define MAX_POS 3499.5 //-100.5
|
||||||
|
|
||||||
|
|
||||||
|
#define NCH 524288
|
||||||
|
// #define NCH 262144 in case of half_frames
|
||||||
|
|
||||||
|
char serverip[256];
|
||||||
|
int portnum;
|
||||||
|
FILE * sfilefd;
|
||||||
|
|
||||||
|
short* hchptr; // photon counted map "histogram"
|
||||||
|
int value;
|
||||||
|
float factor=1.84;
|
||||||
|
int npacket=0;
|
||||||
|
int totalnpacket=0;
|
||||||
|
float vgamma;
|
||||||
|
|
||||||
|
struct sockaddr_in serveraddr;
|
||||||
|
struct sockaddr_in clientaddr;
|
||||||
|
struct in_addr inadr;
|
||||||
|
struct hostent *server;
|
||||||
|
|
||||||
|
int i=0;
|
||||||
|
int ipx=0;
|
||||||
|
bool haveconnection;
|
||||||
|
|
||||||
|
|
||||||
|
TStyle *gStyle;
|
||||||
|
TApplication* rootapp;
|
||||||
|
TCanvas *A2;
|
||||||
|
TCanvas *A3;
|
||||||
|
TCanvas *A4;
|
||||||
|
TCanvas *A5;
|
||||||
|
TCanvas *A6;
|
||||||
|
|
||||||
|
TH1I **hchip;
|
||||||
|
TH2F **h4500chip;
|
||||||
|
short image_data[NCH*2];
|
||||||
|
short imaged[NCH*2];
|
||||||
|
float fpeded[NCH*2];
|
||||||
|
float fpedeG2d[NCH*2];
|
||||||
|
float fpedeG1d[NCH*2];
|
||||||
|
short ipeded[NCH*2];
|
||||||
|
short pcimaged[NCH*2];
|
||||||
|
|
||||||
|
float fgaind[NCH*2];
|
||||||
|
|
||||||
|
|
||||||
|
float adcpedecorr,adcpedecorrold;
|
||||||
|
|
||||||
|
bool gain_flag;
|
||||||
|
bool bw_flag;
|
||||||
|
bool fill2Ds;
|
||||||
|
bool show2Ds;
|
||||||
|
bool fill1Ds;
|
||||||
|
bool pede_flag;
|
||||||
|
bool dophotonmap;
|
||||||
|
|
||||||
|
int nx, ny;
|
||||||
|
int nframes;
|
||||||
|
int goout;
|
||||||
|
int framesinstream;
|
||||||
|
int ifp;
|
||||||
|
float threshold;
|
||||||
|
int phene;
|
||||||
|
int adcvalue;
|
||||||
|
int gain;
|
||||||
|
int ichip;
|
||||||
|
int frameIndex_old;
|
||||||
|
|
||||||
|
char pedefilename[128];
|
||||||
|
int framenum,bunchid;
|
||||||
|
|
||||||
|
TH2F* his1000;
|
||||||
|
TH2F* his2000;
|
||||||
|
TH2F* his3000;
|
||||||
|
TH2F* his4500;
|
||||||
|
TH1I* hproj;
|
||||||
|
TH1I* hchcum;
|
||||||
|
|
||||||
|
|
||||||
|
using namespace std;
|
||||||
|
void printhelp(void);
|
||||||
|
void processifp(int ifp);
|
||||||
|
void historeset(void);
|
||||||
|
void SetRanges(void);
|
||||||
|
void startsocket(void);
|
||||||
|
void stopsocket(void);
|
||||||
|
void axisreset(void);
|
||||||
|
int kbhit(void);
|
||||||
|
void myloop(void);
|
||||||
|
void loadpede(void);
|
||||||
|
void loadallpede(void);
|
||||||
|
void loadgain(void);
|
||||||
|
void nonblock(int state);
|
||||||
|
void LoadPaletteFalse(void);
|
||||||
|
void LoadPaletteBW(float);
|
||||||
|
void Plot1DHistos(void);
|
||||||
|
void Plot2DHistos(void);
|
||||||
|
void savepede(void);
|
||||||
|
void readpede(void);
|
||||||
|
int findinterpoindex(int startindex);
|
||||||
|
int findclumax(int startindex);
|
||||||
|
void tryconnect(void) ;
|
||||||
|
|
||||||
|
#define NB_ENABLE 1
|
||||||
|
#define NB_DISABLE 0
|
||||||
|
char c;
|
||||||
|
int HDraw_every;
|
||||||
|
|
||||||
|
|
||||||
|
float oldh0xfirst,oldh0xlast;
|
||||||
|
int idx;
|
||||||
|
int GXPoffset,G1Poffset,G2Poffset;
|
||||||
|
int ix,iy;
|
||||||
|
int adcmin,adcmax;
|
||||||
|
int pmmin,pmmax; //min/mnx for the photon map
|
||||||
|
bool fixranges;
|
||||||
|
|
||||||
|
|
||||||
|
sls::ZmqSocket *zmqSocket= NULL;
|
@ -34,6 +34,10 @@ add_executable(moench04RawDataProcess moenchRawDataProcess.cpp)
|
|||||||
target_compile_definitions(moench04RawDataProcess PRIVATE MOENCH04)
|
target_compile_definitions(moench04RawDataProcess PRIVATE MOENCH04)
|
||||||
list(APPEND MOENCH_EXECUTABLES moench04RawDataProcess)
|
list(APPEND MOENCH_EXECUTABLES moench04RawDataProcess)
|
||||||
|
|
||||||
|
add_executable(moench04RawDataProcessDGS moenchRawDataProcess.cpp)
|
||||||
|
target_compile_definitions(moench04RawDataProcessDGS PRIVATE MOENCH04_DGS MOENCH04)
|
||||||
|
list(APPEND MOENCH_EXECUTABLES moench04RawDataProcessDGS)
|
||||||
|
|
||||||
#interpolation stuff
|
#interpolation stuff
|
||||||
|
|
||||||
add_executable(moench03MakeEta moench03Interpolation.cpp)
|
add_executable(moench03MakeEta moench03Interpolation.cpp)
|
||||||
|
@ -62,20 +62,30 @@ int main(int argc, char *argv[]) {
|
|||||||
int nped = 10000;
|
int nped = 10000;
|
||||||
|
|
||||||
int cf = 0;
|
int cf = 0;
|
||||||
|
int numberOfPackets=40;
|
||||||
#ifdef RECT
|
#ifdef RECT
|
||||||
cout << "Should be rectangular but now it will crash! No data structure defined!" << endl;
|
cout << "Should be rectangular but now it will crash! No data structure defined!" << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef MOENCH04
|
#ifndef MOENCH04
|
||||||
moench03T1ReceiverDataNew *decoder = new moench03T1ReceiverDataNew();
|
moench03T1ReceiverDataNew *decoder = new moench03T1ReceiverDataNew();
|
||||||
cout << "MOENCH03!" << endl;
|
cout << "MOENCH03!" << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef MOENCH04
|
#ifdef MOENCH04
|
||||||
moench04CtbZmq10GbData *decoder = new moench04CtbZmq10GbData();
|
#ifndef MOENCH04_DGS
|
||||||
|
moench04CtbZmq10GbData *decoder = new moench04CtbZmq10GbData(5000,0);
|
||||||
cout << "MOENCH04!" << endl;
|
cout << "MOENCH04!" << endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef MOENCH04_DGS
|
||||||
|
moench04CtbZmq10GbData *decoder = new moench04CtbZmq10GbData(5000,5000);
|
||||||
|
cout << "MOENCH04 DGS!" << endl;
|
||||||
|
numberOfPackets=45;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
int nx = 400, ny = 400;
|
int nx = 400, ny = 400;
|
||||||
|
|
||||||
@ -249,7 +259,7 @@ int main(int argc, char *argv[]) {
|
|||||||
if (filebin.is_open()) {
|
if (filebin.is_open()) {
|
||||||
ff = -1;
|
ff = -1;
|
||||||
while (decoder->readNextFrame(filebin, ff, np, buff)) {
|
while (decoder->readNextFrame(filebin, ff, np, buff)) {
|
||||||
if (np == 40) {
|
if (np == numberOfPackets) {
|
||||||
mt->pushData(buff);
|
mt->pushData(buff);
|
||||||
mt->nextThread();
|
mt->nextThread();
|
||||||
mt->popFree(buff);
|
mt->popFree(buff);
|
||||||
@ -331,7 +341,7 @@ int main(int argc, char *argv[]) {
|
|||||||
ff = -1;
|
ff = -1;
|
||||||
ifr = 0;
|
ifr = 0;
|
||||||
while (decoder->readNextFrame(filebin, ff, np, buff)) {
|
while (decoder->readNextFrame(filebin, ff, np, buff)) {
|
||||||
if (np == 40) {
|
if (np == numberOfPackets) {
|
||||||
// //push
|
// //push
|
||||||
mt->pushData(buff);
|
mt->pushData(buff);
|
||||||
// // //pop
|
// // //pop
|
||||||
@ -339,7 +349,7 @@ int main(int argc, char *argv[]) {
|
|||||||
mt->popFree(buff);
|
mt->popFree(buff);
|
||||||
|
|
||||||
ifr++;
|
ifr++;
|
||||||
if (ifr % 100 == 0)
|
if (ifr % 100 == 0)
|
||||||
cout << ifr << " " << ff << endl;
|
cout << ifr << " " << ff << endl;
|
||||||
if (nframes > 0) {
|
if (nframes > 0) {
|
||||||
if (ifr % nframes == 0) {
|
if (ifr % nframes == 0) {
|
||||||
@ -351,8 +361,10 @@ int main(int argc, char *argv[]) {
|
|||||||
ifile++;
|
ifile++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else
|
} else {
|
||||||
cout << ifr << " " << ff << " " << np << endl;
|
cout << "bp " << ifr << " " << ff << " " << np << endl;
|
||||||
|
//break;
|
||||||
|
}
|
||||||
ff = -1;
|
ff = -1;
|
||||||
}
|
}
|
||||||
cout << "--" << endl;
|
cout << "--" << endl;
|
||||||
|
@ -333,20 +333,20 @@ int main(int argc, char *argv[]) {
|
|||||||
// uint32_t dynamicRange = 0;
|
// uint32_t dynamicRange = 0;
|
||||||
// infinite loop
|
// infinite loop
|
||||||
uint32_t packetNumber = 0;
|
uint32_t packetNumber = 0;
|
||||||
uint64_t bunchId = 0;
|
uint64_t detSpec1 = 0;
|
||||||
uint64_t timestamp = 0;
|
uint64_t timestamp = 0;
|
||||||
int16_t modId = 0;
|
int16_t modId = 0;
|
||||||
uint32_t expLength = 0;
|
uint32_t expLength = 0;
|
||||||
uint16_t xCoord = 0;
|
uint16_t xCoord = 0;
|
||||||
uint16_t yCoord = 0;
|
uint16_t yCoord = 0;
|
||||||
// uint16_t zCoord = 0;
|
// uint16_t zCoord = 0;
|
||||||
uint32_t debug = 0;
|
uint32_t detSpec3 = 0;
|
||||||
// uint32_t dr = 16;
|
// uint32_t dr = 16;
|
||||||
// int16_t *dout;//=new int16_t [nnx*nny];
|
// int16_t *dout;//=new int16_t [nnx*nny];
|
||||||
uint32_t dr = 32;
|
uint32_t dr = 32;
|
||||||
int32_t *dout = NULL; //=new int32_t [nnx*nny];
|
int32_t *dout = NULL; //=new int32_t [nnx*nny];
|
||||||
float *doutf = NULL; //=new int32_t [nnx*nny];
|
float *doutf = NULL; //=new int32_t [nnx*nny];
|
||||||
uint16_t roundRNumber = 0;
|
uint16_t detSpec4 = 0;
|
||||||
uint8_t detType = 0;
|
uint8_t detType = 0;
|
||||||
uint8_t version = 0;
|
uint8_t version = 0;
|
||||||
string additionalJsonHeader = "";
|
string additionalJsonHeader = "";
|
||||||
@ -555,9 +555,9 @@ int main(int argc, char *argv[]) {
|
|||||||
// zmqsocket2->SendHeaderData (0,
|
// zmqsocket2->SendHeaderData (0,
|
||||||
// false,SLS_DETECTOR_JSON_HEADER_VERSION , dr,
|
// false,SLS_DETECTOR_JSON_HEADER_VERSION , dr,
|
||||||
// fileindex, 1,1,nnx,nny,nnx*nny*dr/8,acqIndex,
|
// fileindex, 1,1,nnx,nny,nnx*nny*dr/8,acqIndex,
|
||||||
// frameIndex, fname,acqIndex,0 , packetNumber,bunchId,
|
// frameIndex, fname,acqIndex,0 , packetNumber,detSpec1,
|
||||||
// timestamp, modId,xCoord, yCoord, zCoord,debug,
|
// timestamp, modId,xCoord, yCoord, zCoord,detSpec3,
|
||||||
// roundRNumber, detType, version, 0,0,
|
// detSpec4, detType, version, 0,0,
|
||||||
// 0,&additionalJsonHeader);
|
// 0,&additionalJsonHeader);
|
||||||
|
|
||||||
outHeader.data = true;
|
outHeader.data = true;
|
||||||
@ -574,13 +574,13 @@ int main(int argc, char *argv[]) {
|
|||||||
outHeader.frameNumber = acqIndex;
|
outHeader.frameNumber = acqIndex;
|
||||||
outHeader.expLength = expLength;
|
outHeader.expLength = expLength;
|
||||||
outHeader.packetNumber = packetNumber;
|
outHeader.packetNumber = packetNumber;
|
||||||
outHeader.bunchId = bunchId;
|
outHeader.detSpec1 = detSpec1;
|
||||||
outHeader.timestamp = timestamp;
|
outHeader.timestamp = timestamp;
|
||||||
outHeader.modId = modId;
|
outHeader.modId = modId;
|
||||||
outHeader.row = xCoord;
|
outHeader.row = xCoord;
|
||||||
outHeader.column = yCoord;
|
outHeader.column = yCoord;
|
||||||
outHeader.debug = debug;
|
outHeader.detSpec3 = detSpec3;
|
||||||
outHeader.roundRNumber = roundRNumber;
|
outHeader.detSpec4 = detSpec4;
|
||||||
outHeader.detType = detType;
|
outHeader.detType = detType;
|
||||||
outHeader.version = version;
|
outHeader.version = version;
|
||||||
|
|
||||||
@ -634,11 +634,11 @@ int main(int argc, char *argv[]) {
|
|||||||
expLength = zHeader.expLength; // doc["expLength"].GetUint();
|
expLength = zHeader.expLength; // doc["expLength"].GetUint();
|
||||||
packetNumber =
|
packetNumber =
|
||||||
zHeader.packetNumber; // doc["packetNumber"].GetUint();
|
zHeader.packetNumber; // doc["packetNumber"].GetUint();
|
||||||
bunchId = zHeader.bunchId; // doc["bunchId"].GetUint();
|
detSpec1 = zHeader.detSpec1; // doc["detSpec1"].GetUint();
|
||||||
timestamp = zHeader.timestamp; // doc["timestamp"].GetUint();
|
timestamp = zHeader.timestamp; // doc["timestamp"].GetUint();
|
||||||
modId = zHeader.modId; // doc["modId"].GetUint();
|
modId = zHeader.modId; // doc["modId"].GetUint();
|
||||||
debug = zHeader.debug; // doc["debug"].GetUint();
|
detSpec3 = zHeader.detSpec3; // doc["detSpec3"].GetUint();
|
||||||
// roundRNumber=r.roundRNumber;//doc["roundRNumber"].GetUint();
|
// detSpec4=r.detSpec4;//doc["detSpec4"].GetUint();
|
||||||
detType = zHeader.detType; // doc["detType"].GetUint();
|
detType = zHeader.detType; // doc["detType"].GetUint();
|
||||||
version = zHeader.version; // doc["version"].GetUint();
|
version = zHeader.version; // doc["version"].GetUint();
|
||||||
/*document["bitmode"].GetUint(); zHeader.dynamicRange
|
/*document["bitmode"].GetUint(); zHeader.dynamicRange
|
||||||
@ -815,11 +815,11 @@ int main(int argc, char *argv[]) {
|
|||||||
|
|
||||||
// subFrameIndex = doc["expLength"].GetUint();
|
// subFrameIndex = doc["expLength"].GetUint();
|
||||||
|
|
||||||
// bunchId=doc["bunchId"].GetUint();
|
// detSpec1=doc["detSpec1"].GetUint();
|
||||||
// timestamp=doc["timestamp"].GetUint();
|
// timestamp=doc["timestamp"].GetUint();
|
||||||
packetNumber = zHeader.packetNumber; // doc["packetNumber"].GetUint();
|
packetNumber = zHeader.packetNumber; // doc["packetNumber"].GetUint();
|
||||||
// cout << acqIndex << " " << frameIndex << " " << subFrameIndex << "
|
// cout << acqIndex << " " << frameIndex << " " << subFrameIndex << "
|
||||||
// "<< bunchId << " " << timestamp << " " << packetNumber << endl;
|
// "<< detSpec1 << " " << timestamp << " " << packetNumber << endl;
|
||||||
// cprintf(GREEN, "frame\n");
|
// cprintf(GREEN, "frame\n");
|
||||||
if (packetNumber >= 40) {
|
if (packetNumber >= 40) {
|
||||||
//*((int*)buff)=frameIndex;
|
//*((int*)buff)=frameIndex;
|
||||||
@ -902,15 +902,15 @@ int main(int argc, char *argv[]) {
|
|||||||
// zmqsocket2->SendHeaderData (0,
|
// zmqsocket2->SendHeaderData (0,
|
||||||
// false,SLS_DETECTOR_JSON_HEADER_VERSION , dr, fileindex,
|
// false,SLS_DETECTOR_JSON_HEADER_VERSION , dr, fileindex,
|
||||||
// 1,1,nnx,nny,nnx*nny*dr/8,acqIndex, frameIndex, fname,acqIndex,0
|
// 1,1,nnx,nny,nnx*nny*dr/8,acqIndex, frameIndex, fname,acqIndex,0
|
||||||
// , packetNumber,bunchId, timestamp, modId,xCoord, yCoord,
|
// , packetNumber,detSpec1, timestamp, modId,xCoord, yCoord,
|
||||||
// zCoord,debug, roundRNumber, detType, version, 0,0,
|
// zCoord,detSpec3, detSpec4, detType, version, 0,0,
|
||||||
// 0,&additionalJsonHeader);
|
// 0,&additionalJsonHeader);
|
||||||
|
|
||||||
// zmqsocket2->SendHeaderData (0,
|
// zmqsocket2->SendHeaderData (0,
|
||||||
// false,SLS_DETECTOR_JSON_HEADER_VERSION , dr, fileindex,
|
// false,SLS_DETECTOR_JSON_HEADER_VERSION , dr, fileindex,
|
||||||
// 1,1,nnx,nny,nnx*nny*dr/8,acqIndex, frameIndex, fname,acqIndex,0
|
// 1,1,nnx,nny,nnx*nny*dr/8,acqIndex, frameIndex, fname,acqIndex,0
|
||||||
// , packetNumber,bunchId, timestamp, modId,xCoord, yCoord,
|
// , packetNumber,detSpec1, timestamp, modId,xCoord, yCoord,
|
||||||
// zCoord,debug, roundRNumber, detType, version, 0,0,
|
// zCoord,detSpec3, detSpec4, detType, version, 0,0,
|
||||||
// 0,&additionalJsonHeader);
|
// 0,&additionalJsonHeader);
|
||||||
|
|
||||||
outHeader.data = true;
|
outHeader.data = true;
|
||||||
@ -927,13 +927,13 @@ int main(int argc, char *argv[]) {
|
|||||||
outHeader.frameNumber = acqIndex;
|
outHeader.frameNumber = acqIndex;
|
||||||
outHeader.expLength = expLength;
|
outHeader.expLength = expLength;
|
||||||
outHeader.packetNumber = packetNumber;
|
outHeader.packetNumber = packetNumber;
|
||||||
outHeader.bunchId = bunchId;
|
outHeader.detSpec1 = detSpec1;
|
||||||
outHeader.timestamp = timestamp;
|
outHeader.timestamp = timestamp;
|
||||||
outHeader.modId = modId;
|
outHeader.modId = modId;
|
||||||
outHeader.row = xCoord;
|
outHeader.row = xCoord;
|
||||||
outHeader.column = yCoord;
|
outHeader.column = yCoord;
|
||||||
outHeader.debug = debug;
|
outHeader.detSpec3 = detSpec3;
|
||||||
outHeader.roundRNumber = roundRNumber;
|
outHeader.detSpec4 = detSpec4;
|
||||||
outHeader.detType = detType;
|
outHeader.detType = detType;
|
||||||
outHeader.version = version;
|
outHeader.version = version;
|
||||||
|
|
||||||
|
@ -429,28 +429,30 @@ class singlePhotonDetector : public analogDetector<uint16_t> {
|
|||||||
for (ic = -(clusterSize / 2); ic < (clusterSize / 2) + 1;
|
for (ic = -(clusterSize / 2); ic < (clusterSize / 2) + 1;
|
||||||
ic++) {
|
ic++) {
|
||||||
|
|
||||||
if ((iy + ir) >= 0 && (iy + ir) < ny &&
|
if ( (iy + ir) >= 0 && (iy + ir) < ny &&
|
||||||
(ix + ic) >= 0 && (ix + ic) < nx) {
|
(ix + ic) >= 0 && (ix + ic) < nx) {
|
||||||
|
|
||||||
|
|
||||||
if ((iy + ir) >= iy && (ix + ic) >= ix ) {
|
if ((iy + ir) > iy && (ix + ic) > ix ) {
|
||||||
val[(iy + ir) * nx + ix + ic] =
|
|
||||||
subtractPedestal(data, ix + ic, iy + ir, cm);
|
|
||||||
|
|
||||||
}
|
val[(iy + ir) * nx + ix + ic] =
|
||||||
v = &(val[(iy + ir) * nx + ix + ic]);
|
subtractPedestal(data, ix + ic, iy + ir, cm);
|
||||||
tot += *v;
|
|
||||||
if (ir <= 0 && ic <= 0)
|
|
||||||
bl += *v;
|
}
|
||||||
if (ir <= 0 && ic >= 0)
|
v = &(val[(iy + ir) * nx + ix + ic]);
|
||||||
br += *v;
|
tot += *v;
|
||||||
if (ir >= 0 && ic <= 0)
|
if (ir <= 0 && ic <= 0)
|
||||||
tl += *v;
|
bl += *v;
|
||||||
if (ir >= 0 && ic >= 0)
|
if (ir <= 0 && ic >= 0)
|
||||||
|
br += *v;
|
||||||
|
if (ir >= 0 && ic <= 0)
|
||||||
|
tl += *v;
|
||||||
|
if (ir >= 0 && ic >= 0)
|
||||||
tr += *v;
|
tr += *v;
|
||||||
if (*v > max) //{
|
if (*v > max) //{
|
||||||
max = *v;
|
max = *v;
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,12 +5,12 @@
|
|||||||
|
|
||||||
//Write 32bit float data to tiff file
|
//Write 32bit float data to tiff file
|
||||||
//Always returns nullptr, prints message on failure
|
//Always returns nullptr, prints message on failure
|
||||||
void *WriteToTiff(float *imgData, const char *imgname, int nrow, int ncol);
|
void *WriteToTiff(float *imgData, const char *imgname, int ncol, int nrow);
|
||||||
|
|
||||||
//Read 32bit float data from tiff file, returns pointer to data and sets
|
//Read 32bit float data from tiff file, returns pointer to data and sets
|
||||||
//image dimensions in the out parameters nrow, ncol.
|
//image dimensions in the out parameters nrow, ncol.
|
||||||
//Returns nullptr on failure
|
//Returns nullptr on failure
|
||||||
//The caller is responsible to deallocate the memory that the returned
|
//The caller is responsible to deallocate the memory that the returned
|
||||||
//pointer points to.
|
//pointer points to.
|
||||||
float *ReadFromTiff(const char *imgname, uint32_t &nrow, uint32_t &ncol);
|
float *ReadFromTiff(const char *imgname, uint32_t &ncol, uint32_t &nrow);
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <tiffio.h>
|
#include <tiffio.h>
|
||||||
|
|
||||||
void *WriteToTiff(float *imgData, const char *imgname, int nrow, int ncol) {
|
void *WriteToTiff(float *imgData, const char *imgname, int ncol, int nrow) {
|
||||||
constexpr uint32_t sampleperpixel = 1;
|
constexpr uint32_t sampleperpixel = 1;
|
||||||
TIFF *tif = TIFFOpen(imgname, "w");
|
TIFF *tif = TIFFOpen(imgname, "w");
|
||||||
if (tif) {
|
if (tif) {
|
||||||
@ -30,7 +30,7 @@ void *WriteToTiff(float *imgData, const char *imgname, int nrow, int ncol) {
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
float *ReadFromTiff(const char *imgname, uint32_t &nrow, uint32_t &ncol) {
|
float *ReadFromTiff(const char *imgname, uint32_t &ncol, uint32_t &nrow) {
|
||||||
TIFF *tif = TIFFOpen(imgname, "r");
|
TIFF *tif = TIFFOpen(imgname, "r");
|
||||||
if (tif) {
|
if (tif) {
|
||||||
TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &ncol);
|
TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &ncol);
|
||||||
|
@ -1,12 +1,16 @@
|
|||||||
# SPDX-License-Identifier: LGPL-3.0-or-other
|
# SPDX-License-Identifier: LGPL-3.0-or-other
|
||||||
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
# Copyright (C) 2021 Contributors to the SLS Detector Package
|
||||||
set(CMAKE_AUTOMOC ON)
|
|
||||||
|
|
||||||
find_package(Qt4 REQUIRED)
|
set(CMAKE_AUTOMOC ON)
|
||||||
find_package(Qwt 6.1 REQUIRED)
|
set(CMAKE_AUTORCC ON)
|
||||||
|
|
||||||
|
|
||||||
|
find_package(Qt5 5.9 COMPONENTS Widgets Core Gui REQUIRED)
|
||||||
|
|
||||||
find_package(PNG REQUIRED)
|
find_package(PNG REQUIRED)
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
|
|
||||||
|
|
||||||
set(SOURCES
|
set(SOURCES
|
||||||
slsDetectorPlotting/src/SlsQt1DPlot.cpp
|
slsDetectorPlotting/src/SlsQt1DPlot.cpp
|
||||||
slsDetectorPlotting/src/SlsQt1DZoomer.cpp
|
slsDetectorPlotting/src/SlsQt1DZoomer.cpp
|
||||||
@ -24,6 +28,7 @@ set(SOURCES
|
|||||||
src/qTabDeveloper.cpp
|
src/qTabDeveloper.cpp
|
||||||
src/qTabMessages.cpp
|
src/qTabMessages.cpp
|
||||||
src/qDacWidget.cpp
|
src/qDacWidget.cpp
|
||||||
|
src/qVersionResolve.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(FORMS
|
set(FORMS
|
||||||
@ -41,7 +46,7 @@ set(FORMS
|
|||||||
forms/form_cloneplot.ui
|
forms/form_cloneplot.ui
|
||||||
)
|
)
|
||||||
|
|
||||||
qt4_wrap_ui(FORMS_H ${FORMS})
|
qt5_wrap_ui(FORMS_H ${FORMS})
|
||||||
|
|
||||||
set(HEADERS
|
set(HEADERS
|
||||||
slsDetectorPlotting/include/SlsQt1DPlot.h
|
slsDetectorPlotting/include/SlsQt1DPlot.h
|
||||||
@ -62,15 +67,16 @@ set(HEADERS
|
|||||||
include/qTabDeveloper.h
|
include/qTabDeveloper.h
|
||||||
include/qTabMessages.h
|
include/qTabMessages.h
|
||||||
include/qDacWidget.h
|
include/qDacWidget.h
|
||||||
|
include/qVersionResolve.h
|
||||||
)
|
)
|
||||||
set(RESOURCES
|
set(RESOURCES
|
||||||
include/icons.qrc
|
include/icons.qrc
|
||||||
)
|
)
|
||||||
qt4_add_resources(RESOURCES_SRCS ${RESOURCES})
|
qt5_add_resources(RESOURCES_SRCS ${RESOURCES})
|
||||||
|
|
||||||
|
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-DPRINT_LOG #-DVERBOSE
|
${Qt5Widgets_DEFINITIONS} -DPRINT_LOG #-DVERBOSE
|
||||||
)
|
)
|
||||||
|
|
||||||
add_executable(slsDetectorGui
|
add_executable(slsDetectorGui
|
||||||
@ -84,31 +90,30 @@ target_include_directories(slsDetectorGui PUBLIC
|
|||||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
|
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
|
||||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/slsDetectorPlotting/include>"
|
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/slsDetectorPlotting/include>"
|
||||||
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
|
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>"
|
||||||
"$<BUILD_INTERFACE:${QT_INCLUDE_DIR}>"
|
"$<BUILD_INTERFACE:${QT5Widgets_INCLUDE_DIRS}>"
|
||||||
"$<BUILD_INTERFACE:${QT_QTCORE_INCLUDE_DIR}>"
|
"$<BUILD_INTERFACE:${SLS_INTERNAL_QWT_DIR}/include>"
|
||||||
"$<BUILD_INTERFACE:${QT_QTGUI_INCLUDE_DIR}>"
|
|
||||||
"$<BUILD_INTERFACE:${QWT_INCLUDE_DIR}>"
|
|
||||||
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>"
|
"$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(slsDetectorGui PUBLIC
|
target_link_libraries(slsDetectorGui PUBLIC
|
||||||
slsProjectOptions
|
slsProjectOptions
|
||||||
slsDetectorStatic
|
slsDetectorStatic
|
||||||
${QT_QTCORE_LIBRARIES}
|
|
||||||
${QT_QTGUI_LIBRARIES}
|
|
||||||
${QWT_LIBRARIES}
|
|
||||||
PNG::PNG
|
PNG::PNG
|
||||||
ZLIB::ZLIB
|
ZLIB::ZLIB
|
||||||
Qt4::QtOpenGL
|
Qt5::Widgets
|
||||||
Qt4::QtSvg
|
Qt5::Gui
|
||||||
|
Qt5::Core
|
||||||
expat
|
expat
|
||||||
|
|
||||||
PRIVATE
|
PRIVATE
|
||||||
slsProjectWarnings
|
slsProjectWarnings
|
||||||
|
qwt
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_properties(slsDetectorGui PROPERTIES
|
set_target_properties(slsDetectorGui PROPERTIES
|
||||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||||
|
#Instruct CMake to run moc automatically when needed
|
||||||
|
AUTOMOC ON
|
||||||
)
|
)
|
||||||
if((CMAKE_BUILD_TYPE STREQUAL "Release") AND SLS_LTO_AVAILABLE)
|
if((CMAKE_BUILD_TYPE STREQUAL "Release") AND SLS_LTO_AVAILABLE)
|
||||||
set_property(TARGET slsDetectorGui PROPERTY INTERPROCEDURAL_OPTIMIZATION True)
|
set_property(TARGET slsDetectorGui PROPERTY INTERPROCEDURAL_OPTIMIZATION True)
|
||||||
|
@ -16,44 +16,17 @@
|
|||||||
<height>300</height>
|
<height>300</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Carlito</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>MainWindow</string>
|
<string>MainWindow</string>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="centralwidget">
|
<widget class="QWidget" name="centralwidget">
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QGroupBox" name="boxPlot">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
|
||||||
<font>
|
|
||||||
<family>Sans Serif</family>
|
|
||||||
<pointsize>10</pointsize>
|
|
||||||
</font>
|
|
||||||
</property>
|
|
||||||
<property name="title">
|
|
||||||
<string>Sample Plot</string>
|
|
||||||
</property>
|
|
||||||
<property name="alignment">
|
|
||||||
<set>Qt::AlignCenter</set>
|
|
||||||
</property>
|
|
||||||
<property name="flat">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="plotLayout">
|
|
||||||
<property name="margin">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
<property name="spacing">
|
|
||||||
<number>0</number>
|
|
||||||
</property>
|
|
||||||
</layout>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="lblCompleteImage">
|
<widget class="QLabel" name="lblCompleteImage">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -218,7 +191,16 @@
|
|||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
@ -376,6 +358,48 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="0" column="0" colspan="3">
|
||||||
|
<widget class="QGroupBox" name="boxPlot">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Carlito</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Sample Plot</string>
|
||||||
|
</property>
|
||||||
|
<property name="alignment">
|
||||||
|
<set>Qt::AlignCenter</set>
|
||||||
|
</property>
|
||||||
|
<property name="flat">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<layout class="QGridLayout" name="plotLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenuBar" name="menubar">
|
<widget class="QMenuBar" name="menubar">
|
||||||
@ -384,7 +408,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>376</width>
|
<width>376</width>
|
||||||
<height>27</height>
|
<height>17</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QMenu" name="menuSave">
|
<widget class="QMenu" name="menuSave">
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>300</width>
|
<width>300</width>
|
||||||
<height>30</height>
|
<height>28</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -19,25 +19,102 @@
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>300</width>
|
<width>300</width>
|
||||||
<height>30</height>
|
<height>28</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>300</width>
|
<width>300</width>
|
||||||
<height>30</height>
|
<height>28</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
<property name="verticalSpacing">
|
<property name="verticalSpacing">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="margin">
|
<item row="0" column="0">
|
||||||
<number>0</number>
|
<widget class="QLabel" name="lblDac">
|
||||||
</property>
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>100</width>
|
||||||
|
<height>25</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>90</width>
|
||||||
|
<height>25</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>vref_comp_fe:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3">
|
||||||
|
<widget class="QLabel" name="lblDacmV">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>70</width>
|
||||||
|
<height>25</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>70</width>
|
||||||
|
<height>25</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>2999 mV</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="1">
|
||||||
<widget class="QDoubleSpinBox" name="spinDac">
|
<widget class="QDoubleSpinBox" name="spinDac">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
@ -52,6 +129,18 @@
|
|||||||
<height>25</height>
|
<height>25</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Set dac in dac units</string>
|
||||||
|
</property>
|
||||||
|
<property name="buttonSymbols">
|
||||||
|
<enum>QAbstractSpinBox::PlusMinus</enum>
|
||||||
|
</property>
|
||||||
<property name="keyboardTracking">
|
<property name="keyboardTracking">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -61,57 +150,26 @@
|
|||||||
<property name="maximum">
|
<property name="maximum">
|
||||||
<double>10000.000000000000000</double>
|
<double>10000.000000000000000</double>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="value">
|
||||||
</item>
|
<double>2799.000000000000000</double>
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="lblDac">
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>120</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>120</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>TextLabel</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
<item row="0" column="2">
|
||||||
<widget class="QLabel" name="lblDacmV">
|
<spacer name="horizontalSpacer">
|
||||||
<property name="sizePolicy">
|
<property name="orientation">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
<enum>Qt::Horizontal</enum>
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>60</width>
|
<width>5</width>
|
||||||
<height>25</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
</spacer>
|
||||||
<size>
|
|
||||||
<width>60</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>---mV</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>800</width>
|
<width>800</width>
|
||||||
<height>906</height>
|
<height>882</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -139,7 +139,8 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>9</pointsize>
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
@ -149,6 +150,9 @@
|
|||||||
<iconset resource="../include/icons.qrc">
|
<iconset resource="../include/icons.qrc">
|
||||||
<normaloff>:/icons/images/mountain.png</normaloff>:/icons/images/mountain.png</iconset>
|
<normaloff>:/icons/images/mountain.png</normaloff>:/icons/images/mountain.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string/>
|
||||||
|
</property>
|
||||||
<property name="inputMethodHints">
|
<property name="inputMethodHints">
|
||||||
<set>Qt::ImhNone</set>
|
<set>Qt::ImhNone</set>
|
||||||
</property>
|
</property>
|
||||||
@ -171,84 +175,616 @@
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
<height>395</height>
|
<height>400</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>524287</width>
|
<width>524287</width>
|
||||||
<height>395</height>
|
<height>400</height>
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<layout class="QGridLayout" name="layoutTabs"/>
|
|
||||||
</widget>
|
|
||||||
<widget class="QMenuBar" name="menubar">
|
|
||||||
<property name="geometry">
|
|
||||||
<rect>
|
|
||||||
<x>0</x>
|
|
||||||
<y>0</y>
|
|
||||||
<width>800</width>
|
|
||||||
<height>25</height>
|
|
||||||
</rect>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>9</pointsize>
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="focusPolicy">
|
<layout class="QGridLayout" name="layoutTabs">
|
||||||
<enum>Qt::StrongFocus</enum>
|
<item row="0" column="0">
|
||||||
</property>
|
<widget class="QTabWidget" name="tabs">
|
||||||
<property name="defaultUp">
|
<property name="palette">
|
||||||
<bool>false</bool>
|
<palette>
|
||||||
</property>
|
<active>
|
||||||
<property name="nativeMenuBar">
|
<colorrole role="WindowText">
|
||||||
<bool>true</bool>
|
<brush brushstyle="SolidPattern">
|
||||||
</property>
|
<color alpha="255">
|
||||||
<widget class="QMenu" name="menuHelp">
|
<red>0</red>
|
||||||
<property name="title">
|
<green>0</green>
|
||||||
<string>&Help</string>
|
<blue>0</blue>
|
||||||
</property>
|
</color>
|
||||||
<addaction name="actionAbout"/>
|
</brush>
|
||||||
</widget>
|
</colorrole>
|
||||||
<widget class="QMenu" name="menuUtilities">
|
<colorrole role="Button">
|
||||||
<property name="title">
|
<brush brushstyle="SolidPattern">
|
||||||
<string>Utilities</string>
|
<color alpha="255">
|
||||||
</property>
|
<red>255</red>
|
||||||
<addaction name="actionLoadConfiguration"/>
|
<green>255</green>
|
||||||
<addaction name="actionLoadTrimbits"/>
|
<blue>255</blue>
|
||||||
<addaction name="actionSaveTrimbits"/>
|
</color>
|
||||||
<addaction name="actionLoadParameters"/>
|
</brush>
|
||||||
</widget>
|
</colorrole>
|
||||||
<widget class="QMenu" name="menuModes">
|
<colorrole role="Text">
|
||||||
<property name="title">
|
<brush brushstyle="SolidPattern">
|
||||||
<string>Modes</string>
|
<color alpha="255">
|
||||||
</property>
|
<red>0</red>
|
||||||
<addaction name="actionDebug"/>
|
<green>0</green>
|
||||||
<addaction name="actionExpert"/>
|
<blue>0</blue>
|
||||||
<addaction name="actionDockable"/>
|
</color>
|
||||||
</widget>
|
</brush>
|
||||||
<addaction name="menuUtilities"/>
|
</colorrole>
|
||||||
<addaction name="menuModes"/>
|
<colorrole role="ButtonText">
|
||||||
<addaction name="menuHelp"/>
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Base">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Window">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
</active>
|
||||||
|
<inactive>
|
||||||
|
<colorrole role="WindowText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Button">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Text">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="ButtonText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>0</red>
|
||||||
|
<green>0</green>
|
||||||
|
<blue>0</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Base">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Window">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
</inactive>
|
||||||
|
<disabled>
|
||||||
|
<colorrole role="WindowText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>185</red>
|
||||||
|
<green>185</green>
|
||||||
|
<blue>185</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Button">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Text">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>185</red>
|
||||||
|
<green>185</green>
|
||||||
|
<blue>185</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="ButtonText">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>185</red>
|
||||||
|
<green>185</green>
|
||||||
|
<blue>185</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Base">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
<colorrole role="Window">
|
||||||
|
<brush brushstyle="SolidPattern">
|
||||||
|
<color alpha="255">
|
||||||
|
<red>255</red>
|
||||||
|
<green>255</green>
|
||||||
|
<blue>255</blue>
|
||||||
|
</color>
|
||||||
|
</brush>
|
||||||
|
</colorrole>
|
||||||
|
</disabled>
|
||||||
|
</palette>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="styleSheet">
|
||||||
|
<string notr="true">background-color: rgb(255, 255, 255);</string>
|
||||||
|
</property>
|
||||||
|
<property name="currentIndex">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="tMeasurement">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Measurement</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="spacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QScrollArea" name="scrollMeasurement">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<property name="widgetResizable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="scrollAreaWidgetContents">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>778</width>
|
||||||
|
<height>351</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tSettings">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Settings</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_3">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QScrollArea" name="scrollSettings">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<property name="widgetResizable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="scrollAreaWidgetContents_2">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>760</width>
|
||||||
|
<height>333</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tDataOutput">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Data Output</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_4">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QScrollArea" name="scrollDataOutput">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<property name="widgetResizable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="scrollAreaWidgetContents_3">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>760</width>
|
||||||
|
<height>333</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tPlot">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Plot</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_6">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QScrollArea" name="scrollPlot">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<property name="widgetResizable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="scrollAreaWidgetContents_4">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>760</width>
|
||||||
|
<height>333</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tAdvanced">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Advanced</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_8">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QScrollArea" name="scrollAdvanced">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<property name="widgetResizable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="scrollAreaWidgetContents_5">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>760</width>
|
||||||
|
<height>333</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tDebugging">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Debugging</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_10">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QScrollArea" name="scrollDebugging">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<property name="widgetResizable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="scrollAreaWidgetContents_6">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>760</width>
|
||||||
|
<height>333</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tDeveloper">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Developer</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_12">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QScrollArea" name="scrollDeveloper">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<property name="widgetResizable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="scrollAreaWidgetContents_7">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>760</width>
|
||||||
|
<height>333</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<widget class="QWidget" name="tTerminal">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<attribute name="title">
|
||||||
|
<string>Terminal</string>
|
||||||
|
</attribute>
|
||||||
|
<layout class="QGridLayout" name="gridLayout_14">
|
||||||
|
<item row="0" column="0">
|
||||||
|
<widget class="QScrollArea" name="scrollTerminal">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="focusPolicy">
|
||||||
|
<enum>Qt::NoFocus</enum>
|
||||||
|
</property>
|
||||||
|
<property name="frameShape">
|
||||||
|
<enum>QFrame::NoFrame</enum>
|
||||||
|
</property>
|
||||||
|
<property name="widgetResizable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<widget class="QWidget" name="scrollAreaWidgetContents_8">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>760</width>
|
||||||
|
<height>333</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QDockWidget" name="dockWidgetPlot">
|
<widget class="QDockWidget" name="dockWidgetPlot">
|
||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
@ -262,8 +798,8 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>36</width>
|
<width>50</width>
|
||||||
<height>425</height>
|
<height>54</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
@ -274,24 +810,15 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Sans Serif</family>
|
<family>Cantarell</family>
|
||||||
<pointsize>11</pointsize>
|
<pointsize>10</pointsize>
|
||||||
<weight>50</weight>
|
<weight>50</weight>
|
||||||
<bold>false</bold>
|
<bold>false</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
<string><html><head/><body>
|
||||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
<span style=" font-family:'Sans Serif'; font-size:9pt; color:#00007f;">Left Click :zoom in</span><br><span style=" font-family:'Sans Serif'; font-size:9pt; color:#00007f;">Right Click : zoom out by 1</span><br><span style=" font-family:'Sans Serif'; font-size:9pt; color:#00007f;">Middle Click : panning</span><br><span style=" font-family:'Sans Serif'; font-size:9pt; color:#00007f;">Ctrl+Right Click : zoom out to full size</span></body></html></string>
|
||||||
p, li { white-space: pre-wrap; }
|
|
||||||
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
|
|
||||||
<table border="0" style="-qt-table-type: root; margin-top:4px; margin-bottom:4px; margin-left:4px; margin-right:4px;">
|
|
||||||
<tr>
|
|
||||||
<td style="border: none;">
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#00007f;">Left Click :zoom in</span></p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#00007f;">Righ</span><span style=" color:#00007f;">t Click </span><span style=" color:#00007f;">: zoom out by 1</span></p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#00007f;">Middle Click : panning</span></p>
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" color:#00007f;">Ctrl+Right Click : zoom out to full size</span></p></td></tr></table></body></html></string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="statusTip">
|
<property name="statusTip">
|
||||||
<string/>
|
<string/>
|
||||||
@ -300,7 +827,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
<enum>Qt::LeftToRight</enum>
|
<enum>Qt::LeftToRight</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="features">
|
<property name="features">
|
||||||
<set>QDockWidget::NoDockWidgetFeatures</set>
|
<set>QDockWidget::DockWidgetFloatable</set>
|
||||||
</property>
|
</property>
|
||||||
<property name="allowedAreas">
|
<property name="allowedAreas">
|
||||||
<set>Qt::BottomDockWidgetArea</set>
|
<set>Qt::BottomDockWidgetArea</set>
|
||||||
@ -321,7 +848,7 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
<height>400</height>
|
<height>0</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
@ -369,27 +896,125 @@ p, li { white-space: pre-wrap; }
|
|||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>9</pointsize>
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
<weight>50</weight>
|
<weight>50</weight>
|
||||||
<bold>false</bold>
|
<bold>false</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QMenuBar" name="menu">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>800</width>
|
||||||
|
<height>22</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>50</width>
|
||||||
|
<height>0</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<widget class="QMenu" name="menuUtilities">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Utilities</string>
|
||||||
|
</property>
|
||||||
|
<addaction name="actionLoadConfiguration"/>
|
||||||
|
<addaction name="actionLoadTrimbits"/>
|
||||||
|
<addaction name="actionSaveTrimbits"/>
|
||||||
|
<addaction name="actionLoadParameters"/>
|
||||||
|
</widget>
|
||||||
|
<widget class="QMenu" name="menuModes">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Modes</string>
|
||||||
|
</property>
|
||||||
|
<addaction name="actionDebug"/>
|
||||||
|
<addaction name="actionExpert"/>
|
||||||
|
</widget>
|
||||||
|
<widget class="QMenu" name="menuHelp">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="title">
|
||||||
|
<string>Help</string>
|
||||||
|
</property>
|
||||||
|
<addaction name="actionAbout"/>
|
||||||
|
</widget>
|
||||||
|
<addaction name="menuUtilities"/>
|
||||||
|
<addaction name="menuModes"/>
|
||||||
|
<addaction name="menuHelp"/>
|
||||||
|
</widget>
|
||||||
<action name="actionLoadConfiguration">
|
<action name="actionLoadConfiguration">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Load Configuration</string>
|
<string>Load Configuration</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionLoadTrimbits">
|
<action name="actionLoadTrimbits">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Load Trimbits</string>
|
<string>Load Trimbits</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionSaveTrimbits">
|
||||||
|
<property name="text">
|
||||||
|
<string>Save Trimbits</string>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionLoadParameters">
|
<action name="actionLoadParameters">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Load Parameters</string>
|
<string>Load Parameters</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionDebug">
|
<action name="actionDebug">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
@ -398,6 +1023,12 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Debug</string>
|
<string>Debug</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionExpert">
|
<action name="actionExpert">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
@ -406,23 +1037,36 @@ p, li { white-space: pre-wrap; }
|
|||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Expert</string>
|
<string>Expert</string>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionDockable">
|
<action name="actionDockable">
|
||||||
<property name="checkable">
|
<property name="checkable">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Dockable Windows</string>
|
<string>Dockable</string>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
<action name="actionAbout">
|
<action name="actionAbout">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&About</string>
|
<string>About</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
<property name="font">
|
||||||
<action name="actionSaveTrimbits">
|
<font>
|
||||||
<property name="text">
|
<family>Cantarell</family>
|
||||||
<string>Save Trimbits</string>
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -16,6 +16,12 @@
|
|||||||
<height>425</height>
|
<height>425</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
@ -77,6 +83,15 @@
|
|||||||
</disabled>
|
</disabled>
|
||||||
</palette>
|
</palette>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>ROI enabled at Receiver level (affects only file write)</p><p>#rx_roi#</p></body></html></string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Rx Roi Enabled</string>
|
<string>Rx Roi Enabled</string>
|
||||||
</property>
|
</property>
|
||||||
@ -95,8 +110,10 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<family>Sans Serif</family>
|
<family>Cantarell</family>
|
||||||
<pointsize>10</pointsize>
|
<pointsize>10</pointsize>
|
||||||
|
<weight>50</weight>
|
||||||
|
<bold>false</bold>
|
||||||
</font>
|
</font>
|
||||||
</property>
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
@ -109,7 +126,16 @@
|
|||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="plotLayout">
|
<layout class="QGridLayout" name="plotLayout">
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>9</number>
|
<number>9</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
@ -138,8 +164,26 @@
|
|||||||
<height>16</height>
|
<height>16</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Data Statistics</p></body></html></string>
|
||||||
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout_2">
|
<layout class="QGridLayout" name="gridLayout_2">
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
@ -165,6 +209,12 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Max: </string>
|
<string>Max: </string>
|
||||||
</property>
|
</property>
|
||||||
@ -181,6 +231,12 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>-</string>
|
<string>-</string>
|
||||||
</property>
|
</property>
|
||||||
@ -219,6 +275,12 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Min: </string>
|
<string>Min: </string>
|
||||||
</property>
|
</property>
|
||||||
@ -235,6 +297,12 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>-</string>
|
<string>-</string>
|
||||||
</property>
|
</property>
|
||||||
@ -248,6 +316,12 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>-</string>
|
<string>-</string>
|
||||||
</property>
|
</property>
|
||||||
@ -286,6 +360,12 @@
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Sum: </string>
|
<string>Sum: </string>
|
||||||
</property>
|
</property>
|
||||||
@ -367,6 +447,15 @@
|
|||||||
</disabled>
|
</disabled>
|
||||||
</palette>
|
</palette>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>If sub images have missing packets</p></body></html></string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Complete Image</string>
|
<string>Complete Image</string>
|
||||||
</property>
|
</property>
|
||||||
@ -432,6 +521,14 @@
|
|||||||
</disabled>
|
</disabled>
|
||||||
</palette>
|
</palette>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>If sub images have missing packets</p></body></html></string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Missing Packets</string>
|
<string>Missing Packets</string>
|
||||||
</property>
|
</property>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>775</width>
|
<width>770</width>
|
||||||
<height>345</height>
|
<height>364</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -24,10 +24,16 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>775</width>
|
<width>770</width>
|
||||||
<height>365</height>
|
<height>370</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
@ -37,6 +43,12 @@
|
|||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>File</string>
|
<string>File</string>
|
||||||
</property>
|
</property>
|
||||||
@ -55,6 +67,18 @@
|
|||||||
<height>25</height>
|
<height>25</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>105</width>
|
||||||
|
<height>25</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>The file path can be different depending on the Module chosen.</p></body></html></string>
|
<string><html><head/><body><p>The file path can be different depending on the Module chosen.</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
@ -111,8 +135,14 @@
|
|||||||
</disabled>
|
</disabled>
|
||||||
</palette>
|
</palette>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>Name of file. Can be modified in Measurement tab.<br/>#fname# <br/></p></body></html></string>
|
<string><html><head/><body><p>Name of data file in receiver. Can be modified in Measurement tab.<br/>#fname# <br/></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Name Prefix: </string>
|
<string>Name Prefix: </string>
|
||||||
@ -127,14 +157,20 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>35</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><nobr>
|
<string><html><head/><body><p>Directory where one saves the data in receiver. <br/>#fpath# <br/><br/>Disabled if receiver pc is not same as client pc. </p></body></html></string>
|
||||||
Directory where one saves the data.
|
|
||||||
</nobr><br>
|
|
||||||
#outdir#
|
|
||||||
<br>
|
|
||||||
Disabled if receiver pc is not same as client pc.
|
|
||||||
</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Browse</string>
|
<string>Browse</string>
|
||||||
@ -196,8 +232,14 @@ Disabled if receiver pc is not same as client pc.
|
|||||||
</disabled>
|
</disabled>
|
||||||
</palette>
|
</palette>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>File Format<br/>#fileformat# <br/></p></body></html></string>
|
<string><html><head/><body><p>File Format of data file in receiver<br/>#fformat# <br/></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Format:</string>
|
<string>Format:</string>
|
||||||
@ -218,8 +260,20 @@ Disabled if receiver pc is not same as client pc.
|
|||||||
<height>25</height>
|
<height>25</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>105</width>
|
||||||
|
<height>25</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>File Format<br/>#fileformat# <br/></p></body></html></string>
|
<string><html><head/><body><p>File Format of data file in receiver<br/>#fformat# <br/></p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@ -284,13 +338,14 @@ Disabled if receiver pc is not same as client pc.
|
|||||||
</disabled>
|
</disabled>
|
||||||
</palette>
|
</palette>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><nobr>
|
<string><html><head/><body><p>Directory where one saves the data in receiver. <br/>#fpath# <br/></p></body></html></string>
|
||||||
Directory where one saves the data.
|
|
||||||
</nobr><br>
|
|
||||||
#outdir#
|
|
||||||
<br>
|
|
||||||
</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Path:</string>
|
<string>Path:</string>
|
||||||
@ -314,9 +369,15 @@ Directory where one saves the data.
|
|||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>16777215</width>
|
||||||
<height>16777215</height>
|
<height>28</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::NoFocus</enum>
|
<enum>Qt::NoFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
@ -348,9 +409,14 @@ Directory where one saves the data.
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string>Overwrite Enable
|
<string><html><head/><body><p>Overwrite enable of data file in receiver</p><p> #foverwrite#</p></body></html></string>
|
||||||
#overwrite#</string>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Overwrite</string>
|
<string>Overwrite</string>
|
||||||
@ -397,16 +463,23 @@ Directory where one saves the data.
|
|||||||
<height>25</height>
|
<height>25</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>25</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::StrongFocus</enum>
|
<enum>Qt::StrongFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><nobr>
|
<string><html><head/><body><p>Directory where one saves the data in receiver. <br/>#fpath# <br/></p></body></html></string>
|
||||||
Directory where one saves the data.
|
|
||||||
</nobr><br>
|
|
||||||
#outdir#
|
|
||||||
<br>
|
|
||||||
</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -431,6 +504,12 @@ Directory where one saves the data.
|
|||||||
</item>
|
</item>
|
||||||
<item row="2" column="0">
|
<item row="2" column="0">
|
||||||
<widget class="QGroupBox" name="boxCorrection_2">
|
<widget class="QGroupBox" name="boxCorrection_2">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="title">
|
<property name="title">
|
||||||
<string>Options</string>
|
<string>Options</string>
|
||||||
</property>
|
</property>
|
||||||
@ -448,6 +527,15 @@ Directory where one saves the data.
|
|||||||
<height>16777215</height>
|
<height>16777215</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Speed of Detector readout</p><p>#speed#</p></body></html></string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Clock Divider:</string>
|
<string>Clock Divider:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -483,9 +571,18 @@ Directory where one saves the data.
|
|||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>200</width>
|
<width>200</width>
|
||||||
<height>16777215</height>
|
<height>25</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Speed of Detector readout</p><p>#speed#</p></body></html></string>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Full Speed</string>
|
<string>Full Speed</string>
|
||||||
@ -521,6 +618,25 @@ Directory where one saves the data.
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
|
<widget class="QCheckBox" name="chkTenGiga">
|
||||||
|
<property name="enabled">
|
||||||
|
<bool>false</bool>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Enable 10GbE</p><p>#tengiga#</p></body></html></string>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>10GbE</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
@ -528,6 +644,15 @@ Directory where one saves the data.
|
|||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Enable Parallel readout</p><p>#parallel#</p></body></html></string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Parallel Readout</string>
|
<string>Parallel Readout</string>
|
||||||
</property>
|
</property>
|
||||||
@ -535,23 +660,6 @@ Directory where one saves the data.
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
|
||||||
<widget class="QCheckBox" name="chkTenGiga">
|
|
||||||
<property name="enabled">
|
|
||||||
<bool>false</bool>
|
|
||||||
</property>
|
|
||||||
<property name="toolTip">
|
|
||||||
<string><nobr>
|
|
||||||
Compression using Root. Available only for Gotthard in Expert Mode.
|
|
||||||
</nobr><br><nobr>
|
|
||||||
#r_compression#
|
|
||||||
</nobr></string>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>10GbE</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
<item row="3" column="0">
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
@ -559,6 +667,15 @@ Compression using Root. Available only for Gotthard in Expert Mode.
|
|||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Enable Rate Correction</p><p>#ratecorr#</p></body></html></string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Rate:</string>
|
<string>Rate:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -569,6 +686,15 @@ Compression using Root. Available only for Gotthard in Expert Mode.
|
|||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Default Dead Time for Rate Correction</p><p>#ratecorr#</p></body></html></string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Default Dead Time</string>
|
<string>Default Dead Time</string>
|
||||||
</property>
|
</property>
|
||||||
@ -584,7 +710,7 @@ Compression using Root. Available only for Gotthard in Expert Mode.
|
|||||||
</property>
|
</property>
|
||||||
<property name="sizeHint" stdset="0">
|
<property name="sizeHint" stdset="0">
|
||||||
<size>
|
<size>
|
||||||
<width>10</width>
|
<width>20</width>
|
||||||
<height>20</height>
|
<height>20</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -595,6 +721,15 @@ Compression using Root. Available only for Gotthard in Expert Mode.
|
|||||||
<property name="enabled">
|
<property name="enabled">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Custom Dead Time for Rate Correction</p><p>#ratecorr#</p></body></html></string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Custom Dead Time:</string>
|
<string>Custom Dead Time:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -617,6 +752,21 @@ Compression using Root. Available only for Gotthard in Expert Mode.
|
|||||||
<height>25</height>
|
<height>25</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>25</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string><html><head/><body><p>Custom Dead Time for Rate Correction</p><p>#ratecorr#</p></body></html></string>
|
||||||
|
</property>
|
||||||
<property name="keyboardTracking">
|
<property name="keyboardTracking">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</property>
|
</property>
|
||||||
@ -652,6 +802,19 @@ Compression using Root. Available only for Gotthard in Expert Mode.
|
|||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="5" column="0">
|
||||||
|
<spacer name="verticalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -663,6 +826,13 @@ Compression using Root. Available only for Gotthard in Expert Mode.
|
|||||||
<tabstop>btnOutputBrowse</tabstop>
|
<tabstop>btnOutputBrowse</tabstop>
|
||||||
<tabstop>comboFileFormat</tabstop>
|
<tabstop>comboFileFormat</tabstop>
|
||||||
<tabstop>chkOverwriteEnable</tabstop>
|
<tabstop>chkOverwriteEnable</tabstop>
|
||||||
|
<tabstop>chkParallel</tabstop>
|
||||||
|
<tabstop>comboClkDivider</tabstop>
|
||||||
|
<tabstop>chkRate</tabstop>
|
||||||
|
<tabstop>radioDefaultDeadtime</tabstop>
|
||||||
|
<tabstop>radioCustomDeadtime</tabstop>
|
||||||
|
<tabstop>spinCustomDeadTime</tabstop>
|
||||||
|
<tabstop>chkTenGiga</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../include/icons.qrc"/>
|
<include location="../include/icons.qrc"/>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -6,8 +6,8 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>775</width>
|
<width>740</width>
|
||||||
<height>345</height>
|
<height>320</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@ -24,40 +24,140 @@
|
|||||||
</property>
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>775</width>
|
<width>740</width>
|
||||||
<height>400</height>
|
<height>330</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="1" column="0" colspan="3">
|
<property name="leftMargin">
|
||||||
|
<number>9</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="verticalSpacing">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item row="1" column="0" colspan="5">
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
|
||||||
<horstretch>5</horstretch>
|
<horstretch>5</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>330</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tabDAC">
|
<widget class="QWidget" name="tabDAC">
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>330</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>DACs</string>
|
<string>DACs</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridlayoutDac"/>
|
<layout class="QGridLayout" name="gridlayoutDac">
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
<property name="horizontalSpacing">
|
||||||
|
<number>10</number>
|
||||||
|
</property>
|
||||||
|
<property name="verticalSpacing">
|
||||||
|
<number>2</number>
|
||||||
|
</property>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="tabADC">
|
<widget class="QWidget" name="tabADC">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
<string>ADCs</string>
|
<string>ADCs</string>
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QGridLayout" name="gridlayoutAdc"/>
|
<layout class="QGridLayout" name="gridlayoutAdc">
|
||||||
|
<property name="horizontalSpacing">
|
||||||
|
<number>10</number>
|
||||||
|
</property>
|
||||||
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="0" column="0" colspan="2">
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>QSizePolicy::Fixed</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>350</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="2">
|
||||||
|
<widget class="QLabel" name="lblReadout">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Readout: </string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="3" colspan="2">
|
||||||
<widget class="QComboBox" name="comboDetector">
|
<widget class="QComboBox" name="comboDetector">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||||
@ -68,42 +168,32 @@
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
<height>28</height>
|
<height>25</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
<property name="maximumSize">
|
||||||
</item>
|
|
||||||
<item row="0" column="2">
|
|
||||||
<spacer name="horizontalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>QSizePolicy::Fixed</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
<size>
|
||||||
<width>500</width>
|
<width>16777215</width>
|
||||||
<height>20</height>
|
<height>25</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
<property name="font">
|
||||||
</item>
|
<font>
|
||||||
<item row="0" column="0">
|
<family>Cantarell</family>
|
||||||
<widget class="QLabel" name="lblReadout">
|
<pointsize>10</pointsize>
|
||||||
<property name="sizePolicy">
|
</font>
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="toolTip">
|
||||||
<string>Readout: </string>
|
<string>Select readout to read dac or adc info</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<tabstops>
|
||||||
|
<tabstop>comboDetector</tabstop>
|
||||||
|
<tabstop>tabWidget</tabstop>
|
||||||
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../include/icons.qrc"/>
|
<include location="../include/icons.qrc"/>
|
||||||
</resources>
|
</resources>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -28,12 +28,24 @@
|
|||||||
<height>345</height>
|
<height>345</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Form</string>
|
<string>Form</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="1" column="1" colspan="3">
|
<item row="1" column="1" colspan="3">
|
||||||
<widget class="QTextEdit" name="dispLog">
|
<widget class="QTextEdit" name="dispLog">
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="focusPolicy">
|
<property name="focusPolicy">
|
||||||
<enum>Qt::NoFocus</enum>
|
<enum>Qt::NoFocus</enum>
|
||||||
</property>
|
</property>
|
||||||
@ -47,11 +59,23 @@
|
|||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>0</width>
|
<width>0</width>
|
||||||
<height>25</height>
|
<height>26</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="maximumSize">
|
||||||
|
<size>
|
||||||
|
<width>16777215</width>
|
||||||
|
<height>28</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="toolTip">
|
<property name="toolTip">
|
||||||
<string><html><head/><body><p>Up arrow key picks up the previous command.</p><p>Down arrow key clears the current command.</p><p>Return or Enter key executes the current command</p></body></html></string>
|
<string><html><head/><body><p><img src=":/icons/images/upload.png"/> = previous command</p><p><img src=":/icons/images/download.png"/> = clears current command</p><p>[Return or Enter key] = executes current command</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
@ -63,12 +87,27 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>35</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>16777215</width>
|
||||||
<height>35</height>
|
<height>35</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Clear log</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Clear</string>
|
<string>Clear</string>
|
||||||
</property>
|
</property>
|
||||||
@ -86,12 +125,27 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>35</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>16777215</width>
|
<width>16777215</width>
|
||||||
<height>35</height>
|
<height>35</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Save log</string>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Save</string>
|
<string>Save</string>
|
||||||
</property>
|
</property>
|
||||||
@ -109,6 +163,12 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="font">
|
||||||
|
<font>
|
||||||
|
<family>Cantarell</family>
|
||||||
|
<pointsize>10</pointsize>
|
||||||
|
</font>
|
||||||
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Command:</string>
|
<string>Command:</string>
|
||||||
</property>
|
</property>
|
||||||
@ -130,9 +190,9 @@
|
|||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>dispCommand</tabstop>
|
|
||||||
<tabstop>btnClear</tabstop>
|
|
||||||
<tabstop>btnSave</tabstop>
|
<tabstop>btnSave</tabstop>
|
||||||
|
<tabstop>btnClear</tabstop>
|
||||||
|
<tabstop>dispCommand</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources>
|
<resources>
|
||||||
<include location="../include/icons.qrc"/>
|
<include location="../include/icons.qrc"/>
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -41,7 +41,10 @@ class qDefs : public QWidget {
|
|||||||
*/
|
*/
|
||||||
qDefs(){};
|
qDefs(){};
|
||||||
|
|
||||||
static const int Q_FONT_SIZE = 9;
|
static QFont GetDefaultFont() {
|
||||||
|
return QFont("Cantarell", 10, QFont::Normal);
|
||||||
|
}
|
||||||
|
|
||||||
static const int DATA_GAIN_PLOT_RATIO = 5;
|
static const int DATA_GAIN_PLOT_RATIO = 5;
|
||||||
static const int MIN_HEIGHT_GAIN_PLOT_1D = 75;
|
static const int MIN_HEIGHT_GAIN_PLOT_1D = 75;
|
||||||
static const int GUI_ZMQ_RCV_HWM = 2;
|
static const int GUI_ZMQ_RCV_HWM = 2;
|
||||||
|
@ -4,9 +4,6 @@
|
|||||||
#include "qDefs.h"
|
#include "qDefs.h"
|
||||||
#include "sls/Detector.h"
|
#include "sls/Detector.h"
|
||||||
#include "ui_form_detectormain.h"
|
#include "ui_form_detectormain.h"
|
||||||
#include <QTabWidget>
|
|
||||||
|
|
||||||
class QScrollArea;
|
|
||||||
class QResizeEvent;
|
class QResizeEvent;
|
||||||
|
|
||||||
namespace sls {
|
namespace sls {
|
||||||
@ -21,15 +18,6 @@ class qTabDebugging;
|
|||||||
class qTabDeveloper;
|
class qTabDeveloper;
|
||||||
class qTabMessages;
|
class qTabMessages;
|
||||||
|
|
||||||
/** To Over-ride the QTabWidget class to get the tabBar protected
|
|
||||||
* methodTabWidget */
|
|
||||||
class MyTabWidget : public QTabWidget {
|
|
||||||
public:
|
|
||||||
MyTabWidget(QWidget *parent = 0) { setParent(parent); }
|
|
||||||
/** Overridden protected method from QTabWidget */
|
|
||||||
QTabBar *tabBar() { return QTabWidget::tabBar(); }
|
|
||||||
};
|
|
||||||
|
|
||||||
class qDetectorMain : public QMainWindow, private Ui::DetectorMainObject {
|
class qDetectorMain : public QMainWindow, private Ui::DetectorMainObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@ -75,8 +63,6 @@ class qDetectorMain : public QMainWindow, private Ui::DetectorMainObject {
|
|||||||
slsDetectorDefs::detectorType detType;
|
slsDetectorDefs::detectorType detType;
|
||||||
std::unique_ptr<Detector> det;
|
std::unique_ptr<Detector> det;
|
||||||
qDrawPlot *plot;
|
qDrawPlot *plot;
|
||||||
MyTabWidget *tabs;
|
|
||||||
QScrollArea *scroll[NumberOfTabs];
|
|
||||||
qTabMeasurement *tabMeasurement;
|
qTabMeasurement *tabMeasurement;
|
||||||
qTabDataOutput *tabDataOutput;
|
qTabDataOutput *tabDataOutput;
|
||||||
qTabPlot *tabPlot;
|
qTabPlot *tabPlot;
|
||||||
@ -85,9 +71,7 @@ class qDetectorMain : public QMainWindow, private Ui::DetectorMainObject {
|
|||||||
qTabDebugging *tabDebugging;
|
qTabDebugging *tabDebugging;
|
||||||
qTabDeveloper *tabDeveloper;
|
qTabDeveloper *tabDeveloper;
|
||||||
qTabMessages *tabMessages;
|
qTabMessages *tabMessages;
|
||||||
int isDeveloper;
|
int isDeveloper{false};
|
||||||
int heightPlotWindow;
|
|
||||||
int heightCentralWidget;
|
|
||||||
QString zoomToolTip;
|
QString zoomToolTip;
|
||||||
QColor defaultTabColor;
|
QColor defaultTabColor;
|
||||||
};
|
};
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user