barnabytprowe/great3-public — pull request #7 by dmargala (2014-01-23 18:03:49+00:00)
Title: fix postage stamp bounds in extractPSF

The great3 image bounds are zero-indexed. It looks like the extractPSF function assumes they are one-indexed.

Minor bug, probably doesn't change things too much...

For example:

Setup:

```
import galsim
starfield_im = galsim.fits.read("/Users/daniel/data/great3/control/ground/constant/starfield_image-000-0.fits")
size = 48
```

This is okay:
```
starfield_im[galsim.BoundsI(0,size-1,0,size-1)]

```

This is not:
```
starfield_im[galsim.BoundsI(-1,size-2,-1,size-2)]
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
in ()
----> 1 starfield_im[galsim.BoundsI(-1,46,-1,46)]

/usr/local/lib/python2.7/site-packages/galsim/image.py in Image_getitem(self, key)
161
162 def Image_getitem(self, key):
--> 163 return self.subImage(key)
164
165 # Define a utility function to be used by the arithmetic functions below

RuntimeError: Image Error: Subimage bounds (-1 46 -1 46 ) are outside original image bounds (0 143 0 143 )
```