Commit 49529858 authored by Mukherjee, Debangshu's avatar Mukherjee, Debangshu
Browse files

Working pnccd reader built on Dask

parent 027b697b
......@@ -67,8 +67,8 @@ MOCK_MODULES = [
"numpy.core.multiarray",
"matplotlib.offsetbox",
"multiprocessing",
"dask.array",
"dask.distributed",
"dask.array",
"dask.distributed",
"dask",
"pyfftw.interfaces.numpy_fft",
"numexpr",
......
......@@ -515,7 +515,7 @@ def remove_dark_ref(data3D, dark_ref):
def generate4D_frms6(data_dir, bin_factor=2):
cluster = dd.LocalCluster(threads_per_worker=4)
cluster = dd.LocalCluster()
client = dd.Client(cluster)
current_dir = os.getcwd()
os.chdir(data_dir)
......@@ -612,7 +612,6 @@ def generate4D_frms6(data_dir, bin_factor=2):
data4d_bin = da.reshape(
data3d_binYX, (con_shape[0], con_shape[1], xvals_bin, xvals_bin)
)
data4d_cdask = client.compute(data4d_bin)
data_4D = data4d_cdask.result()
data_4D = data4d_bin.compute()
cluster.close()
return data_4D
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment