Commit 4c670d06 authored by Caillat Michel's avatar Caillat Michel
Browse files

Fixed a bug in DataBlock.__getAverage_0. La méthode compute (cf. dask) was...

Fixed a bug in DataBlock.__getAverage_0. La méthode compute (cf. dask) was called one time in excess
parent 704f0e4a
......@@ -470,9 +470,9 @@ class DataBlock:
with_dask = True
if with_dask:
if self.__header["NAXIS"] > 2:
res = (dask.array.nansum(self.__data[iFREQ0:iFREQ1, iDEC0:iDEC1, iRA0:iRA1], 0)*cdelt).compute()
res = (dask.array.nansum(self.__data[iFREQ0:iFREQ1, iDEC0:iDEC1, iRA0:iRA1], 0)*cdelt)
else:
res = (dask.array.nansum(self.__data[iDEC0:iDEC1, iRA0:iRA1], 0)*cdelt).compute()
res = (dask.array.nansum(self.__data[iDEC0:iDEC1, iRA0:iRA1], 0)*cdelt)
self.__collectStatistics("%d-%d"%(iFREQ0, iFREQ1), res.compute())
else:
if self.__header["NAXIS"] > 2:
......
Supports Markdown
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