.

Average: 0
Rating Count: 0

Development status: New development
Information status: New
Repository: http://svn.code.sf.net/p/tango-ds/code/DeviceClasses/BeamDiagnostics/BPMOrbitDD
Contact:



Class Description


BPMOrbitDD Class Description:

This device server will be used to get data from or run basic commands (without parameters) in a list of BPMLibera devices and select the interesting information for the user.

Families: BeamDiagnostics

Key words:

Platform: All Platforms

Language: Python

License:

Contact:

Class interface


Attributes:

Name Description
XDiffTurnsSpectrum: DevDouble
SumSpectrum: DevDouble
SumMeanScalar: DevDouble
BPMsSpectrum: DevString
BPMsDescriptionSpectrum: DevString
LastTurnScalar: DevLong
XDiffSpectrum: DevDouble
ZDiffTurnsSpectrum: DevDouble
ZDiffSpectrum: DevDouble
EfficiencyLTScalar: DevDouble
EfficiencyLIScalar: DevDouble
XMeanScalar: DevDouble
ZMeanScalar: DevDouble
SumDiffSpectrum: DevDouble
BPMsMinBufferSizeScalar: DevLong
XSpectrum: DevDouble
SumRefSpectrum: DevDouble
ZSpectrum: DevDouble
XRefSpectrum: DevDouble
FirstTurnScalar: DevLong
ZRefSpectrum: DevDouble
SumDiffTurnsSpectrum: DevDouble

Commands:

Name Description
ReadDDBuffersInput: DevVoid
Output: DevVoid
UnfreezeDDBufferInput: DevVoid
Output: DevVoid
SaveSumAsRefInput: DevVoid
Output: DevVoid
SaveZasRefInput: DevVoid
Output: DevVoid
SaveXasRefInput: DevVoid
Output: DevVoid
StartInput: DevVoid
Output: DevVoid
SetupDDBufferFreezingInput: DevVoid
Output: DevVoid
CheckTriggerReceivedInput: DevVoid
Output: DevBoolean
Returns True if trigger detected on all the BPMs, False otherwise
RunCommandInput: DevString
Command to be run in all the bpms
Output: DevVarStringArray
Result of the command for each bpm
StopInput: DevVoid
Output: DevVoid

Pipes:

Properties:

Name Description
XRefDoubleArrayType Horizontal reference orbit
ZRefDoubleArrayType Vertical reference orbit
LocationDevString System to treat (LT,BO,BT,SR)
SumRefDoubleArrayType Sum orbit reference
BPMsDescriptionStringArrayType List of user's descriptive names for the BPMLibera devices from which to get the data from
BPMsStringArrayType List of BPMLibera devices from which to get the data from


Please log in to comment.

README

