Hi Mark,
I've submitted https://github.com/areaDetector/ADAndor/pull/8 pull
request with the support for FVB readout mode.
Changing readout mode does not change binning settings, only the image
size is affected. In other words ADBinY asyn parameter is not adjusted
between readout mode changes.
Tested with Andor Luca.
I'll try to add support for remaining readout modes as time permits.
Thanks,
Hinko
On 07/13/2016 02:38 PM, Mark Rivers wrote:
Hi Hinko,
I merged your pull request. I also applied the fix you sent yesterday for calculating minX and minY.
Note that I also merged an older pull request today from Mike Dunning at SLAC for EMGain support. You should get the latest master before issuing your next pull request.
Mark
________________________________________
From: Hinxx [[email protected]]
Sent: Wednesday, July 13, 2016 6:15 AM
To: Mark Rivers; [email protected]
Subject: Re: AndorCCD binning
Hi Mark,
On 07/12/2016 11:36 PM, Mark Rivers wrote:
Hi Hinko,
OK. I guess we can expect this change to appear in 2.5, 2.6 release?
Yes, it will be in the next release.
Would you accept a patch that would allow changing read mode?
Yes, I'd be happy to accept a patch to support changing the read mode. I would like the patch to include:
- Updated RELEASE.md file
- Updated andorDoc.html
- Updated medm screens with widgets for the new PVs. Other OPI screens are autoconverted from the medm screens. If you cannot run medm then please send a screen shot of your OPI screen so I can reproduce it in medm.
I have forked the ADAndor on Github and submitted a pull request for
you: https://github.com/areaDetector/ADAndor/pull/7
Pull contains the following changes.
a) Deals with issues I had when trying to run latest code with Andor
Luca R I have here. Basically Luca does not support shutter so I had to
add a check to make sure that initialization in constructor actually
happens all the way.
b) Along the way I stumbled on a situation where initialization would
fail with:
2016/07/13 10:34:26.841 andorCCD:AndorCCD: ERROR: Unknown error
code=20992 returned from Andor SDK.
From atmcdlXd.h:
#define DRV_NOT_AVAILABLE 20992
This then resulted in segfault because enum strings were not allocated,
but setupAcquisition() was called due to PINI processed records, AFAIK.
Power cycling the camera resolved the issue. Nevertheless I moved
allocation of the enums before Andor SDK tries initialization. With this
change IOC will run but report bunch of SDK errors without crashing.
c) Also to avoid division by zero in setupAcquisition(), due to same
reasons mentioned above, I added a flag the allows bailing out early and
not crashing..
For the actual readout mode support I would at least need shutter check
from above pull request ( a) ), if I want to implement and test this new
feature.
I have a patch on top of the above changes that currently allows
selecting Image or Full Vertical Binning readout modes. I guess I need
to wait until first pull request is merged and the issue a new one. I
have modified CSS OPI, RELEASE.md and andorDoc.html as requested, too.
For the Single-, Multi- and Random- track readout modes I would need a
bit more time. It might be better to add support for those in separate
pull requests anyway.
Thanks,
Hinko
Thanks,
Mark
-----Original Message-----
From: Hinxx [mailto:[email protected]]
Sent: Tuesday, July 12, 2016 8:40 AM
To: Mark Rivers; [email protected]
Subject: Re: AndorCCD binning
Hi Mark,
OK. I guess we can expect this change to appear in 2.5, 2.6 release?
We will probably use patched 2.4 until then.
On a related note - Andor SDK has something called SetReadMode() to
setup for different readout modes: Image, Full Vertical Binning, single
track and multi track. Currently andorCCD only works with Image mode.
Would you accept a patch that would allow changing read mode?
Thanks,
Hinko
On 07/12/2016 02:56 PM, Mark Rivers wrote:
Hi Hinko,
Your change looks correct to me, I don't know where the factor of 2 was coming from. I added that code back in January 2012, but I probably only tested with small values of binning (e.g. 1, 2, 3, 4). I will make the change and test on our Andor iDus 401 camera.
Mark
________________________________________
From: [email protected] [[email protected]] on behalf of Hinxx [[email protected]]
Sent: Tuesday, July 12, 2016 2:52 AM
To: [email protected]
Subject: AndorCCD binning
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
- References:
- AndorCCD binning Hinxx
- RE: AndorCCD binning Mark Rivers
- Re: AndorCCD binning Hinxx
- RE: AndorCCD binning Mark Rivers
- Re: AndorCCD binning Hinxx
- RE: AndorCCD binning Mark Rivers
- Navigate by Date:
- Prev:
RE: AndorCCD binning Mark Rivers
- Next:
RE: Trigger aSub record from bi record reflecting status Mooney, Tim M.
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
<2016>
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
RE: AndorCCD binning Mark Rivers
- Next:
EPICS archiver appliance redundancy Phillip Sorensen
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
<2016>
2017
2018
2019
2020
2021
2022
2023
2024
|