Skip to content

Commit

Permalink
add more details
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnaf-tahmid-chowdhury committed May 17, 2024
1 parent 4e3ebc7 commit 862006c
Showing 1 changed file with 64 additions and 60 deletions.
124 changes: 64 additions & 60 deletions tests/test_material.py
Original file line number Diff line number Diff line change
Expand Up @@ -2131,65 +2131,69 @@ def test_material_photons():
],
rtol=1e-10, atol=0
)
assert mat.photons(True) == [
(31.6, 2.681359313180288e-06),
(34.7, 5.835899681627685e-06),
(41.4, 4.731810552671095e-06),
(41.96, 9.46362110534219e-06),
(51.21, 5.362718626360576e-06),
(54.1, 1.577270184223699e-07),
(54.25, 4.731810552671095e-06),
(72.7, 1.892724221068438e-05),
(74.94, 8.044077939540861e-06),
(96.09, 1.4353158676435657e-05),
(109.19, 0.00026182685058113395),
(115.45, 4.731810552671095e-06),
(120.35, 4.100902478981616e-06),
(136.55, 1.8927242210684386e-06),
(140.76, 3.1545403684473975e-05),
(142.4, 7.886350921118493e-07),
(143.76, 0.0017286881219091737),
(150.93, 1.4195431658013287e-05),
(163.356, 0.0008012532535856387),
(173.3, 9.463621105342193e-07),
(182.62, 6.151353718472424e-05),
(185.715, 0.008990440050075084),
(194.94, 9.936802160609301e-05),
(198.9, 5.678172663205315e-06),
(202.12, 0.00017034517989615943),
(205.316, 0.0007917896324802966),
(215.28, 4.574083534248726e-06),
(221.386, 1.8611788173839642e-05),
(228.78, 1.1040891289565891e-06),
(233.5, 5.993626700050055e-06),
(240.88, 1.167179936325537e-05),
(246.83, 8.674986013230342e-06),
(266.45, 9.463621105342193e-07),
(275.35, 8.044077939540861e-06),
(275.49, 5.047264589515836e-06),
(281.42, 9.463621105342193e-07),
(282.92, 9.463621105342193e-07),
(289.56, 1.1040891289565891e-06),
(291.65, 6.3090807368947945e-06),
(301.7, 7.886350921118493e-07),
(317.1, 1.577270184223699e-07),
(343.5, 4.7318105526710964e-07),
(345.92, 6.3090807368947945e-06),
(356.03, 7.886350921118493e-07),
(387.84, 6.3090807368947945e-06),
(410.29, 4.7318105526710964e-07),
(448.4, 1.577270184223699e-07),
(49.55, 3.7690874952819364e-05),
(113.5, 6.006983195605586e-06),
(93.35, 0.08909065655358435),
(89.953, 0.055075843881425855),
(105.0, 0.04238495112789303),
(13.0, 0.37021714298583336),
(93.35, 6.58812858363439e-05),
(89.953, 4.0727810904027796e-05),
(105.0, 3.134307444166928e-05),
(13.0, 0.42991693068703124),
]
assert_allclose(
mat.photons(True),
[
(31.6, 2.681359313180288e-06),
(34.7, 5.835899681627685e-06),
(41.4, 4.731810552671095e-06),
(41.96, 9.46362110534219e-06),
(51.21, 5.362718626360576e-06),
(54.1, 1.577270184223699e-07),
(54.25, 4.731810552671095e-06),
(72.7, 1.892724221068438e-05),
(74.94, 8.044077939540861e-06),
(96.09, 1.4353158676435657e-05),
(109.19, 0.00026182685058113395),
(115.45, 4.731810552671095e-06),
(120.35, 4.100902478981616e-06),
(136.55, 1.8927242210684386e-06),
(140.76, 3.1545403684473975e-05),
(142.4, 7.886350921118493e-07),
(143.76, 0.0017286881219091737),
(150.93, 1.4195431658013287e-05),
(163.356, 0.0008012532535856387),
(173.3, 9.463621105342193e-07),
(182.62, 6.151353718472424e-05),
(185.715, 0.008990440050075084),
(194.94, 9.936802160609301e-05),
(198.9, 5.678172663205315e-06),
(202.12, 0.00017034517989615943),
(205.316, 0.0007917896324802966),
(215.28, 4.574083534248726e-06),
(221.386, 1.8611788173839642e-05),
(228.78, 1.1040891289565891e-06),
(233.5, 5.993626700050055e-06),
(240.88, 1.167179936325537e-05),
(246.83, 8.674986013230342e-06),
(266.45, 9.463621105342193e-07),
(275.35, 8.044077939540861e-06),
(275.49, 5.047264589515836e-06),
(281.42, 9.463621105342193e-07),
(282.92, 9.463621105342193e-07),
(289.56, 1.1040891289565891e-06),
(291.65, 6.3090807368947945e-06),
(301.7, 7.886350921118493e-07),
(317.1, 1.577270184223699e-07),
(343.5, 4.7318105526710964e-07),
(345.92, 6.3090807368947945e-06),
(356.03, 7.886350921118493e-07),
(387.84, 6.3090807368947945e-06),
(410.29, 4.7318105526710964e-07),
(448.4, 1.577270184223699e-07),
(49.55, 3.7690874952819364e-05),
(113.5, 6.006983195605586e-06),
(93.35, 0.08909065655358435),
(89.953, 0.055075843881425855),
(105.0, 0.04238495112789303),
(13.0, 0.37021714298583336),
(93.35, 6.58812858363439e-05),
(89.953, 4.0727810904027796e-05),
(105.0, 3.134307444166928e-05),
(13.0, 0.42991693068703124),
],
rtol=1e-10, atol=0
)


def test_decay_h3():
Expand Down Expand Up @@ -2333,7 +2337,7 @@ def test_decay_u235_h3():
{},
)
if len(obs) not in [len(exp), len(exp_sf)]:
raise ValueError(f"Observed material length is {len(obs)}, but expected {len(exp)} or {len(exp_sf)}.")
raise ValueError(f"Observed material length is {len(obs)}, but expected {len(exp)} or {len(exp_sf)}. Observed: {obs}. Expected: {exp} or {exp_sf}.")

if len(exp) == len(obs):
# no spontaneous fission
Expand Down

0 comments on commit 862006c

Please sign in to comment.