This commit is contained in:
maliakal_d 2020-09-23 14:58:25 +02:00
parent 79a03c6c92
commit b23410bc5e
3 changed files with 43 additions and 22 deletions

View File

@ -2172,8 +2172,8 @@ class Detector(CppDetectorApi):
@property @property
def vetofile(self): def vetofile(self):
""" """
[Gotthard2] Set veto reference for each 128 channels for specific chip. [Gotthard2] Set veto reference for each 128 channels for specific chip. \n
The file should have 128 rows of gain index and 12 bit value in dec The file should have 128 rows of gain index and 12 bit value in dec.
Example Example
--------- ---------
@ -2198,6 +2198,16 @@ class Detector(CppDetectorApi):
@property @property
def vetophoton(self): def vetophoton(self):
"""
[Gotthard2] Set veto reference for 128 channels for chip ichip according to reference file
and #photons and energy in keV.
Note
----
Arguments: (chip_index, n_photons, photon_energy, fname)
:getter: Not Implemented
Example
-------
>>> d.vetophoton = (2, 24, 2560, '/tmp/bla.txt')
raise NotImplementedError('vetofile is set only') raise NotImplementedError('vetofile is set only')
@vetophoton.setter @vetophoton.setter
@ -2776,7 +2786,7 @@ class Detector(CppDetectorApi):
@property @property
@element @element
def v_b(self): def v_b(self):
"""[Ctb] Voltage supply a in mV.""" """[Ctb] Voltage supply b in mV."""
return self.getDAC(dacIndex.V_POWER_B, True) return self.getDAC(dacIndex.V_POWER_B, True)
@v_b.setter @v_b.setter
@ -2786,7 +2796,7 @@ class Detector(CppDetectorApi):
@property @property
@element @element
def v_c(self): def v_c(self):
"""[Ctb] Voltage supply a in mV.""" """[Ctb] Voltage supply c in mV."""
return self.getDAC(dacIndex.V_POWER_C, True) return self.getDAC(dacIndex.V_POWER_C, True)
@v_c.setter @v_c.setter
@ -2796,7 +2806,7 @@ class Detector(CppDetectorApi):
@property @property
@element @element
def v_d(self): def v_d(self):
"""[Ctb] Voltage supply a in mV.""" """[Ctb] Voltage supply d in mV."""
return self.getDAC(dacIndex.V_POWER_D, True) return self.getDAC(dacIndex.V_POWER_D, True)
@v_d.setter @v_d.setter
@ -2806,7 +2816,11 @@ class Detector(CppDetectorApi):
@property @property
@element @element
def v_io(self): def v_io(self):
"""[Ctb] Voltage supply a in mV.""" """[Ctb] Voltage supply io in mV. Minimum 1200 mV.
Note
----
Must be the first power regulator to be set after fpga reset (on-board detector server start up).
"""
return self.getDAC(dacIndex.V_POWER_IO, True) return self.getDAC(dacIndex.V_POWER_IO, True)
@v_io.setter @v_io.setter

View File

@ -598,8 +598,14 @@ class Detector {
* calculated (incremented by 1 if no 2nd interface)*/ * calculated (incremented by 1 if no 2nd interface)*/
void setDestinationUDPPort2(int port, int module_id = -1); void setDestinationUDPPort2(int port, int module_id = -1);
/** Reconfigures Detector with UDP destination. More for debugging as the
* configuration is done automatically when the detector has sufficient UDP
* details. */
void reconfigureUDPDestination(Positions pos = {}); void reconfigureUDPDestination(Positions pos = {});
/** Validates that UDP configuration in the detector is valid. If not
* configured, it will throw with error message requesting missing udp
* information */
void validateUDPConfiguration(Positions pos = {}); void validateUDPConfiguration(Positions pos = {});
Result<std::string> printRxConfiguration(Positions pos = {}) const; Result<std::string> printRxConfiguration(Positions pos = {}) const;
@ -1155,7 +1161,8 @@ class Detector {
void setVetoReference(const int gainIndex, const int value, void setVetoReference(const int gainIndex, const int value,
Positions pos = {}); Positions pos = {});
/** [Gotthard2] gain indices and adu values for each channel */ /** [Gotthard2] Set veto reference for each 128 channels for specific chip.
* The file should have 128 rows of gain index and 12 bit value in dec"*/
void setVetoFile(const int chipIndex, const std::string &fname, void setVetoFile(const int chipIndex, const std::string &fname,
Positions pos = {}); Positions pos = {});
@ -1549,15 +1556,12 @@ class Detector {
void rebootController(Positions pos = {}); void rebootController(Positions pos = {});
/** /**
* [Jungfrau][Gotthard][CTB][Moench] * Advanced user Function!\n [Jungfrau][Gotthard][CTB][Moench] Updates the
* Advanced user Function! \n * firmware, detector server and then reboots detector controller blackfin.
* Updates the firmware, detector server and then reboots detector * \n [Mythen3][Gotthard2] Will still have old server starting up as the new
* controller blackfin. \n * server is not respawned \n sname is name of detector server binary found
* [Mythen3][Gotthard2] Will still have old server starting up as the new * on tftp folder of host pc \n hostname is name of pc to tftp from \n fname
* server is not respawned \n * is programming file name
sname is name of detector server binary found on
* tftp folder of host pc hostname is name of pc to tftp from fname is
* programming file name
*/ */
void updateFirmwareAndServer(const std::string &sname, void updateFirmwareAndServer(const std::string &sname,
const std::string &hostname, const std::string &hostname,

View File

@ -1639,9 +1639,8 @@ std::string CmdProxy::VetoPhoton(int action) {
os << "[ichip] [#photons] [energy in keV] [reference " os << "[ichip] [#photons] [energy in keV] [reference "
"file]\n\t[Gotthard2] Set veto reference for 128 channels for " "file]\n\t[Gotthard2] Set veto reference for 128 channels for "
"chip ichip according to reference file and #photons and energy " "chip ichip according to reference file and #photons and energy "
"in keV.\n\t" "in keV.\n\t[ichip] [output file]\n\t Get gain indices and veto "
<< "[ichip] [output file]\n\t Get gain indices and veto reference " "reference for 128 channels for chip ichip, saved to file."
"for 128 channels for chip ichip, saved to file."
<< '\n'; << '\n';
} else if (action == defs::GET_ACTION) { } else if (action == defs::GET_ACTION) {
if (args.size() != 2) { if (args.size() != 2) {
@ -2476,9 +2475,13 @@ std::string CmdProxy::UpdateFirmwareAndDetectorServer(int action) {
os << cmd << ' '; os << cmd << ' ';
if (action == defs::HELP_ACTION) { if (action == defs::HELP_ACTION) {
os << "[server_name] [pc_host_name] " os << "[server_name] [pc_host_name] "
"[fname.pof]\n\t[Jungfrau][Ctb][Moench] " "[fname.pof]\n\t[Jungfrau][Gotthard][CTB][Moench] Updates the "
"Updates detector server via tftp from pc, updates firmware to " "firmware, detector server and then reboots detector controller "
"pof file and then reboots controller (blackfin)." "blackfin. \n\t[Mythen3][Gotthard2] Will still have old server "
"starting up as the new server is not respawned \n\tsname is "
"name of detector server binary found on tftp folder of host pc "
"\n\thostname is name of pc to tftp from \n\tfname is "
"programming file name"
<< '\n'; << '\n';
} else if (action == defs::GET_ACTION) { } else if (action == defs::GET_ACTION) {
throw sls::RuntimeError("Cannot get"); throw sls::RuntimeError("Cannot get");