Skip to content

Conversation

@garrettwrong
Copy link
Collaborator

Brings us about 2A closer to MATLAB's recon. This appears to have been most of the remaining discrepancy in the 3D pipeline following orientation estimation. After porting over pages of code and intermediate results from MATLAB to make things match numerically I was able to work backwards down to a very small set of changes.

Two major problems.

  • Our PFT was backwards from MATLAB, which appears to matter for finding shifts more than other things...
  • The equation generating code was wrong, again.

Minor problems.

  • The memory bounds were different. They are still implemented slightly differently. I modified them minimally to repro the default MATLAB limit.
  • Offset search spaces are different between the MATLAB workflow and Python. Python has been developed to use a scaling ratio, while MATLAB hardcodes to 15 pixels and a fixed step. In practice for the ribosome Python default results in 21 pixels and the same step; I'm running a recon now to see if this makes any practical difference (probably not, but MATLAB's would be faster for real data....).

A note about solving for shifts... With a capable modern machine we can actually fit the entire system of equations for a few thousand images and solve it quickly. IMO its probably worth just doing that when we can, but not right now.

@garrettwrong garrettwrong self-assigned this Nov 14, 2025
@garrettwrong garrettwrong added bug Something isn't working duplicate This issue or pull request already exists labels Nov 14, 2025
@codecov
Copy link

codecov bot commented Nov 14, 2025

Codecov Report

❌ Patch coverage is 96.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.65%. Comparing base (34f82da) to head (7bc6ad2).

Files with missing lines Patch % Lines
src/aspire/abinitio/commonline_base.py 95.65% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1338   +/-   ##
========================================
  Coverage    90.65%   90.65%           
========================================
  Files          134      134           
  Lines        14431    14429    -2     
========================================
- Hits         13082    13081    -1     
+ Misses        1349     1348    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@garrettwrong
Copy link
Collaborator Author

Confirmed the Yeast dataset is also improved. The gallery published recon script for 10073 dataset now yields a better recon FSC score than published in the JSB paper, even with the other remaining known opportunities for improvement in ASPIRE-Python.

Got bogged down with some tests and creating an issue #1340 . I just need self review this then I'll open it up.

@garrettwrong garrettwrong requested a review from j-c-c November 17, 2025 16:00
j-c-c
j-c-c previously approved these changes Nov 18, 2025
Copy link
Collaborator

@j-c-c j-c-c 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!

@garrettwrong garrettwrong marked this pull request as ready for review November 19, 2025 13:19
@garrettwrong garrettwrong requested a review from janden as a code owner November 19, 2025 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working duplicate This issue or pull request already exists

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants