Completed panel

This commit is contained in:
gac-x09la
2021-08-30 18:02:51 +02:00
parent 478e0766fb
commit 388eb53338
3 changed files with 1596 additions and 694 deletions

View File

@@ -28,7 +28,8 @@ public class Scienta extends AreaDetector {
final ControlledVariable excitationEnergy;
final GenericArray data;
final ChannelInteger totalSteps, currentStep, exposuresComplete;
final ChannelString lensMode, acquisitionMode, passEnergy, estTime, detectorState, status;
final ChannelString lensMode, acquisitionMode, passEnergy, estTime, detectorState;
final ChannelByteArray status;
final ChannelInteger slices, slicesReadback, channels, channelsReadback;
final Stats[] stats;
final String channelCtrl;
@@ -50,16 +51,16 @@ public class Scienta extends AreaDetector {
stepSize = new ControlledVariable(name + " step size", channelCtrl + ":STEP_SIZE", channelCtrl + ":STEP_SIZE_RBV", false);
energyWidth = new ChannelDouble(name + " energy width", channelCtrl + ":ENERGY_WIDTH_RBV", 3, false);
energyWidth.setAccessType(AccessType.Read);
energyCount = new ChannelInteger(name + " energy width", channelCtrl + ":COUNT_RBV", false);
energyCount = new ChannelInteger(name + " energy count", channelCtrl + ":COUNT_RBV", false);
energyCount.setAccessType(AccessType.Read);
lowThetaY = new ControlledVariable(name + " low Theta Y", channelCtrl + ":LOW_THETA_Y", channelCtrl + ":LOW_THETA_Y_RBV", false);
centerThetaY = new ControlledVariable(name + " center Theta Y", channelCtrl + ":CENTRE_THETA_Y", channelCtrl + ":CENTRE_THETA_Y_RBV", false);
highThetaY = new ControlledVariable(name + " high Theta Y", channelCtrl + ":HIGH_THETA_Y", channelCtrl + ":HIGH_THETA_Y_RBV", false);
stepSizeThetaY = new ControlledVariable(name + " Theta Y step size", channelCtrl + ":THETA_Y_STEP_SIZE", channelCtrl + ":THETA_Y_STEP_SIZE_RBV", false);
ThetaYWidth = new ChannelDouble(name + " Theta Y energy width", channelCtrl + ":THETA_Y_WIDTH_RBV", 3, false);
ThetaYWidth = new ChannelDouble(name + " Theta Y width", channelCtrl + ":THETA_Y_WIDTH_RBV", 3, false);
ThetaYWidth.setAccessType(AccessType.Read);
ThetaYCount = new ChannelInteger(name + " Theta Y energy width", channelCtrl + ":THETA_Y_COUNT_RBV", false);
ThetaYCount = new ChannelInteger(name + " Theta Y count", channelCtrl + ":THETA_Y_COUNT_RBV", false);
ThetaYCount.setAccessType(AccessType.Read);
lowThetaX = new ChannelDouble(name + " low Theta X", channelCtrl + ":LOW_SLICE_RBV", 3, false);
@@ -69,9 +70,9 @@ public class Scienta extends AreaDetector {
highThetaX.setAccessType(AccessType.Read);
stepSizeThetaX = new ChannelDouble(name + " Theta X step size", channelCtrl + ":SLICE_STEP_SIZE_RBV", 3, false);
stepSizeThetaX.setAccessType(AccessType.Read);
ThetaXWidth = new ChannelDouble(name + " ThetaX energy width", channelCtrl + ":SLICE_WIDTH_RBV", 3, false);
ThetaXWidth = new ChannelDouble(name + " ThetaX width", channelCtrl + ":SLICE_WIDTH_RBV", 3, false);
ThetaXWidth.setAccessType(AccessType.Read);
ThetaXCount = new ChannelInteger(name + " Theta X energy width", channelCtrl + ":SLICE_COUNT_RBV", false);
ThetaXCount = new ChannelInteger(name + " Theta count", channelCtrl + ":SLICE_COUNT_RBV", false);
ThetaXCount.setAccessType(AccessType.Read);
passEnergy = new ChannelString(name + " pass energy", channelCtrl + ":PASS_ENERGY", false);
@@ -99,26 +100,22 @@ public class Scienta extends AreaDetector {
estTime.setAccessType(AccessType.Read);
detectorState= new ChannelString(name + " detector state", channelCtrl + ":DetectorState_RBV", false);
detectorState.setAccessType(AccessType.Read);
status= new ChannelString(name + " status", channelCtrl + ":StatusMessage_RBV", false);
status= new ChannelByteArray(name + " status", channelCtrl + ":StatusMessage_RBV");
status.setAccessType(AccessType.Read);
addChildren(new Device[]{acquire,
lowEnergy, centerEnergy, highEnergy, stepSize, energyWidth,energyCount,
lowThetaY, centerThetaY, highThetaY, stepSizeThetaY, ThetaYWidth,ThetaYCount,
data,
totalSteps, currentStep, estTime, detectorState, status, exposuresComplete,
passEnergy, lensMode, acquisitionMode,
slices, slicesReadback, channels, channelsReadback, excitationEnergy
});
monitoredChildren = new Device[]{acquire,
lowEnergy,centerEnergy,highEnergy,energyWidth,energyCount,
lowThetaY, centerThetaY, highThetaY, stepSizeThetaY, ThetaYWidth,ThetaYCount,
lowThetaX, centerThetaX, highThetaX, stepSizeThetaX, ThetaXWidth,ThetaXCount,
stepSize,totalSteps,currentStep, exposuresComplete, passEnergy, lensMode,acquisitionMode,
slices, slicesReadback, channels, channelsReadback, excitationEnergy,
estTime, detectorState, status
};
addChildren(monitoredChildren);
addChildren(new Device[]{
data,
});
stats = new Stats[5];
stats[0] = new Stats("CountsR1", 1);
stats[1] = new Stats("CountsR2", 2);
@@ -347,6 +344,30 @@ public class Scienta extends AreaDetector {
return ThetaYCount;
}
public ChannelDouble getLowThetaX() {
return lowThetaX;
}
public ControlledVariable getCenterThetaX() {
return centerThetaX;
}
public ChannelDouble getHighThetaX() {
return highThetaX;
}
public ChannelDouble getThetaXStepSize() {
return stepSizeThetaX;
}
public ChannelDouble getThetaXWidth() {
return ThetaXWidth;
}
public ChannelInteger getThetaXCount() {
return ThetaXCount;
}
public ChannelString getEstTime() {
return estTime;
}
@@ -355,7 +376,7 @@ public class Scienta extends AreaDetector {
return detectorState;
}
public ChannelString getStatus() {
public ChannelByteArray getStatus() {
return status;
}
@@ -474,11 +495,14 @@ public class Scienta extends AreaDetector {
if (imageCounter == null) {
return false;
}
/*
Integer id = uid.take();
if ((id == null) || (!imageCounter.equals(id))) {
uid.update();
}
return imageCounter.equals(uid.take());
*/
return true;
}
@Override