Skip to content

Commit 936ceda

Browse files
committed
relax zeropoint scatter check, warning instead of fail
1 parent 9c6bba7 commit 936ceda

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

lightcurver/processes/roi_file_preparation.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,12 @@ def fetch_and_adjust_zeropoints(combined_footprint_hash):
108108
zp_scatter_normalized = zeropoints_data['adjusted_zeropoint'].std()
109109
global_zp = zeropoints_data['adjusted_zeropoint'].median()
110110

111-
message = "The scatter in zeropoints before normalizing is lower than after normalizing? Not normal, investigate."
112-
#assert zp_scatter_normalized < zp_scatter_not_normalized, message
111+
if zp_scatter_normalized < zp_scatter_not_normalized:
112+
# This shouldn't happen in well controlled case. (normalising should result in a very stable zeropoint)
113+
# If might happen harmlessly for very low frame numbers.
114+
message = "The scatter in zeropoints before normalizing is lower than after normalizing? Not normal, investigate."
115+
logger = logging.getLogger('lightcurver.roi_file_preparation')
116+
logger.warning(message)
113117

114118
return global_zp, zp_scatter_normalized
115119

0 commit comments

Comments
 (0)