Skip to content

Commit d55ddf0

Browse files
authored
Merge pull request #332 from dmgav/srx-incomplete-scan
FIX: fix incorrect number of rows in incomplete scans (SRX)
2 parents b0fd12a + 4409e8c commit d55ddf0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pyxrf/model/load_data_from_db.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2360,6 +2360,12 @@ def map_data2D_srx_new_tiled(
23602360
fast_pos = data_stream0[fast_key]
23612361
slow_pos = data_stream0[slow_key]
23622362
else:
2363+
# Compute the number of actually existing rows in case the scan was interrupted
2364+
if d_xs_sum is not None:
2365+
slow_pts = d_xs_sum.shape[0]
2366+
elif d_xs2_sum is not None:
2367+
slow_pts = d_xs2_sum.shape[0]
2368+
23632369
row_pos_fast = da.arange(fast_pts) * fast_step + fast_start
23642370
fast_pos = da.broadcast_to(row_pos_fast, (slow_pts, fast_pts))
23652371
if snaking_enabled:

0 commit comments

Comments
 (0)