fmi-faim / faim-ipa

A collection of Image Processing and Analysis (IPA) functions used at the Facility for Advanced Imaging and Microscopy (FAIM)
BSD 3-Clause "New" or "Revised" License
9 stars 6 forks source link

Improve `UIntHistogram` #54

Closed imagejan closed 1 year ago

imagejan commented 1 year ago

Number of bins should be len(frequencies), so let's reflect this in the calculations. Test are adapted to reflect accurate reporting of the number of bins (n_bins()).

Closes #53.

We might want to add a test for loading legacy .npz files that were saved with a previous version.

codecov[bot] commented 1 year ago

Codecov Report

Merging #54 (f5b323a) into main (4e73d59) will increase coverage by 0.62%. The diff coverage is 98.33%.

@@            Coverage Diff             @@
##             main      #54      +/-   ##
==========================================
+ Coverage   93.10%   93.73%   +0.62%     
==========================================
  Files          15       15              
  Lines        1291     1309      +18     
==========================================
+ Hits         1202     1227      +25     
+ Misses         89       82       -7     
Files Coverage Δ
tests/test_UIntHistogram.py 99.53% <100.00%> (+0.04%) :arrow_up:
src/faim_hcs/UIntHistogram.py 93.45% <94.73%> (+6.18%) :arrow_up:
tibuch commented 1 year ago

Thank you! Makes the code more readable :rocket: