Fix memory leak in streak finder #3

Merged
augustin_s merged 15 commits from ext-dorofe_e/dap:cbd_bugfix into main 2025-07-15 10:21:21 +02:00
Contributor

I have got rid of all fancy data containers from streak_finder repo and basically moved a few chunks of code from there to dap,
plus removed 3D support (since we always have single images and not stacks)

Done memory tests on Ra, and it hovers but does not grow.

Will open for review after final cleanup.

I have got rid of all fancy data containers from streak_finder repo and basically moved a few chunks of code from there to dap, plus removed 3D support (since we always have single images and not stacks) Done memory tests on Ra, and it hovers but does not grow. Will open for review after final cleanup.
ext-dorofe_e added 13 commits 2025-07-14 23:57:06 +02:00
ext-dorofe_e reviewed 2025-07-15 00:06:45 +02:00
ext-dorofe_e left a comment
Author
Contributor

Added TODOs

Added TODOs
@@ -103,0 +97,4 @@
out=np.zeros_like(data),
where=(std!=0.0)
)
del whitefield
Author
Contributor

TODO: dels are likely unnecessary; run more tests to make sure

TODO: `del`s are likely unnecessary; run more tests to make sure
ext-dorofe_e marked this conversation as resolved
@@ -146,3 +155,1 @@
for mask_roi in mask_rois:
cryst_data = cryst_data.mask_region(mask_roi)
# mask_rois = results.get("cbd_mask_rois", []) # list of [y_min, y_max, x_min, x_max]
Author
Contributor

TODO: restore mask ROIs functionality

TODO: restore mask ROIs functionality
ext-dorofe_e marked this conversation as resolved
@@ -187,3 +206,3 @@
x_center -= crop_roi[0]
y_center -= crop_roi[2]
streaks_mask = streaks.concentric_only(x_center, y_center)
threshold = 0.33
Author
Contributor

TODO: move concentric filter to a separate method

TODO: move concentric filter to a separate method
ext-dorofe_e marked this conversation as resolved
ext-dorofe_e added 1 commit 2025-07-15 08:35:15 +02:00
ext-dorofe_e added 1 commit 2025-07-15 08:50:42 +02:00
ext-dorofe_e changed title from WIP: Fix memory leak in streak finder to Fix memory leak in streak finder 2025-07-15 08:51:01 +02:00
ext-dorofe_e requested review from augustin_s 2025-07-15 08:51:14 +02:00
augustin_s merged commit 8949a63189 into main 2025-07-15 10:21:21 +02:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sf-daq/dap#3