fits2tmp 1.0.2__tar.gz → 1.0.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fits2tmp
3
- Version: 1.0.2
3
+ Version: 1.0.4
4
4
  Summary: A way of loading FITS files into temporary filesystems to make them available in memory.
5
5
  Author: Verity Allan
6
6
  Author-email: Verity Allan <vla22@cam.ac.uk>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fits2tmp"
3
- version = "1.0.2"
3
+ version = "1.0.4"
4
4
  description = "A way of loading FITS files into temporary filesystems to make them available in memory."
5
5
  requires-python = ">=3.12,<4"
6
6
  readme = "README.md"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "fits2tmp"
3
- version = "1.0.2"
3
+ version = "1.0.4"
4
4
  description = "A way of loading FITS files into temporary filesystems to make them available in memory."
5
5
  authors = [{ name = "Verity Allan", email = "vla22@cam.ac.uk" }]
6
6
  requires-python = ">=3.12,<4"
@@ -91,7 +91,7 @@ def disk2dah(filetype, inputpath, destination, headerloc, arraysize, chunks=None
91
91
  n_header = dict2header(header_dict(f[0].header))
92
92
  wcs_obj = wcs.WCS(n_header)
93
93
  case "zarr":
94
- d = da.from_zarr(inputpath, chunks=chunks)[0:arraysize, 0:arraysize[1], 0:arraysize[2]]
94
+ d = da.from_zarr(inputpath, chunks=chunks)[0:arraysize[0], 0:arraysize[1], 0:arraysize[2]]
95
95
  n_header = dict2header(file2dict(inputpath, headerloc))
96
96
  wcs_obj = wcs.WCS(n_header)
97
97
  case "hdf5":
@@ -156,8 +156,8 @@ def fakefits2tmpfiles(filetype, inputpath, destination, arraysize, headerloc=Non
156
156
  header.update(t.to_header())
157
157
  hdu = fits.PrimaryHDU(data=data.compute(), header=header)
158
158
  hdu.writeto(destination.name + dest + "fits")
159
- fpaths.append(destination.name + dest + "fits")
160
- return fpaths
159
+ yield (destination.name + dest + "fits")
160
+ #return fpaths
161
161
  #def array2disk(array, metadata, outputtype, destination):
162
162
 
163
163
  #def tmpfitsfile2disk(fitsfile, outputtype, destination):
File without changes