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).
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:add_item(self, item_name),remove_item(self, item_name),calculate(self, q_array)drop themodel_nameargument required by the base (bornagain/wrapper.py:277-278admits it in a comment), assuming a single global model.bornagain/calculator.py:56-133duplicatescalculator_base.py:57-130nearly line-for-line just to drop the second argument.q * (resolution * 0.5 / 100)(bornagain/wrapper.py:300-303) uses0.5where FWHM→sigma needs1/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 /
atticuntil 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 insrc/invites accidental use and copy-paste of its bugs.Found during deep code review (DEEP_ANALYSIS.md §3.2, §4.1).