Skip to content

Commit

Permalink
Properly handle pixels with zero-sum intensity
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-l-kong committed Nov 6, 2024
1 parent d02340d commit e164243
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/maldi_tools/load_maldi_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ def extract_maldi_tsf_data(
tdf_sdk=tdf_sdk_binary, handle=tsf_cursor.handle, frame_id=sid, indices=index_arr
)
intensity_sum = np.sum(intensity_arr) if tic_normalize else 1
if intensity_sum == 0:
continue

for mz, intensity in zip(mz_arr, intensity_arr):
mz_bin_index = bisect_left(mz_bin_rights, mz)
Expand Down

0 comments on commit e164243

Please sign in to comment.