fits2tmp 0.1.6__tar.gz → 0.1.7__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.1
2
2
  Name: fits2tmp
3
- Version: 0.1.6
3
+ Version: 0.1.7
4
4
  Summary: A way of loading FITS files into temporary filesystems to make them available in memory.
5
5
  Home-page: https://gitlab.developers.cam.ac.uk/phy/ra/vla22-phd/fits2tmp
6
6
  License: BSD-3-Clause
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "fits2tmp"
3
- version = "0.1.6"
3
+ version = "0.1.7"
4
4
  description = "A way of loading FITS files into temporary filesystems to make them available in memory."
5
5
  license = "BSD-3-Clause"
6
6
  authors = ["Verity Allan <vla22@cam.ac.uk>"]
@@ -4,6 +4,7 @@ import json
4
4
  from astropy.io import fits
5
5
  from astropy import wcs
6
6
  import dask.array as da
7
+ from dask.distributed import Lock
7
8
  import numpy as np
8
9
  import os
9
10
  import dask
@@ -61,7 +62,9 @@ def fun(darr, destination, header, block_info=None):
61
62
  out = fits.PrimaryHDU(data=darr, header=n_header)
62
63
  outpath = destination.name + '/' + block_id + ".fits"
63
64
  out.writeto(outpath)
64
- filepath.append(outpath)
65
+ lock = Lock()
66
+ with lock:
67
+ filepath.append(outpath)
65
68
  return darr
66
69
 
67
70
  def fits2tmpfiles(inputpath, destination, chunks):
File without changes
File without changes