Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1367
News FAQ
Search Home


next up previous
Next: Recomendations Up: No Title Previous: Conceptually Complicated and Uncleanly Divided

Efficiency vs Incapsulation

Access of the data in the Image class is not consistent with optimized code. Currently, the Image data can be accessed one pixel at a time or by a pointer to a copy of the image (the copy can be read back into the image). DFTs and FFTs should not have to access the data one pixel at a time. However, if the pointer-to- array-copy access is chosen, we mo longer have access to the power of the Image class and its methods: we might as well be writing in FORTRAN.

There is a subtle interaction between the problem of data access and the problem with coordinate confusion. Remember, the data are stored in the order of Pixel coordinates. However, the values returned for xrefpix and xcell in the example code above refer to the ImPixel coordinate system and its relationship to the Image coordinate system. Great confusion results when one tries to access the data efficiently through the pointer-to-copy and then tries to use the higher level coordinate information to determine the pixel location. One suggested solution to this is to use the methods of the image class to access the data and to indicate the astronomical (Image) coordinates of that point. This, however, leads to very inefficient code for highly vectorizable operations on regular orthogonal coordinate systems.


next up previous
Next: Recomendations Up: No Title Previous: Conceptually Complicated and Uncleanly Divided
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-03-28