From 9a364ac172f2a6e6f8c738c0a98a1edf5e9ead3b Mon Sep 17 00:00:00 2001 From: GallegoSav <123730578+GallegoSav@users.noreply.github.com> Date: Mon, 6 Jan 2025 14:25:18 +0100 Subject: [PATCH] Update FullDetectorResponse.py --- cosipy/response/FullDetectorResponse.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cosipy/response/FullDetectorResponse.py b/cosipy/response/FullDetectorResponse.py index 338d8ae9..3ec7f756 100644 --- a/cosipy/response/FullDetectorResponse.py +++ b/cosipy/response/FullDetectorResponse.py @@ -316,8 +316,8 @@ def _open_rsp(cls, filename, Spectrumfile=None,norm="Linear" ,single_pixel = Fal nlines = sum(1 for _ in gzip.open(filename,"rt")) # Preallocate arrays - coords = np.empty([axes.ndim, nlines], dtype=np.int16) - data = np.empty(nlines, dtype=np.int16) + coords = np.empty([axes.ndim, nlines], dtype=np.uint32) + data = np.empty(nlines, dtype=np.uint32) # Calculate the memory usage in Gigabytes memory_size = ((nlines * data.itemsize)+(axes.ndim*nlines*coords.itemsize))/(1024*1024*1024) @@ -329,7 +329,7 @@ def _open_rsp(cls, filename, Spectrumfile=None,norm="Linear" ,single_pixel = Fal nlines = nbins # Preallocate arrays - data = np.empty(nlines, dtype=np.int16) + data = np.empty(nlines, dtype=np.uint32) # Calculate the memory usage in Gigabytes memory_size = (nlines * data.itemsize)/(1024*1024*1024) @@ -361,7 +361,7 @@ def _open_rsp(cls, filename, Spectrumfile=None,norm="Linear" ,single_pixel = Fal if key == 'RD': - b = np.array(line[1:-1], dtype=np.int16) + b = np.array(line[1:-1], dtype=np.uint32) c = int(line[-1]) coords[:, sbin] = b