Closedown
This commit is contained in:
@@ -25,13 +25,19 @@ CountsR4=ch.psi.pshell.epics.ChannelDouble X03DA-SCIENTA:Stats4:Total_RBV Read 3
|
||||
ExcitationEnergy=ch.psi.pshell.epics.ChannelDouble X03DA-SCIENTA:cam1:EXCITATION_ENERGY_RBV Read
|
||||
StepSize=ch.psi.pshell.epics.ChannelDouble X03DA-SCIENTA:cam1:STEP_SIZE_RBV Read
|
||||
NumIterations=ch.psi.pshell.epics.ChannelDouble X03DA-SCIENTA:cam1:NumExposures_RBV Read
|
||||
PassEnergy=ch.psi.pshell.epics.ChannelString X03DA-SCIENTA:cam1:PASS_ENERGY_RBV Read
|
||||
LensMode=ch.psi.pshell.epics.ChannelString X03DA-SCIENTA:cam1:LENS_MODE_RBV Read
|
||||
AcquisitionMode=ch.psi.pshell.epics.ChannelString X03DA-SCIENTA:cam1:ACQ_MODE_RBV Read
|
||||
EnergyMode=ch.psi.pshell.epics.ChannelString X03DA-SCIENTA:cam1:ENERGY_MODE_RBV Read
|
||||
LensMode=ch.psi.pshell.epics.ChannelString X03DA-SCIENTA:cam1:LENS_MODE_RBV Read
|
||||
DetectorMode=ch.psi.pshell.epics.ChannelString X03DA-SCIENTA:cam1:DETECTOR_MODE_RBV Read
|
||||
PassEnergy=ch.psi.pshell.epics.ChannelString X03DA-SCIENTA:cam1:PASS_ENERGY_RBV Read
|
||||
ElementSet=ch.psi.pshell.epics.ChannelString X03DA-SCIENTA:cam1:ELEMENT_SET_RBV Read
|
||||
ElemeAnalyserSlitntSet=ch.psi.pshell.epics.ChannelString X03DA-SCIENTA:cam1:ANALYSER_SLIT_RBV Read
|
||||
#AnalyserSlit=ch.psi.pshell.epics.ChannelString X03DA-SCIENTA:cam1:ANALYSER_SLIT_RBV Read
|
||||
#AcquisitionModeNum=ch.psi.pshell.epics.ChannelDouble X03DA-SCIENTA:cam1:ACQ_MODE_RBV Read
|
||||
#EnergyModeNum=ch.psi.pshell.epics.ChannelDouble X03DA-SCIENTA:cam1:ENERGY_MODE_RBV Read
|
||||
#LensModeNum=ch.psi.pshell.epics.ChannelDouble X03DA-SCIENTA:cam1:LENS_MODE_RBV Read
|
||||
#DetectorModeNum=ch.psi.pshell.epics.ChannelDouble X03DA-SCIENTA:cam1:DETECTOR_MODE_RBV Read
|
||||
#PassEnergyNum=ch.psi.pshell.epics.ChannelDouble X03DA-SCIENTA:cam1:PASS_ENERGY_RBV Read
|
||||
#ElementSetNum=ch.psi.pshell.epics.ChannelDouble X03DA-SCIENTA:cam1:ELEMENT_SET_RBV Read
|
||||
MachineBumpXOffset=ch.psi.pshell.epics.ChannelDouble X03DA-LBB:X-SYM Read
|
||||
MachineBumpXAngle=ch.psi.pshell.epics.ChannelDouble X03DA-LBB:X-ASYM Read
|
||||
MachineBumpYOffset=ch.psi.pshell.epics.ChannelDouble X03DA-LBB:Y-SYM Read
|
||||
|
||||
@@ -534,19 +534,19 @@
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCurrent">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="MachineCurrent"/>
|
||||
<Property name="text" type="java.lang.String" value="Machine Current"/>
|
||||
<Property name="name" type="java.lang.String" value="MachineCurrent" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCur1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="SampleCurrent"/>
|
||||
<Property name="text" type="java.lang.String" value="Sample Current"/>
|
||||
<Property name="name" type="java.lang.String" value="SampleCurrent" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCur2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="RefCurrent"/>
|
||||
<Property name="text" type="java.lang.String" value="Ref Current"/>
|
||||
<Property name="name" type="java.lang.String" value="RefCurrent" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
@@ -407,13 +407,13 @@ public class HoloScan extends Panel {
|
||||
checkCounts4.setText("Counts Region 4");
|
||||
checkCounts4.setName("CountsR4"); // NOI18N
|
||||
|
||||
checkCurrent.setText("MachineCurrent");
|
||||
checkCurrent.setText("Machine Current");
|
||||
checkCurrent.setName("MachineCurrent"); // NOI18N
|
||||
|
||||
checkCur1.setText("SampleCurrent");
|
||||
checkCur1.setText("Sample Current");
|
||||
checkCur1.setName("SampleCurrent"); // NOI18N
|
||||
|
||||
checkCur2.setText("RefCurrent");
|
||||
checkCur2.setText("Ref Current");
|
||||
checkCur2.setName("RefCurrent"); // NOI18N
|
||||
|
||||
checkCur3.setText("AuxCurrent");
|
||||
|
||||
@@ -413,13 +413,13 @@
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCur1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="SampleCurrent"/>
|
||||
<Property name="text" type="java.lang.String" value="Sample Current"/>
|
||||
<Property name="name" type="java.lang.String" value="SampleCurrent" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCur2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="RefCurrent"/>
|
||||
<Property name="text" type="java.lang.String" value="Ref Current"/>
|
||||
<Property name="name" type="java.lang.String" value="RefCurrent" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
@@ -434,7 +434,7 @@
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCur3">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="AuxCurrent"/>
|
||||
<Property name="text" type="java.lang.String" value="Aux Current"/>
|
||||
<Property name="name" type="java.lang.String" value="AuxCurrent" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
@@ -487,7 +487,7 @@
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCurrent">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="MachineCurrent"/>
|
||||
<Property name="text" type="java.lang.String" value="Machine Current"/>
|
||||
<Property name="name" type="java.lang.String" value="MachineCurrent" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
@@ -347,10 +347,10 @@ public class ManipulatorScan extends Panel {
|
||||
}
|
||||
});
|
||||
|
||||
checkCur1.setText("SampleCurrent");
|
||||
checkCur1.setText("Sample Current");
|
||||
checkCur1.setName("SampleCurrent"); // NOI18N
|
||||
|
||||
checkCur2.setText("RefCurrent");
|
||||
checkCur2.setText("Ref Current");
|
||||
checkCur2.setName("RefCurrent"); // NOI18N
|
||||
|
||||
checkImage.setSelected(true);
|
||||
@@ -359,7 +359,7 @@ public class ManipulatorScan extends Panel {
|
||||
checkImage.setContentAreaFilled(false);
|
||||
checkImage.setName("Scienta.dataMatrix"); // NOI18N
|
||||
|
||||
checkCur3.setText("AuxCurrent");
|
||||
checkCur3.setText("Aux Current");
|
||||
checkCur3.setName("AuxCurrent"); // NOI18N
|
||||
|
||||
checkImageIntegration.setSelected(true);
|
||||
@@ -388,7 +388,7 @@ public class ManipulatorScan extends Panel {
|
||||
checkCounts4.setText("Counts Region 4");
|
||||
checkCounts4.setName("CountsR4"); // NOI18N
|
||||
|
||||
checkCurrent.setText("MachineCurrent");
|
||||
checkCurrent.setText("Machine Current");
|
||||
checkCurrent.setName("MachineCurrent"); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout panelSensorsLayout = new javax.swing.GroupLayout(panelSensors);
|
||||
|
||||
@@ -424,13 +424,13 @@
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCur1">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="SampleCurrent"/>
|
||||
<Property name="text" type="java.lang.String" value="Sample Current"/>
|
||||
<Property name="name" type="java.lang.String" value="SampleCurrent" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCur2">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="RefCurrent"/>
|
||||
<Property name="text" type="java.lang.String" value="Ref Current"/>
|
||||
<Property name="name" type="java.lang.String" value="RefCurrent" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
@@ -445,7 +445,7 @@
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCur3">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="AuxCurrent"/>
|
||||
<Property name="text" type="java.lang.String" value="Aux Current"/>
|
||||
<Property name="name" type="java.lang.String" value="AuxCurrent" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
@@ -498,7 +498,7 @@
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="checkCurrent">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="MachineCurrent"/>
|
||||
<Property name="text" type="java.lang.String" value="Machine Current"/>
|
||||
<Property name="name" type="java.lang.String" value="MachineCurrent" noResource="true"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
|
||||
@@ -416,10 +416,10 @@ public class PhotonEnergy extends Panel {
|
||||
}
|
||||
});
|
||||
|
||||
checkCur1.setText("SampleCurrent");
|
||||
checkCur1.setText("Sample Current");
|
||||
checkCur1.setName("SampleCurrent"); // NOI18N
|
||||
|
||||
checkCur2.setText("RefCurrent");
|
||||
checkCur2.setText("Ref Current");
|
||||
checkCur2.setName("RefCurrent"); // NOI18N
|
||||
|
||||
checkImage.setSelected(true);
|
||||
@@ -428,7 +428,7 @@ public class PhotonEnergy extends Panel {
|
||||
checkImage.setContentAreaFilled(false);
|
||||
checkImage.setName("Scienta.dataMatrix"); // NOI18N
|
||||
|
||||
checkCur3.setText("AuxCurrent");
|
||||
checkCur3.setText("Aux Current");
|
||||
checkCur3.setName("AuxCurrent"); // NOI18N
|
||||
|
||||
checkImageIntegration.setSelected(true);
|
||||
@@ -457,7 +457,7 @@ public class PhotonEnergy extends Panel {
|
||||
checkCounts4.setText("Counts Region 4");
|
||||
checkCounts4.setName("CountsR4"); // NOI18N
|
||||
|
||||
checkCurrent.setText("MachineCurrent");
|
||||
checkCurrent.setText("Machine Current");
|
||||
checkCurrent.setName("MachineCurrent"); // NOI18N
|
||||
|
||||
javax.swing.GroupLayout panelSensorsLayout = new javax.swing.GroupLayout(panelSensors);
|
||||
|
||||
@@ -12,4 +12,4 @@ RELATIVE (BOOLEAN)
|
||||
|
||||
#set_preference(Preference.ENABLED_PLOTS, [ManipulatorPhi, ManipulatorTheta, Scienta.dataMatrix, ImageIntegrator])
|
||||
set_preference(Preference.PLOT_TYPES,{'ImageIntegrator':1})
|
||||
ascan((phi, theta), SENSORS, (PHI_RANGE[0], THETA_RANGE[0]), (PHI_RANGE[1], THETA_RANGE[1]), STEPS, LATENCY, RELATIVE, before_read=trig_scienta)
|
||||
ascan((ManipulatorPhi, ManipulatorTheta), SENSORS, (PHI_RANGE[0], THETA_RANGE[0]), (PHI_RANGE[1], THETA_RANGE[1]), STEPS, LATENCY, RELATIVE, before_read=trig_scienta, after_read = AfterReadout)
|
||||
@@ -8,11 +8,6 @@ STEPS (int or tuple)
|
||||
LATENCY (double)
|
||||
RELATIVE (BOOLEAN)
|
||||
"""
|
||||
|
||||
def AfterReadout(rec):
|
||||
if rec.index == 0:
|
||||
create_diag_datasets()
|
||||
append_diag_datasets()
|
||||
|
||||
set_preference(Preference.PLOT_TYPES,{'ImageIntegrator':1})
|
||||
lscan(MOTOR, SENSORS, RANGE[0], RANGE[1], STEPS, LATENCY, RELATIVE, before_read=trig_scienta, after_read = AfterReadout)
|
||||
@@ -15,4 +15,4 @@ else:
|
||||
#SWEPT
|
||||
writables = (Eph, Scienta.lowEnergy, Scienta.highEnergy)
|
||||
|
||||
vscan(writables, SENSORS, VECTOR, True, LATENCY,False, before_read=trig_scienta)
|
||||
vscan(writables, SENSORS, VECTOR, True, LATENCY,False, before_read=trig_scienta, after_read = AfterReadout)
|
||||
|
||||
@@ -67,6 +67,8 @@ try:
|
||||
set_attribute(path, "Pass Energy",pass_energy)
|
||||
set_attribute(path, "Iterations",cur_iteration+1)
|
||||
|
||||
AfterReadout()
|
||||
|
||||
|
||||
finally:
|
||||
cur_range = 0
|
||||
|
||||
@@ -67,15 +67,15 @@ diag_channels.append(Scienta.highEnergy) #diag_channels.append(ChannelDo
|
||||
#diag_channels.append(ChannelDouble("DetectorModeNum", "X03DA-SCIENTA:cam1:DETECTOR_MODE_RBV"))
|
||||
#diag_channels.append(ChannelDouble("PassEnergyNum", "X03DA-SCIENTA:cam1:PASS_ENERGY_RBV"))
|
||||
#diag_channels.append(ChannelDouble("ElementSetNum", "X03DA-SCIENTA:cam1:ELEMENT_SET_RBV"))
|
||||
diag_channels.append(AcquisitionMode) #diag_attrs.append(ChannelString("AcquisitionMode", "X03DA-SCIENTA:cam1:ACQ_MODE_RBV"))
|
||||
diag_channels.append(EnergyMode) #diag_attrs.append(ChannelString("EnergyMode", "X03DA-SCIENTA:cam1:ENERGY_MODE_RBV"))
|
||||
diag_channels.append(LensMode) #diag_attrs.append(ChannelString("LensMode", "X03DA-SCIENTA:cam1:LENS_MODE_RBV"))
|
||||
diag_channels.append(DetectorMode) #diag_attrs.append(ChannelString("DetectorMode", "X03DA-SCIENTA:cam1:DETECTOR_MODE_RBV"))
|
||||
diag_channels.append(PassEnergy) #diag_attrs.append(ChannelString("PassEnergy", "X03DA-SCIENTA:cam1:PASS_ENERGY_RBV"))
|
||||
diag_channels.append(ElementSet) #diag_attrs.append(ChannelString("ElementSet", "X03DA-SCIENTA:cam1:ELEMENT_SET_RBV"))
|
||||
diag_channels.append(ExcitationEnergy) #diag_channels.append(ChannelDouble("ExcitationEnergy", "X03DA-SCIENTA:cam1:EXCITATION_ENERGY_RBV"))
|
||||
diag_channels.append(StepSize) #diag_channels.append(ChannelDouble("StepSize", "X03DA-SCIENTA:cam1:STEP_SIZE_RBV"))
|
||||
diag_channels.append(NumIterations) #diag_channels.append(ChannelDouble("NumIterations", "X03DA-SCIENTA:cam1:NumExposures_RBV"))
|
||||
diag_channels.append(PassEnergy) #diag_attrs.append(ChannelString("PassEnergy", "X03DA-SCIENTA:cam1:PASS_ENERGY_RBV"))
|
||||
diag_channels.append(LensMode) #diag_attrs.append(ChannelString("LensMode", "X03DA-SCIENTA:cam1:LENS_MODE_RBV"))
|
||||
diag_channels.append(AcquisitionMode) #diag_attrs.append(ChannelString("AcquisitionMode", "X03DA-SCIENTA:cam1:ACQ_MODE_RBV"))
|
||||
diag_channels.append(EnergyMode) #diag_attrs.append(ChannelString("EnergyMode", "X03DA-SCIENTA:cam1:ENERGY_MODE_RBV"))
|
||||
diag_channels.append(DetectorMode) #diag_attrs.append(ChannelString("DetectorMode", "X03DA-SCIENTA:cam1:DETECTOR_MODE_RBV"))
|
||||
diag_channels.append(ElementSet) #diag_attrs.append(ChannelString("ElementSet", "X03DA-SCIENTA:cam1:ELEMENT_SET_RBV"))
|
||||
diag_channels.append(ElemeAnalyserSlitntSet) #diag_attrs.append(ChannelString("ElemeAnalyserSlitntSet", "X03DA-SCIENTA:cam1:ANALYSER_SLIT_RBV"))
|
||||
|
||||
#Manipulator Settings
|
||||
@@ -168,4 +168,12 @@ def append_diag_datasets():
|
||||
x = '' if (type(f) is ch.psi.pshell.epics.ChannelString) else float('nan')
|
||||
append_dataset(group+f.getName(), x)
|
||||
|
||||
|
||||
SAVE_DIAGS = True
|
||||
def AfterReadout(rec):
|
||||
if SAVE_DIAGS:
|
||||
if rec.index == 0:
|
||||
create_diag_datasets()
|
||||
append_diag_datasets()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user