Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
marinerhemant committed Aug 29, 2024
1 parent 6f8cd87 commit edc9ff3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions utils/ffGenerateZip.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import time
import matplotlib.pyplot as plt
import re
from PIL import Image

compressor = Blosc(cname='zstd', clevel=3, shuffle=Blosc.BITSHUFFLE)

Expand Down Expand Up @@ -95,6 +96,7 @@ def addData (name,node):
numPxZ = 2048
HZ = 8192
pad = 6
maskFN = ''
for line in lines:
if line.startswith('RawFolder '):
rawFolder = line.split()[1]
Expand Down Expand Up @@ -291,6 +293,11 @@ def applyCorrectionNumba(img,dark,darkpreproc,doStd):
brightData *= 0
dark[:] = darkData
bright[:]=brightData
if len(maskFN) > 0:
maskData = np.array(Image.open(maskFN)).astype(np.uint16)
mask = exc.create_dataset('mask',shape=maskData.shape,dtype=np.uint16,chunks=(1,numZ,numY),compressor=compressor)
mask[:] = maskData


data.attrs['_ARRAY_DIMENSIONS'] = data.shape
dark.attrs['_ARRAY_DIMENSIONS'] = bright.shape
Expand Down

0 comments on commit edc9ff3

Please sign in to comment.