Skip to content

Quarantine or fix the non-functional BornAgain backend #380

@rozyczko

Description

@rozyczko

Summary

The entire calculators/bornagain/ package is flagged non-functional in its own headers (bornagain/wrapper.py:11-14, bornagain/calculator.py:16-19) and is commented out of registration (calculators/__init__.py:19-24). In its current state it is misleading documentation:

  • It violates the WrapperBase contract: add_item(self, item_name), remove_item(self, item_name), calculate(self, q_array) drop the model_name argument required by the base (bornagain/wrapper.py:277-278 admits it in a comment), assuming a single global model.
  • bornagain/calculator.py:56-133 duplicates calculator_base.py:57-130 nearly line-for-line just to drop the second argument.
  • The resolution conversion is wrong on its own terms: q * (resolution * 0.5 / 100) (bornagain/wrapper.py:300-303) uses 0.5 where FWHM→sigma needs 1/2.355 ≈ 0.425 — about 18% over-smearing relative to the other engines if ever revived.

Suggested fix

Either move the package to a feature branch / attic until it conforms to the n-model wrapper contract, or fix the signatures + resolution factor and re-enable behind a test. Keeping a known-broken engine in src/ invites accidental use and copy-paste of its bugs.

Found during deep code review (DEEP_ANALYSIS.md §3.2, §4.1).

Metadata

Metadata

Assignees

No one assigned

    Labels

    [priority] lowLow importance[scope] maintenanceCode/tooling cleanup, no feature or bugfix (major.minor.PATCH)
    No fields configured for issues without a type.

    Projects

    Status
    Bugs

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions