Skip to content
Snippets Groups Projects
Commit 265e52e2 authored by Oliver Ford (IPP)'s avatar Oliver Ford (IPP)
Browse files

Sensor metadata

parent 8842ddc6
No related branches found
No related tags found
No related merge requests found
......@@ -14,7 +14,9 @@ public class SensorInfo_AndorCMOS implements SensorParser {
// Andor CMOS cameras should always be under 'AndorCam'.
try {
src.get("AndorCam/config/SensorWidth", Double.class);
Double ccdWidth = src.get("AndorCam/config/SensorWidth", Double.class);
if(ccdWidth == null) // not a PCO
return null;
}catch(RuntimeException err) {
return null; //No AndorCam metadata, ignore
}
......
......@@ -13,8 +13,6 @@ public class SensorInfo_PCOEdge implements SensorParser {
//try to find the camera metadata
try {
src.get("AndorCam/config/SensorWidth", Double.class);
Integer ccdWidth = (Integer) src.get("PCOCam/config/sensorWidth", Integer.class);
if(ccdWidth == null) // not a PCO
return null;
......@@ -24,7 +22,8 @@ public class SensorInfo_PCOEdge implements SensorParser {
SensorInfo camInfo = new SensorInfo();
camInfo.zeroLevel = (Double)src.get("/AndorCam/config/BaselineLevel", Double.class);
//camInfo.zeroLevel = (Double)src.get("/AndorCam/config/BaselineLevel", Double.class);
camInfo.zeroLevel = Double.NaN;
//from the PCO we seem to get this done for us
camInfo.photoelectronsPerADCU = (Double)src.get("PCOCam/config/photoelectronsPerCount", Double.class);
......@@ -32,12 +31,17 @@ public class SensorInfo_PCOEdge implements SensorParser {
if((Long)src.get("PCOCam/config/exp_timebase", Long.class) != 1)
throw new RuntimeException("PCO timebase unit is unusual. Not implemented.");
camInfo.photoelectronsPerADCU = (Double)src.get("PCOCam/config/photoelectronsPerCount", Double.class);
camInfo.exposureTime = (Long)src.get("PCOCam/config/exp_time", Long.class) / 1e6; //in us
camInfo.frameTime = (Double)src.get("PCOCam/config/frameTimeMS", Double.class) / 1e3;
camInfo.cameraName = "PCOCam-" + (String)src.get("/PCOCam/config/cameraInfo", String.class);
camInfo.modeString = camInfo.cameraName;
camInfo.sensorPixelOfImageLeft = src.get("/PCOCam/config/roiX0", Integer.class) - 1;
camInfo.sensorPixelOfImageTop = src.get("/PCOCam/config/roiY0", Integer.class) - 1;
camInfo.sensorBinningX = src.get("/PCOCam/config/binningX", Integer.class);
camInfo.sensorBinningY = src.get("/PCOCam/config/binningY", Integer.class);
return camInfo;
}
......
......@@ -70,7 +70,9 @@ public class SensorInfo_PICam implements SensorParser {
// Princeton ProEM cameras should always be under 'PICam'.
String readoutMode;
try {
src.get("PICam/config/ReadoutControlMode", String.class);
String rcMode = src.get("PICam/config/ReadoutControlMode", String.class);
if(rcMode == null)
return null;
}catch(RuntimeException err) {
return null; //No AndorCam metadata, ignore
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment