Skip to content

Commit

Permalink
use int16 throughout
Browse files Browse the repository at this point in the history
  • Loading branch information
akhanf committed Sep 15, 2024
1 parent 8943f63 commit 3dedae2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion workflow/scripts/apply_basic_flatfield_corr_zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
#now we want to apply correction to all images
#define a function to map
def apply_basic_parallel(x):
return np.reshape(basic.transform(x.squeeze()),(1,1,img_shape[0],img_shape[1])).astype('uint16')
return np.reshape(basic.transform(x.squeeze()),(1,1,img_shape[0],img_shape[1])).astype('int16')
arr_corr = da.map_blocks(apply_basic_parallel,arr_chan)

chan_arr_list.append(arr_corr)
Expand Down
2 changes: 1 addition & 1 deletion workflow/scripts/tif_to_zarr.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def single_imread(*args):

#rescale intensities, and recast
darr = darr * snakemake.params.intensity_rescaling
darr = darr.astype('uint16')
darr = darr.astype('int16')

#now we can do the computation itself, storing to zarr
print('writing images to zarr with dask')
Expand Down
2 changes: 1 addition & 1 deletion workflow/scripts/tif_to_zarr_gcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ def build_zstack(gcs_uris,fs):

#rescale intensities, and recast
darr = darr * snakemake.params.intensity_rescaling
darr = darr.astype('uint16')
darr = darr.astype('int16')

#now we can do the computation itself, storing to zarr
print('writing images to zarr with dask')
Expand Down

0 comments on commit 3dedae2

Please sign in to comment.