> I think this probably constitutes premature optimization. I took Rachel's test_corr_padding unit test and converted it into a test of the relative timing of using an ImageCorrFunc, an Image or a file name. It is called time_noise_pad.py in the the tests directory. (We can delete it after this conversation is settled.)
> 
Mike - I think that what you've done is not really comparable to reality, in the sense that we might be padding by a noise field from some correlation function thousands of times for a typical sim, not just 3 times.  In that case, the overhead of the original CF initialization will be less important.  I've just pushed a version of that scripts that runs the InterpolatedImage initializations many times, not just 3 (controlled by a parameter n_iter at the top of the file; of course, the number of initializations is 3x that since each test makes 3 InterpolatedImages).

When I set n_iter to 100, then I do see savings from passing in the ImageCorrFunc directly.  Here's an output (admittedly just one) from my laptop:

time for test_corr_padding_cf = 58.86
time for test_corr_padding_im = 90.22
time for test_corr_padding_imgfile = 89.53
time for test_corr_nopadding = 25.99

And, again, I think thousands (or more) is a more realistic case for a typical large sim, so the savings will be even more.

Note that I also made a test that doesn't pad with noise, just because I wanted the comparison with no noise padding at all.  The reason for this is that it seems like this script was taking ~0.2s to make the InterpolatedImage (at best) and this seemed slower than what I was used to, but I thought it might have something to do with the size and structure of the image compared to typical ones.  So the final test without any padding shows you how much of the slowness is due specifically to the noise padding, vs. being some fluke because I'm making silly images.  (Since they are just images of noise, I think this will affect the maxK and stepK in a way that makes things slow compared to when we have a real object.  Could be wrong here, but I suspect that's what's going on.)