GalSim-developers/GalSim — pull request #115 by rmandelb (2012-04-20 20:01:52+00:00)
Title: #97 ready for code review, merging

I think that the work on branch #97 is essentially complete. This branch includes some of the necessary groundwork for putting realistic galaxies and PSFs into the pipeline, by making it possible to read non-float images into SBInterpolatedImages (any of ImageF, ImageD, ImageS, ImageI, rather than only ImageF). Also, the SBProfile draw methods that take images as inputs now can take any of those types of images, rather than only an ImageF. (The SBProfile draw method without an image argument still returns ImageF, as before.) As a minor point, the optics module now works at double precision, rather than float.

Given the changes in the SBProfile C++, the python wrappers, and the optics module, I would like all of Barney, Jim, and Mike to make sure that they are okay with this. Also, @joergdietrich , could you please make sure that it compiles and that the unit tests pass on your finicky Linux box?

Remaining caveats and requests:
* the GSObject draw methods still only draw ImageF's, because the draw methods that take image arguments don't exist at the python level. Mike will handle this in #82.

* as Jim pointed out in the discussion on #97, it is not likely we'll want the Fourier draw methods to be able to operate on shorts and ints. However, when it came to the boost python wrappers, I didn't know how to instantiate the real-space draw methods for all types and Fourier-space draw methods only for float and double. You're welcome to make that change if you wish, and I'll take it as an opportunity to learn how to do that.

* In the unit test that I added at the end of test_SBProfile.py, I was getting failures if I did not set dx in the lines
```sbinterp = galsim.SBInterpolatedImage(image_in, l32d, dx=1.0)```
and
```sbinterp.draw(image_out, dx=1.0)```. My understanding is that if I don't specify dx, it chooses something sane. Should I worry that it was apparently choosing something different in these calls so that the tests failed?

* I have a git issue that I'm not sure how to resolve. I had started work on branch #96 on making a test script examples/TestImages.py, and when I started branch #97 I accidentally did so while sitting on #96 rather than while sitting on master. As a result, examples/TestImages.py is part of this pull request, but I don't want it to be - I haven't tested that script and it's 99% likely to have bugs that I will continue to fix on #96. Does someone know how to remove it from this pull request while pulling in everything else? Or do I need to delete it from branch #97 entirely?