Repository navigation
Fix wrong mult factor for absorption in Single_crystal - #2880
Conversation
|
@antoinepado thanks once more, I think your corrections are right. They do however shift output orders of magnitude so I will leave to @farhi to:
(Especially since we are right before a new release.) |
|
@antoinepado, @farhi says we should wait - putting your PR in draft to not merge by chance. ;-) Will make it to 3.10.1 or something like that. |
|
Hi @willend and @antoinepado I think we can wait for after the release. This PR will definitively change many test values by orders. It can already be seen from the X/Test_PowderN examples:
The index=2 is for the SX, and is typically a factor 100 too small. This test is currently off. |
|
Review + estimated new targets (generated with Claude Code, checked by @willend). Verdict: the fix is correct. One correction to the description: the old error did not cancel out. Downstream,
Measured shift. "Stock" is a single 1e6-ray run (seed 1000). "New target" is the inverse-variance weighted mean of 3 runs at 1e6 rays (seeds 1001, 2002, 3003) and 1 run at 1e7 rays (seed 4004), all with the fixed component:
These target updates are pushed to this PR as commit SX examples kept disabled (commit
Unchanged: Locally, this also fixes the "factor ~100 too small" SX result in Open question (not verified, separate from this PR): Note: in the SSRL white_src runs the 1e6 results spread a little more than their error bars suggest (1.54e10 to 1.68e10), so CI's tolerance may need to absorb a few percent there. |
…t fix Targets are inverse-variance weighted means of 3x 1e6 (seeds 1001, 2002, 3003) and 1x 1e7 (seed 4004) runs with the fixed component. SSRL white_src target raised ~390x (barns=1 absorption was 100x too strong). Re-enable SX examples in Test_PowderN (index=2) and Test_FluoPowder (index=2). SSRL not_white_src value updated, left disabled as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ption fix Each point is the inverse-variance weighted mean of two 1e7-ray scans (seeds 11, 22) with the fixed component; seeds agree within 6%. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
I think the above sentence is wrong. We can see that the the error where 10E is used instead of 1E cancels out no? The main fix is the corrected conversion though, not the 10E to 1E mistake that had no change in practice. |
Two fixes have been done.$$cm^2$$ to barns and from $$cm^2$$ to $$fm^2$$ . Here is my understanding:
$$1 barn = 10^{-28} m^2$$
$$1 femtometre = 10^{-15} m$$
First, in the abs_xsect variable 10E was used instead of 1E, this changes nothing in practice as this error cancelled out.
Secondly, the bigger change is the conversion from
We have
and
To convert$$cm^2$$ to barns:
$$1 cm^2 = 10^{-2} m \cdot 10^{-2} m = 10^{-4} m^2$$ $$10^{24} \cdot 10^{-24}$$ both sides and we have
$$10^{24} \cdot 10^{-24} \cdot 1 cm^2 = 10^{24} \cdot 10^{-24} \cdot 10^{-4} m^2$$
$$1 cm^2 = 10^{24} \cdot 10^{-28} m^2$$
$$1 cm^2 = 10^{24} \cdot barn$$
So we multiply by
And to convert$$cm^2$$ to $$fm^2$$ :
$$1 cm^2 = 10^{-2} m \cdot 10^{-2} m = 10^{-4} m^2$$ $$10^{26} \cdot 10^{-26}$$ both sides and we have
$$10^{26} \cdot 10^{-26} \cdot 1 cm^2 = 10^{26} \cdot 10^{-26} \cdot 10^{-4} m^2$$
$$1 cm^2 = 10^{26} \cdot 10^{-30} m^2$$
$$1 cm^2 = 10^{26} \cdot fm^{2}$$
So we multiply by
Please let me know if I have misunderstood something. Thank you.