[lsst-dm-stack-users] image.getArray() question
    Chris Walter 
    chris.walter at duke.edu
       
    Mon Feb 10 10:41:01 PST 2014
    
    
  
Hi All,
I was curious: why does image.getArray return an array in the order (Y,X)? The builtin AFW functions all seem to use X,Y (width, height).
from image::ImageBase<PixelT>::Array lsst.afw.image::ImageBase<PixelT>::getArray()
	
 return ndarray::external(
        reinterpret_cast<PixelT*>(row_begin(0)),
        ndarray::makeVector(getHeight(), getWidth()),
        ndarray::makeVector(rowStride, 1),
        this->_manager
    );
Is it something about memory or disk layout?  I got caught up trying to find a particular pixel and it wasn't working since I assumed getArray would use the same convention.  I assume there is a good reason but I was curious as to what it was.
-Chris
    
    
More information about the dm-users
mailing list