Provides FITS I/O with Dask Arrays.
As per Astropy issue #11159, dask arrays cannot be written right now when using dask.distributed
pip install dafits
from distributed import Client
from dafits import getdata, getheader, writeto
with Client() as client:
# Get a dask array from an existing file
filename = "image.fits"
da_array = getdata(filename)
header = getheader(filename)
# Write a Dask array to FITS
# This is the magic function that does not work with
# regular astropy.io.fits
writeto("output.fits", da_array, header)
da-fits
is distributed under the terms of the MIT license.