In the particular case of the ReceptorGains, control parameters and matrices of complex and floating point numbers need to be passed in, and a vector of complex numbers needs to be passed out. It is possible to create a special purpose object to encapsulate the inputs and outputs, but the utility of this is unclear. One doesn't have to turn everything into an object. On the other hand, separating out the middle level astronomical code from the database code would result in many more methods in each astronomical class as well as more complicated interfaces to these middle level methods. It is unclear if a three or four layer approach is best, but this should be decided pretty soon.
Image has an array.
The Image level image processing code will be very similar to SDE's. However, SDE's Array and Pixel level routines can be combined into a single level of code, as in ArrayMath.