b'No official doc, sorry. Waiting for POGO 7. As a temporal reference:\n\n################################################################################\n# Description\n################################################################################\nThis device is used for computing the values of the position attributes using the DD (Data on demand) buffers read from all the BPMs. The computation is different depending on if we are treating a ring (BO, SR) or a transfer line (LT, BT):\n\n- BO/SR. In this case. The BPMs in this case are considered as a source of arrays of positions of different turns of the beam. Each point of the "position", "position diff", "position mean" attributes are computed as the mean of the corresponding bpm attributes XPossDD, ZPossDD and SumDD between positions FirsTurn and LastTurn. The "difference between turns" attributes are computed as the difference between the values in FirstTurn and LastTurn indexes of the corresponding bpm attribute.\n\n- LT/BT. In this case, the computation is very different. The BPMs in this case just get a bunch of electrons in every trigger, so can\'t be seen as a source of position arrays of different turns. In a transfer line the turns concept doesn\'t exist, so FirsTurn and LastTurn have no meaning in this case. Hence "difference between turns" attributes have no sense. Instead of position arrays attributes of the BPMs, what we use from them is their voltages attributes (Va, Vb, Vc, Vd) to compute our "position", "position diff" and "position mean" attributes. This is done for each point of the array by finding the peak value of the voltages and sum attributes of the corresponding BPM and applying this formula:\n\n peak_pos_x = ((((VaPeak + VdPeak) - (VbPeak + VcPeak)) / SumVPeak) * Kx) + XOffset\n peak_pos_z = ((((VaPeak + VbPeak) - (VcPeak + VdPeak)) / SumVPeak) * Kz) + ZOffset\n\n where SumVPeak = VaPeak + VbPeak + VcPeak + VdPeak and\n Kx, Kz, XOffset and ZOffset are values defined for the corresponding BPM that is being treated. These are got from the corresponding BPMLibera device and may need customization to fit your needs.\n\n\n################################################################################\n# IMPORTANT NOTES\n################################################################################\n- The device can work in two different modes:\n\n 1) "Single mode". In this mode, we use the DDBufferFreezing feature of the BPMLibera device server to capture a single trigger on all the liberas and be sure that all the data on all the BPMs correspond to the same trigger. This can be done by setting DDBufferFreezing in all the BPMs, then user fires a trigger, then we read and update all the attributes. To do this:\n - SetupDDBufferFreezing()\n - UnfreezeDDBuffer()\n - Ask user to trigger your lt/bo/bt/sr\n - CheckTriggerReceived() if you want to be completely sure that 1 and only 1 trigger has been received by each libera\n - ReadDDBuffers()\n\n 2) "Continuous mode". In this mode, the device tries to read all the DD buffers from all the BPMs as soon as possible and compute all the attributes. Depending on the trigger frequency, this may or may not be possible. In any case, this is done in a "best effort" basis and there are no guarantees at all that the data used from each BPM corresponds to the same turn. To enter this mode, simply make sure DDBufferFreezing is disabled (RunCommand("DisableDDBufferFreezing")) and run command Start().\n\n- Polling DDTriggerCounter. In case you use "Continuous mode", it is very important to know how the device realizes that new data are available. This is done by polling the DDTriggerCounter attribute of the first libera in the BPMs list and tell it to fire an event when a new trigger is got. This can be done both programatically or using jive. The device tries to configure this itself when you start it, but not always succeeds, so if you see that no data is been is update in X, Z, ... attributes at all, check using jive that the DDTriggerCounter attribute is been polled and firing events.\n\n- Kx, Kz, XOffset and ZOffset are values defined for the corresponding BPM that is being treated. These are got from the corresponding BPMLibera device and may need customization to fit your needs.\n\n\n################################################################################\n# PROPERTIES\n################################################################################\n\n- BPMs: List of BPMLibera devices from which to get the data from\n- BPMsDescription: List of user\'s descriptive names for the BPMLibera devices from which to get the data from\n- Location: System to treat (LT,BO,BT,SR)\n- XRef: Horizontal reference orbit\n- ZRef: Vertical reference orbit\n- SumRef: Sum orbit reference\n\n\n################################################################################\n# COMMANDS\n################################################################################\n- SetupDDBufferFreezing: This command will setup all BPMs for DD acquisition with buffer freezing enabled\n- UnfreezeDDBuffer: This command will unfreeze all the BPMs DD buffer and save the current trigger counter of all them for later checking if a trigger has been received\n- CheckTriggerReceived: This command will check that one and only one trigger has been received in all the BPMs since they were configured to freeze the DD Buffer using SetupDDBufferFreezing() command\n- ReadDDBuffers: Gets DD data from all the BPMs and computes the necessary statistics\n- Start: Starts an endless loop to acquire as fast as possible the position attributes from the BPMs\n- Stop: Description: Stop the continuous acquisition started with the Acquire command (if it is running)\n- RunCommand: Runs a command (needs to be a parameterless command) in all the BPMs\n- SaveXasRef: Saves current X value as reference value\n- SaveZasRef: Saves current Z value as reference value\n- SaveSumasRef: Saves current Sum value as reference value\n\n\n################################################################################\n# ATTRIBUTES\n################################################################################\n- BPMs: List of BPMLibera devices from which to get the data from\n- BPMsDescription: List of user\'s descriptive names for the BPMLibera devices from which to get the data from\n- BPMsMinBufferSize: Minimum DDBufferSize on all BPMs\n- FirstTurn: First turn\n- LastTurn: Last turn\n- X: The meaning is different if we\'re treating a transfer line (LT/BT) or a ring (BO/SR). See Description for more info.\n- Z: The meaning is different if we\'re treating a transfer line (LT/BT) or a ring (BO/SR). See Description for more info.\n- Sum: The meaning is different if we\'re treating a transfer line (LT/BT) or a ring (BO/SR). See Description for more info.\n- XDiff: The meaning is different if we\'re treating a transfer line (LT/BT) or a ring (BO/SR). See Description for more info.\n- ZDiff: The meaning is different if we\'re treating a transfer line (LT/BT) or a ring (BO/SR). See Description for more info.\n- sumDiff: The meaning is different if we\'re treating a transfer line (LT/BT) or a ring (BO/SR). See Description for more info.\n- XRef: Horizontal reference orbit\n- ZRef: Vertical reference orbit\n- SumRef: Sum orbit reference\n- XDiffTurns: The meaning is different if we\'re treating a transfer line (LT/BT) or a ring (BO/SR). See Description for more info.\n- ZDiffTurns: The meaning is different if we\'re treating a transfer line (LT/BT) or a ring (BO/SR). See Description for more info.\n- SumDiffTurns: The meaning is different if we\'re treating a transfer line (LT/BT) or a ring (BO/SR). See Description for more info.\n- XMean: The meaning is different if we\'re treating a transfer line (LT/BT) or a ring (BO/SR). See Description for more info.\n- ZMean: The meaning is different if we\'re treating a transfer line (LT/BT) or a ring (BO/SR). See Description for more info.\n- SumMean: The meaning is different if we\'re treating a transfer line (LT/BT) or a ring (BO/SR). See Description for more info.\n- EfficiencyLI: It has only meaning if the location is LT. It is computed as (sum_peak_of_last_lt_bpm / sum_peak_of_linac_bpm) * 100\n- EfficiencyLT: It has only meaning if the location is LT. It is computed as (sum_peak_of_first_bo_bpm / sum_peak_of_last_lt_bpm) * 100\n'

16 Jan 2018, DS Admin
Created:
The device class has been added to catalogue.
Added by:dadmin on:16 Jan 2018, 1:17 p.m.