EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: AndorCCD binning
From: Hinxx <[email protected]>
To: "[email protected]" <[email protected]>
Date: Tue, 12 Jul 2016 09:52:37 +0200
Hi Mark,

Binning handling in AD andorCCD support does not allow to produce full vertical binning (width x 1 image). Looking at the code I noticed that some magic with trying to figure out the minY might be the problem. Also when trying to come up with the binY values Andor SDK rejects some valid binning values because other parameters to SetImage() are invalid.

unsigned int WINAPI SetImage(int hbin, int vbin, int hstart, int hend, int vstart, int vend)

For example Andor Luca with 1004x1002 detector and binY set to 1002 yields this call to the SetImage():

SetImage(1,1002,1,1004,-1001,0)

Of course it results in error from Andor SDK (-1001 is not valid minY).

Probably same applies to horizontal binning..


After changing some of the lines of the andorCCD.cpp I can successfully set binY to 1002 and get 1004 x 1 image:

diff --git a/andorApp/src/andorCCD.cpp b/andorApp/src/andorCCD.cpp
index ff09114..2ff92e0 100755
--- a/andorApp/src/andorCCD.cpp
+++ b/andorApp/src/andorCCD.cpp
@@ -1060,12 +1060,12 @@
   getIntegerParam(ADSizeY, &sizeY);
   getIntegerParam(ADMaxSizeX, &maxSizeX);
   getIntegerParam(ADMaxSizeY, &maxSizeY);
-  if (minX > (maxSizeX - 2*binX)) {
-    minX = maxSizeX - 2*binX;
+  if (minX > (maxSizeX - binX)) {
+    minX = maxSizeX - binX;
     setIntegerParam(ADMinX, minX);
   }
-  if (minY > (maxSizeY - 2*binY)) {
-    minY = maxSizeY - 2*binY;
+  if (minY > (maxSizeY - binY)) {
+    minY = maxSizeY - binY;
     setIntegerParam(ADMinY, minY);
   }
   if ((minX + sizeX) > maxSizeX) {

The call to SetImage() is now:

SetImage(1,1002,1,1004,1,1002)


This change might break other Andor detectors, here at ESS and with CEA partner we can test Andor Newton and Andor Luca.


Thanks,
Hinko


Replies:
RE: AndorCCD binning Mark Rivers

Navigate by Date:
Prev: Re: Write to waveform record using PVUtil.writePV Kasemir, Kay
Next: RE: AndorCCD binning Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: Write to waveform record using PVUtil.writePV Kasemir, Kay
Next: RE: AndorCCD binning Mark Rivers
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  <20162017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 15 Jul 2016 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·