Skip to content

Conversation

@vineetbansal
Copy link
Contributor

@vineetbansal vineetbansal commented Apr 6, 2023

Moving the mrc_index_to_particles logic to after the size filtering/row truncation seems to me to be the right thing to do (and one that involves the least disruption), and fixes the problem of passing out-of-range indices to ImageSource.set_metadata method (which its currently tolerant of, and ignores).

Before this change (for a 2-file, 400 particle source, out of which 100 are filtered out on size criteria):

self.mrc_index_to_particles:
0 = [0, 1, 2, ... 199]
1 = [200, 201, ... 399]

After this change:

self.mrc_index_to_particles:
0 = [0, 1, 2, ... 146]
1 = [147, 148, ... 299]

@codecov
Copy link

codecov bot commented Apr 6, 2023

Codecov Report

Merging #906 (5df2baf) into develop (ccd044c) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff            @@
##           develop     #906   +/-   ##
========================================
  Coverage    88.17%   88.18%           
========================================
  Files          119      119           
  Lines        10118    10118           
========================================
+ Hits          8922     8923    +1     
+ Misses        1196     1195    -1     
Impacted Files Coverage Δ
src/aspire/source/coordinates.py 92.20% <100.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Collaborator

@garrettwrong garrettwrong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks!

@vineetbansal vineetbansal merged commit e3145c1 into develop Apr 6, 2023
@garrettwrong garrettwrong added bug Something isn't working enhancement New feature or request cleanup labels Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cleanup enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants