Commit fa88d920 authored by Emmanuel Papillon's avatar Emmanuel Papillon
Browse files

added threshold_energy2 and threshold_diff_mode

remove high_voltage_measured / high_voltage_target not working
(these values are internal dectris params which are not supposed
 to be kept in next releases)
parent 56e707dd
Pipeline #41565 failed with stages
in 6 minutes and 48 seconds
......@@ -123,8 +123,6 @@ class LIBEIGER Camera : public HwMaxImageSizeCallbackGen, public EventCallbackGe
void getTemperature(double&);
void getHumidity(double&);
void getHighVoltageState(std::string&);
void getHighVoltageMeasured(double&);
void getHighVoltageTarget(double&);
void resetHighVoltage();
void setCountrateCorrection(bool);
......@@ -141,6 +139,10 @@ class LIBEIGER Camera : public HwMaxImageSizeCallbackGen, public EventCallbackGe
void getPixelMask(bool&);
void setThresholdEnergy(double);
void getThresholdEnergy(double&);
void setThresholdEnergy2(double);
void getThresholdEnergy2(double&);
void setThresholdDiffMode(bool);
void getThresholdDiffMode(bool&);
void setVirtualPixelCorrection(bool);
void getVirtualPixelCorrection(bool&);
void setPhotonEnergy(double);
......
......@@ -141,8 +141,6 @@ namespace eigerapi
enum PARAM_NAME {TEMP,
HUMIDITY,
HVSTATE,
HVMEASURED,
HVTARGET,
DETECTOR_STATUS,
PIXELDEPTH,
X_PIXEL_SIZE,
......@@ -163,6 +161,9 @@ namespace eigerapi
RETRIGGER,
PIXEL_MASK,
THRESHOLD_ENERGY,
THRESHOLD_ENERGY2,
THRESHOLD_MODE2,
THRESHOLD_DIFF_MODE,
VIRTUAL_PIXEL_CORRECTION,
PHOTON_ENERGY,
NIMAGES,
......
......@@ -40,8 +40,6 @@ typedef Requests::CurlReq CurlReq;
static const char* CSTR_EIGERCONFIG = "config";
static const char* CSTR_EIGERSTATUS = "status";
static const char* CSTR_EIGERSTATUS_BOARD = "status/board_000";
static const char* CSTR_EIGERSTATUS_HV = "status/high_voltage";
static const char* CSTR_EIGERCOMMAND = "command";
static const char* CSTR_EIGERFILES = "files";
static const char* CSTR_SUBSYSTEMFILEWRITER = "filewriter";
......@@ -105,11 +103,9 @@ struct ParamIndex
ParamIndex ParamDescription[] = {
// Detector Read only values
{Requests::TEMP, {"th0_temp",CSTR_SUBSYSTEMDETECTOR,CSTR_EIGERSTATUS_BOARD}},
{Requests::HUMIDITY, {"th0_humidity",CSTR_SUBSYSTEMDETECTOR,CSTR_EIGERSTATUS_BOARD}},
{Requests::HVSTATE, {"state",CSTR_SUBSYSTEMDETECTOR,CSTR_EIGERSTATUS_HV}},
{Requests::HVMEASURED, {"measured",CSTR_SUBSYSTEMDETECTOR,CSTR_EIGERSTATUS_HV}},
{Requests::HVTARGET, {"target",CSTR_SUBSYSTEMDETECTOR,CSTR_EIGERSTATUS_HV}},
{Requests::TEMP, {"board_000/th0_temp",CSTR_SUBSYSTEMDETECTOR,CSTR_EIGERSTATUS}},
{Requests::HUMIDITY, {"board_000/th0_humidity",CSTR_SUBSYSTEMDETECTOR,CSTR_EIGERSTATUS}},
{Requests::HVSTATE, {"high_voltage/state",CSTR_SUBSYSTEMDETECTOR,CSTR_EIGERSTATUS}},
{Requests::DETECTOR_STATUS, {"state",CSTR_SUBSYSTEMDETECTOR,CSTR_EIGERSTATUS}},
{Requests::PIXELDEPTH, {"bit_depth_readout"}},
{Requests::X_PIXEL_SIZE, {"x_pixel_size"}},
......@@ -131,6 +127,9 @@ ParamIndex ParamDescription[] = {
{Requests::EFFICIENCY_CORRECTION, {"efficiency_correction_applied"}},
{Requests::PIXEL_MASK, {"pixel_mask_applied"}},
{Requests::THRESHOLD_ENERGY, {"threshold_energy"}},
{Requests::THRESHOLD_ENERGY2, {"threshold/2/energy"}},
{Requests::THRESHOLD_MODE2, {"threshold/2/mode"}},
{Requests::THRESHOLD_DIFF_MODE, {"threshold/difference/mode"}},
{Requests::VIRTUAL_PIXEL_CORRECTION, {"virtual_pixel_correction_applied"}},
{Requests::PHOTON_ENERGY, {"photon_energy"}},
{Requests::NIMAGES, {"nimages"}},
......
......@@ -82,8 +82,6 @@ namespace Eiger
void getTemperature(double& /Out/);
void getHumidity(double& /Out/);
void getHighVoltageState(std::string& /Out/);
void getHighVoltageMeasured(double& /Out/);
void getHighVoltageTarget(double& /Out/);
void resetHighVoltage();
void setCountrateCorrection(const bool);
......@@ -100,6 +98,10 @@ namespace Eiger
void getPixelMask(bool& /Out/);
void setThresholdEnergy(const double);
void getThresholdEnergy(double& /Out/);
void setThresholdEnergy2(const double);
void getThresholdEnergy2(double& /Out/);
void setThresholdDiffMode(const bool);
void getThresholdDiffMode(bool& /Out/);
void setVirtualPixelCorrection(const bool);
void getVirtualPixelCorrection(bool& /Out/);
void setPhotonEnergy(const double);
......
......@@ -868,17 +868,6 @@ void Camera::resetHighVoltage()
DEB_TRACE() << "reset HighVoltage";
}
void Camera::getHighVoltageMeasured(double &hvmeas)
{
DEB_MEMBER_FUNCT();
getParam(Requests::HVMEASURED, hvmeas);
}
void Camera::getHighVoltageTarget(double &hvtarget)
{
DEB_MEMBER_FUNCT();
getParam(Requests::HVTARGET, hvtarget);
}
//-----------------------------------------------------------------------------
/// Count rate correction setter
//-----------------------------------------------------------------------------
......@@ -1012,7 +1001,7 @@ void Camera::getEfficiencyCorrection(bool& value) ///< [out] true:enabled, fals
//-----------------------------------------------------------------------------
/// ThresholdEnergy setter
//-----------------------------------------------------------------------------
void Camera::setThresholdEnergy(double value) ///< [in] true:enabled, false:disabled
void Camera::setThresholdEnergy(double value)
{
DEB_MEMBER_FUNCT();
setParam(Requests::THRESHOLD_ENERGY,value);
......@@ -1022,13 +1011,68 @@ void Camera::setThresholdEnergy(double value) ///< [in] true:enabled, false:disa
//-----------------------------------------------------------------------------
/// ThresholdEnergy getter
//-----------------------------------------------------------------------------
void Camera::getThresholdEnergy(double& value) ///< [out] true:enabled, false:disabled
void Camera::getThresholdEnergy(double& value)
{
DEB_MEMBER_FUNCT();
getParam(Requests::THRESHOLD_ENERGY,value);
}
//-----------------------------------------------------------------------------
/// ThresholdEnergy2 setter
//-----------------------------------------------------------------------------
void Camera::setThresholdEnergy2(double value)
{
DEB_MEMBER_FUNCT();
setParam(Requests::THRESHOLD_ENERGY2,value);
}
//-----------------------------------------------------------------------------
/// ThresholdEnergy getter
//-----------------------------------------------------------------------------
void Camera::getThresholdEnergy2(double& value)
{
DEB_MEMBER_FUNCT();
getParam(Requests::THRESHOLD_ENERGY2,value);
}
//-----------------------------------------------------------------------------
/// ThresholdEnergy2 setter
//-----------------------------------------------------------------------------
void Camera::setThresholdDiffMode(bool value)
{
DEB_MEMBER_FUNCT();
if (value) {
setParam(Requests::THRESHOLD_MODE2,"enabled");
setParam(Requests::THRESHOLD_DIFF_MODE,"enabled");
} else {
setParam(Requests::THRESHOLD_DIFF_MODE,"disabled");
setParam(Requests::THRESHOLD_MODE2,"disabled");
}
}
//-----------------------------------------------------------------------------
/// ThresholdEnergy2 setter
//-----------------------------------------------------------------------------
void Camera::getThresholdDiffMode(bool& value)
{
DEB_MEMBER_FUNCT();
std::string mode_str;
getParam(Requests::THRESHOLD_DIFF_MODE,mode_str);
if (mode_str == "enabled") {
value = true;
} else {
value = false;
}
}
//-----------------------------------------------------------------------------
/// VirtualPixelCorrection setter
//-----------------------------------------------------------------------------
......
......@@ -33,7 +33,7 @@
#include "lima/Exceptions.h"
#include "EigerStream.h"
#define _BSD_SOURCE
//#define _BSD_SOURCE
#include <endian.h>
using namespace lima;
......
......@@ -85,6 +85,8 @@ class Eiger(PyTango.Device_4Impl):
'OFF':False}
self.__PixelMask = {'ON':True,
'OFF':False}
self.__ThresholdDiffMode = {'ON':True,
'OFF':False}
self.__CompressionType = {'NONE': EigerAcq.Camera.NoCompression,
'LZ4': EigerAcq.Camera.LZ4,
'BSLZ4': EigerAcq.Camera.BSLZ4}
......@@ -254,14 +256,6 @@ class EigerClass(PyTango.DeviceClass):
[[PyTango.DevString,
PyTango.SCALAR,
PyTango.READ]],
'high_voltage_measured':
[[PyTango.DevFloat,
PyTango.SCALAR,
PyTango.READ]],
'high_voltage_target':
[[PyTango.DevFloat,
PyTango.SCALAR,
PyTango.READ]],
'countrate_correction':
[[PyTango.DevString,
PyTango.SCALAR,
......@@ -298,6 +292,14 @@ class EigerClass(PyTango.DeviceClass):
[[PyTango.DevFloat,
PyTango.SCALAR,
PyTango.READ_WRITE]],
'threshold_energy2':
[[PyTango.DevFloat,
PyTango.SCALAR,
PyTango.READ_WRITE]],
'threshold_diff_mode':
[[PyTango.DevString,
PyTango.SCALAR,
PyTango.READ_WRITE]],
'photon_energy':
[[PyTango.DevFloat,
PyTango.SCALAR,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment