Closed adl1995 closed 7 years ago
This looks good to me. I think you can just continue with this PR for ~ a day, adding more features.
I would suggest adding a __str__
method so that print(result)
will print out infos about the result.
I've added __repr__
to a few other other classes that do something similar, e.g. HipsTileMeta
.
Here for the sky image, things that would be good to know are the width and height and number of channels, the dtype of the data, and some info about the WCS geometry.
Another thing I would suggest is to add a write_image
method, so that users can do:
result.write_image('image.fits')
and then change the high-level docs example at https://hips.readthedocs.io/en/latest/getting_started.html to call that write_image
convenience method instead of the three lines we currently have:
from astropy.io import fits
hdu = fits.PrimaryHDU(data=data, header=geometry.fits_header)
hdu.writeto('my_image.fits')
@cdeil I just made these updates. Please review.
@cdeil I just pushed my latest code. Now there is a method in HipsDrawResult
named plot
which plots the all-sky image with HEALPix grid. I also made some changes to the high-level docs and added the __str__
method in WCSGeometry
.
Thanks! (I'll do some small follow-up edits in master later today.)
As outlined in issue #80, I have added a class
HipsDrawResult
. This still needs more work, currently it only storesimage
andgeometry
.