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 2025 | 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 2025 |
<== Date ==> | <== Thread ==> |
---|
Subject: | RE: areaDetector: ADBinX/Y and ADSizeX/Y interactions |
From: | Mark Rivers <[email protected]> |
To: | "'Phil Atkin'" <[email protected]>, "[email protected]" <[email protected]> |
Date: | Thu, 14 Jan 2016 17:39:59 +0000 |
Hi Phil, You are correct. The units of ADSize are intended to be in unbinned detector pixels. The ADProsilica::setGeometry is a good example. Their API defines the readout region size in
binned pixels, so the driver sets it to ADSizeX/ADBinX. I can’t promise that all detector drivers have been written to follow this convention, but they should be. Here is the code for the Prosilica driver. asynStatus prosilica::setGeometry() { int status = asynSuccess; int s; int binX, binY, minY, minX, sizeX, sizeY, maxSizeX, maxSizeY; static const char *functionName = "setGeometry";
/* Get all of the current geometry parameters from the parameter library */ status |= getIntegerParam(ADBinX, &binX); if (binX < 1) binX = 1; status |= getIntegerParam(ADBinY, &binY); if (binY < 1) binY = 1; status |= getIntegerParam(ADMinX, &minX); status |= getIntegerParam(ADMinY, &minY); status |= getIntegerParam(ADSizeX, &sizeX); status |= getIntegerParam(ADSizeY, &sizeY); status |= getIntegerParam(ADMaxSizeX, &maxSizeX); status |= getIntegerParam(ADMaxSizeY, &maxSizeY); if (minX + sizeX > maxSizeX) { sizeX = maxSizeX - minX; setIntegerParam(ADSizeX, sizeX); } if (minY + sizeY > maxSizeY) { sizeY = maxSizeY - minY; setIntegerParam(ADSizeY, sizeY); }
/* CMOS cameras don't support binning, so ignore ePvErrNotFound errors */ s = PvAttrUint32Set(this->PvHandle, "BinningX", binX); if (s != ePvErrNotFound) status |= s; s = PvAttrUint32Set(this->PvHandle, "BinningY", binY); if (s != ePvErrNotFound) status |= s; if(!status){ status |= PvAttrUint32Set(this->PvHandle, "RegionX", minX/binX); status |= PvAttrUint32Set(this->PvHandle, "RegionY", minY/binY); status |= PvAttrUint32Set(this->PvHandle, "Width", sizeX/binX); status |= PvAttrUint32Set(this->PvHandle, "Height", sizeY/binY); }
if (status) asynPrint(this->pasynUserSelf, ASYN_TRACE_ERROR,
"%s:%s: error, status=%d\n",
driverName, functionName, status); return((asynStatus)status); } Mark From: [email protected] [mailto:[email protected]]
On Behalf Of Phil Atkin As I understand it, the ADSize parameters are intended to determine the dimensions of the _physical_ region of the sensor that is read out. That's why the constraint imposed is
-- |