GalSim-developers/GalSim — Issue #12: refactor images for Python compatibility
Author: TallJimbo
Created: 2012-02-28 23:44:47+00:00
State: open

I think the next step in the Python wrapping is to refactor the ```Image``` class so it can share data with NumPy arrays.

Here are the details of what I plan to do:

- Remove the ```FITSFile``` and ```FITSImage``` classes entirely.

- Remove the "header" component of ```Image```.

- Reimplement ```Image``` internals to use ```boost::shared_ptr``` for reference counting; this can use an arbitrary deleter and will allow an ```Image``` to hold memory blocks allocated by NumPy.

- Re-write existing example code that uses FITS images in Python with PyFITS.

- Remove the CFITSIO bits from the build system.

I don't think it will be necessary to modify the ```Image``` public interface aside from removing the header access.

I plan to work on this on a branch...I'm tentatively planning to call it "issues/12". As this is the first feature branch, If you'd prefer descriptively-named branches, please speak up - I don't have a strong preference, but it's something we should decide on.