I was having trouble getting fpack to work on a system, and I realized that GalSim already did what I needed using readMulti and writeMulti.
Except that it didn't quite work correctly. I discovered that writeMulti didn't properly write the header information when there were non-trivial headers on the images, so the round trip lost the header values I needed from the original files.
So this PR fixes that, and also adds a note about how to effect at least a very simple version of fpack and funpack with galsim, and tests these operations that they preserve at least most of the header values. (Some get changed by astropy's verify operations, so I skip those.)
This isn't a particularly sexy PR, so I'm fine if no one wants to review it. But in the interest of not letting it sit here forever, I'll plan to merge this by end of week unless someone objects.
I was having trouble getting fpack to work on a system, and I realized that GalSim already did what I needed using readMulti and writeMulti.
Except that it didn't quite work correctly. I discovered that writeMulti didn't properly write the header information when there were non-trivial headers on the images, so the round trip lost the header values I needed from the original files.
So this PR fixes that, and also adds a note about how to effect at least a very simple version of fpack and funpack with galsim, and tests these operations that they preserve at least most of the header values. (Some get changed by astropy's verify operations, so I skip those.)