Skip to content

Conversation

@garrettwrong
Copy link
Collaborator

Adds a file showing equivalent Python commands for a legacy MATLAB workflow run on the 10028 dataset.

[skip ci]
@garrettwrong garrettwrong self-assigned this Sep 5, 2025
@garrettwrong garrettwrong added the documentation Improvements or additions to documentation label Sep 5, 2025
@garrettwrong
Copy link
Collaborator Author

garrettwrong commented Sep 10, 2025

Currently we achieve normalized per image results to about single precision using the script above at 129px. I'm re-running the MATLAB workflow at 179 to confirm that, and expect the same there.

This PR also adds some minor changes to the normalize_psd option and exposes that option at a higher level, though it is still unused by default. I was testing to see if it could resolve the remaining absolute difference between the codes, but I've determined it was not the source of the diff. The changes will make the intermediate PSD closer to the MATLAB if a user decides to use it. (In MATLAB the PSD is computed and returned by one function, and the whitening performed by another which renormalizes the PSD again).

To yield absolute diffs to single precision would require lifting MATLAB's whitening to double precision, and/or otherwise altering the MATLAB code. I narrowed it down to a few lines which can be discussed as needed. Regardless the normalized error is tight. It would have just been nice to get the final absolute tight as well, alas.

I'll confirm the 179 results are where I want them before merging.

@codecov
Copy link

codecov bot commented Sep 10, 2025

Codecov Report

❌ Patch coverage is 40.00000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.60%. Comparing base (b8f1fd7) to head (392ad8e).
⚠️ Report is 5 commits behind head on develop.

Files with missing lines Patch % Lines
src/aspire/noise/noise.py 40.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1323   +/-   ##
========================================
  Coverage    90.60%   90.60%           
========================================
  Files          133      133           
  Lines        14394    14394           
========================================
  Hits         13042    13042           
  Misses        1352     1352           

☔ 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 garrettwrong marked this pull request as ready for review September 10, 2025 17:59
@garrettwrong
Copy link
Collaborator Author

For 179px the script achieved a max abs diff wrt MATLAB with the documented prompts of 0.0021972656 across all pixels of all images in the dataset, which constitutes a relative error of 3.3073989e-06 % when normalized per image.

I will merge this after the CI passes, tag the merged commit for future reference, and notate the same in the issue.

@garrettwrong garrettwrong merged commit 4ee6321 into develop Sep 10, 2025
35 checks passed
@garrettwrong garrettwrong deleted the ppx branch September 10, 2025 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants