Skip to content
Snippets Groups Projects
Commit d082e8da authored by Mauro Trovo's avatar Mauro Trovo :headphones:
Browse files

energy spread add

parent ec5bb8df
No related branches found
No related tags found
No related merge requests found
......@@ -492,7 +492,7 @@ class EEHGMaster(Device):
dtype='DevDouble',
access=AttrWriteType.READ_WRITE,
label="waist_s1",
unit="um",
unit="mm",
memorized=True,
doc="the size of the seed laser spot at the undulator",
)
......@@ -589,7 +589,7 @@ class EEHGMaster(Device):
waist_s2 = attribute(
dtype='DevDouble',
label="waist_s2",
unit="um",
unit="mm",
doc="the size of the seed laser spot at the undulator",
)
......@@ -689,7 +689,7 @@ class EEHGMaster(Device):
self._lambda_fel = 12.0
self._lambda_fel_curr = 13.3
self._e_nrg_fel = 1.0
self._e_dgamma_fel = float('Nan')
self._e_dgamma_fel = 100.0
self._e_compression = float('Nan')
self._e_nrg_lh = 100.0
self._e_dgamma_lh = float('Nan')
......@@ -715,7 +715,7 @@ class EEHGMaster(Device):
self._fl_s1 = True
self._waist_corr_s1 = float('Nan')
self._nrg_s1_fix = True
self._dt_s1 = 200e-15 #seed pulse
self._dt_s1 = 200.0 #seed 1 pulse duration in fs
self._nrg_s1 = float('Nan')
self._nrg_s1_curr = 5.0
self._pow_s1 = float('Nan')
......@@ -726,7 +726,7 @@ class EEHGMaster(Device):
self._dlambda_s2 = 1.0
self._fl_s2 = True
self._waist_corr_s2 = float('Nan')
self._dt_s2 = 100e-15 #seed pulse
self._dt_s2 = 100.0 #seed 2 pulse duration in fs
self._nrg_s2 = float('Nan')
self._nrg_s2_curr = 10.0
self._nrg_s2_fix = False
......@@ -1266,6 +1266,8 @@ class EEHGMaster(Device):
def write_e_dgamma_fel(self, value):
# PROTECTED REGION ID(EEHGMaster.e_dgamma_fel_write) ENABLED START #
"""Set the e_dgamma_fel attribute."""
self._e_dgamma_fel = value
self.e_dgamma_fel.set_write_value(value)
pass
# PROTECTED REGION END # // EEHGMaster.e_dgamma_fel_write
......@@ -1777,7 +1779,7 @@ class EEHGMaster(Device):
"""
printout = False
ebeam = utl.ElectronBeam(energy = self._e_nrg_fel * 1e9, energyspread = 100e3,
ebeam = utl.ElectronBeam(energy = self._e_nrg_fel * 1e9, energyspread = self._e_dgamma_fel * 1e3,
current = 500.0, emittance_n = 1e-6, beamsize=100e-6)
mod1 = utl.Undulator(lw = 0.10, lung = 3.0, helical = False, aw = 1.0)
......@@ -1790,7 +1792,7 @@ class EEHGMaster(Device):
# wl_range = [self.lambda_s1.get_properties().min_value * 1e-9,
# self.lambda_s1.get_properties().max_value * 1e-9])
seed1.set_duration(self._dt_s1)
seed1.set_duration(self._dt_s1 * 1e-15)
seed1.nrg_range = [0.0, self.nrg_s1_range * 1e-6]
mod1.calc_aw(seed1.wl, ebeam.energy)
......@@ -1806,7 +1808,7 @@ class EEHGMaster(Device):
# wl_range = [240 * 1e-9, 265 * 1e-9])
# wl_range = [lambda_s2_range[0]*1e-9, lambda_s2_range[1]*1e-9]) self.lambda_s2.get_properties().max_value
seed2.set_duration(self._dt_s2)
seed2.set_duration(self._dt_s2 * 1e-15)
seed2.nrg_range = [0.0, self.nrg_s2_range] # andrebbe aggiustato sulla di quanto scritto nel seed master
mod2.calc_aw(seed2.wl, ebeam.energy)
......@@ -1888,7 +1890,9 @@ class EEHGMaster(Device):
soluzione da applicare i_solution
'''
A1_sol_ap = solu[0][self._i_solution] # non si applica! seed1 fixed energy
self.write_a1(A1_sol_ap)
A2_sol_ap = solu[1][self._i_solution] # da convertire in energia
self.write_a2(A2_sol_ap)
# energia calcolata per seed2 in uJ da applicare al device sl/master/seed_master_sl.01/energy2
self._nrg_s2 = seed2.calc_seedpower_from_a(A2_sol_ap, ebeam, mod2, printout = printout)[1]*1e6
......@@ -2129,6 +2133,8 @@ class EEHGMaster(Device):
self.set_status('Alarm, seed ccd2 device not initialized')
pass
self.set_status('Read complited.')
# PROTECTED REGION END # // EEHGMaster.ReadFromField
def is_ReadFromField_allowed(self):
......
......@@ -541,7 +541,7 @@
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="the size of the seed laser spot at the undulator" label="waist_s1" unit="um" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
<properties description="the size of the seed laser spot at the undulator" label="waist_s1" unit="mm" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="waist_corr_s1" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" memorized="true" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:DoubleType"/>
......@@ -637,7 +637,7 @@
<archiveEvent fire="false" libCheckCriteria="false"/>
<dataReadyEvent fire="false" libCheckCriteria="true"/>
<status abstract="false" inherited="false" concrete="true" concreteHere="true"/>
<properties description="the size of the seed laser spot at the undulator" label="waist_s2" unit="um" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
<properties description="the size of the seed laser spot at the undulator" label="waist_s2" unit="mm" standardUnit="" displayUnit="" format="" maxValue="" minValue="" maxAlarm="" minAlarm="" maxWarning="" minWarning="" deltaTime="" deltaValue=""/>
</attributes>
<attributes name="waist_corr_s2" attType="Scalar" rwType="READ_WRITE" displayLevel="OPERATOR" polledPeriod="0" maxX="" maxY="" memorized="true" allocReadMember="true" isDynamic="false">
<dataType xsi:type="pogoDsl:DoubleType"/>
......
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