GalSim-developers/GalSim — pull request #477 by rmjarvis (2013-10-14 23:41:57+00:00)
Title: #476 Remove default pad_factor and interpolants from C++ layer

This branch was prompted by some warnings Barney found when using MEM_TEST=true with various compilers. I fixed those warnings, but one of them prompted a change that I think may warrant some discussion.

In the InterpolatedImage class, we've had text about the default pad_factor being 0, which in turn means that it will really use 4. This has always struck me as confusing, so I propose (via this PR) to have the default pad_factor really be 4, not 0. In other words, the default is set in the python layer, so it gets the normal python documentation support, rather than being shunted off to the C++ layer, where the C++ code reinterprets any pad_factor <= 0 to actually mean 4. Now pad_facotr <= 0 is a ValueError.

Similarly, we already have the interpolants set in the python layer, so there is no need for the default interpolants in the C++ layer. The xInterp and kInterp parameters are never None when called from the InterpolatedImage constructor; it always sets them to appropriate default values as needed. So here I propose removing the defaults from the C++ layer (which also avoids one of clang's hang ups).

If anyone has a problem with either of these changes, please discuss here.