Skip to content
Snippets Groups Projects
Commit 7111f3be authored by Jean-Luc Pons's avatar Jean-Luc Pons
Browse files

Added emittance attributes

parent 09c1dc15
No related branches found
No related tags found
No related merge requests found
......@@ -441,6 +441,54 @@
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="arr[0] = x, arr[1] = x`, arr[2] = z, arr[3] = z`. arr[4] = dp/p, arr[5] = ct" label="TbTInputCoordinates" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="Emittances_BPM_H" attType="Spectrum" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="320" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:DoubleType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="Emittances_BPM_V" attType="Spectrum" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="320" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:DoubleType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="Emittances_PinHoles_H" attType="Spectrum" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="5" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:DoubleType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="Emittances_PinHoles_V" attType="Spectrum" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="5" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:DoubleType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="S_bpms" attType="Spectrum" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="320" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:DoubleType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="S_pinholes" attType="Spectrum" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="5" maxY="" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:DoubleType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="" label="" unit="" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="HPositionsTbT" attType="Image" rwType="READ" displayLevel="OPERATOR" polledPeriod="0" maxX="5000" maxY="320" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:DoubleType"/>
<changeEvent fire="false" libCheckCriteria="false"/>
......
......@@ -382,6 +382,38 @@ class RingSimulator(Device):
doc="arr[0] = x, arr[1] = x`, arr[2] = z, arr[3] = z`. arr[4] = dp/p, arr[5] = ct",
)
Emittances_BPM_H = attribute(
dtype=('DevDouble',),
max_dim_x=320,
)
Emittances_BPM_V = attribute(
dtype=('DevDouble',),
max_dim_x=320,
)
Emittances_PinHoles_H = attribute(
dtype=('DevDouble',),
max_dim_x=5,
)
Emittances_PinHoles_V = attribute(
dtype=('DevDouble',),
max_dim_x=5,
)
S_bpms = attribute(
dtype=('DevDouble',),
access=AttrWriteType.READ_WRITE,
max_dim_x=320,
)
S_pinholes = attribute(
dtype=('DevDouble',),
access=AttrWriteType.READ_WRITE,
max_dim_x=5,
)
HPositionsTbT = attribute(
dtype=(('DevDouble',),),
max_dim_x=5000, max_dim_y=320,
......@@ -440,6 +472,12 @@ class RingSimulator(Device):
self.__eta_h = (0.0,)
self.__eta_v = (0.0,)
self.__tb_t__in_coord = (0.0,)
self.__emittances__bpm__h = np.zeros(RingSimulator.NB_BPM)
self.__emittances__bpm__v = np.zeros(RingSimulator.NB_BPM)
self.__emittances__pin_holes__h = np.zeros(RingSimulator.NB_PINHOLES)
self.__emittances__pin_holes__v = np.zeros(RingSimulator.NB_PINHOLES)
self._s_bpms = np.zeros(RingSimulator.NB_BPM)
self._s_pinholes = np.zeros(RingSimulator.NB_PINHOLES)
self._h_positions_tb_t = ((0.0,),)
self._v_positions_tb_t = ((0.0,),)
# PROTECTED REGION ID(RingSimulator.init_device) ENABLED START #
......@@ -791,6 +829,46 @@ class RingSimulator(Device):
self.__tb_t__in_coord = value
# PROTECTED REGION END # // RingSimulator.TbT_InCoord_write
def read_Emittances_BPM_H(self):
# PROTECTED REGION ID(RingSimulator.Emittances_BPM_H_read) ENABLED START #
"""Return the Emittances_BPM_H attribute."""
return self.__emittances__bpm__h
# PROTECTED REGION END # // RingSimulator.Emittances_BPM_H_read
def read_Emittances_BPM_V(self):
# PROTECTED REGION ID(RingSimulator.Emittances_BPM_V_read) ENABLED START #
"""Return the Emittances_BPM_V attribute."""
return self.__emittances__bpm__v
# PROTECTED REGION END # // RingSimulator.Emittances_BPM_V_read
def read_Emittances_PinHoles_H(self):
# PROTECTED REGION ID(RingSimulator.Emittances_PinHoles_H_read) ENABLED START #
"""Return the Emittances_PinHoles_H attribute."""
return self.__emittances__pin_holes__h
# PROTECTED REGION END # // RingSimulator.Emittances_PinHoles_H_read
def read_Emittances_PinHoles_V(self):
# PROTECTED REGION ID(RingSimulator.Emittances_PinHoles_V_read) ENABLED START #
"""Return the Emittances_PinHoles_V attribute."""
return self.__emittances__pin_holes__v
# PROTECTED REGION END # // RingSimulator.Emittances_PinHoles_V_read
def read_S_bpms(self):
# PROTECTED REGION ID(RingSimulator.S_bpms_read) ENABLED START #
"""Return the S_bpms attribute."""
return self._s_bpms
# PROTECTED REGION END # // RingSimulator.S_bpms_read
def write_S_bpms(self, value):
# PROTECTED REGION ID(RingSimulator.S_bpms_write) ENABLED START #
"""Set the S_bpms attribute."""
self._s_bpms = value
# PROTECTED REGION END # // RingSimulator.S_bpms_write
def read_S_pinholes(self):
# PROTECTED REGION ID(RingSimulator.S_pinholes_read) ENABLED START #
"""Return the S_pinholes attribute."""
return self._s_pinholes
# PROTECTED REGION END # // RingSimulator.S_pinholes_read
def write_S_pinholes(self, value):
# PROTECTED REGION ID(RingSimulator.S_pinholes_write) ENABLED START #
"""Set the S_pinholes attribute."""
self._s_pinholes = value
# PROTECTED REGION END # // RingSimulator.S_pinholes_write
def read_HPositionsTbT(self):
# PROTECTED REGION ID(RingSimulator.HPositionsTbT_read) ENABLED START #
"""Return the HPositionsTbT attribute."""
......@@ -1041,6 +1119,22 @@ class RingSimulator(Device):
end_ind = start_ind + RingSimulator.NB_BPM
self.__eta_v = argin[start_ind:end_ind]
start_ind = end_ind
end_ind = start_ind + RingSimulator.NB_BPM
self.__emittances__bpm__h = argin[start_ind:end_ind]
start_ind = end_ind
end_ind = start_ind + RingSimulator.NB_BPM
self.__emittances__bpm__v = argin[start_ind:end_ind]
start_ind = end_ind
end_ind = start_ind + RingSimulator.NB_PINHOLES
self.__emittances__pin_holes__h = argin[start_ind:end_ind]
start_ind = end_ind
end_ind = start_ind + RingSimulator.NB_PINHOLES
self.__emittances__pin_holes__v = argin[start_ind:end_ind]
start_ind = end_ind
for i in range(RingSimulator.NB_PINHOLES):
self.pinholes_data[i][3] = argin[start_ind]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment