Skip to content
This repository has been archived by the owner on Feb 7, 2024. It is now read-only.

Commit

Permalink
Fix make make_pb
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan-Willem committed Mar 23, 2021
1 parent f3425cb commit a8fc9d0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ngcasa/imaging/make_pb.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -95,12 +95,16 @@ def make_pb(img_xds,pb_parms, grid_parms, sel_parms):
_pb_parms['center_indx'] = []


chan_chunk_size = _img_xds.chan_width.chunks[0][0]
chan_chunk_size = _img_xds.chan_width.chunks[0]
freq_coords = da.from_array(_img_xds.coords['chan'].values, chunks=(chan_chunk_size))

pol = _img_xds.pol.values #don't want chunking here

chunksize = (_grid_parms['image_size'][0],_grid_parms['image_size'][1]) + freq_coords.chunksize + (len(pol),) + (len(_pb_parms['list_dish_diameters']),)
chunksize = (_grid_parms['image_size'][0],_grid_parms['image_size'][1] , chan_chunk_size , len(pol), len(_pb_parms['list_dish_diameters']))

#print(freq_coords.chunksize)
#print(chan_chunk_size)
#print(chunksize)

pb = da.map_blocks(pb_func, freq_coords, pol, _pb_parms, _grid_parms, chunks=chunksize ,new_axis=[0,1,3,4], dtype=np.double)

Expand Down

0 comments on commit a8fc9d0

Please sign in to comment.