hipspy / hips

Python library to handle HiPS
https://hips.readthedocs.io
12 stars 16 forks source link

support for overwrite in write_image #127

Closed richardgmcmahon closed 5 years ago

richardgmcmahon commented 6 years ago

Hi, it would be useful if writeto supported 'overwrite' at least for fits files.

see:

astropy.io.fits.writeto(filename, data, header=None, output_verify='exception', overwrite=False, checksum=False

cdeil commented 6 years ago

I would suggest we add an overwrite option here: https://github.com/hipspy/hips/blob/3710d32caf1d3affc3e8f8046b7cc82b9cb71718/hips/draw/ui.py#L103

We could also add it here: https://github.com/hipspy/hips/blob/8d6078ffb08f2fd1e63e54b305b5b336db8f535c/hips/tiles/tile.py#L340 although if we start to make it configurable when HiPS tile folders are created or files overwritten, things get more complicated, so I wouldn't add it there.

cdeil commented 5 years ago

Implemented by @adl1995 in #129.