Skip to content

Complete Preprocessing MATLAB Validation/Repro #1243

Description

@garrettwrong

In the course of attempting to reproduce legacy MATLAB results I found that the Python code was not reproducing MATLAB preprocessed data. The biggest offenders were phase_flip, where our formula was incorrect, and whitening, where we were constructing an entirely different filter.

For both of those, I found the corresponding preprocessing method in MATLAB that consumes and returns an MRC stack. The Python methods were debugged/validated until close results were achieved. The comparisons were demonstrated in a straightforward notebook saving the invocations required to produce results in both languages. The preprocessed data using all Python methods was then usable for my purposes, but I am not sure it is totally reproducing the MATLAB preprocessed data beyond what I documented (ie it was just close enough to move on to bigger problems).

This process needs to be continued for the remaining preprocessing methods.

  • phase_flip
  • whiten (legacy_whiten)
  • downsampling
  • background normalization
  • contrast inversion

Ideally I'd like to see the default invocation reproduce the MATLAB results unless we have very good reason not too. Should that case arise, I still want a legacy wrapper that produces that result. For each method, I want to see a small notebook documenting the calls in MATLAB, and demonstrating the equivalence/closeness. This will be a good opportunity to improve tests for these methods. This notebook should be saved in any related PRs.

When all methods are completed, the entire set of 5 methods, including data files and repros, should be collected and archived for reference.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions