From 325bb9ab0b76bc53a0a0fbcbfb875a7824db2e36 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 13 Aug 2025 15:46:05 +0700 Subject: [PATCH 1/2] Fix parsing of MF=6, LAW=2 --- src/endf/mf6.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/endf/mf6.py b/src/endf/mf6.py index 15949c9..a1d9aeb 100644 --- a/src/endf/mf6.py +++ b/src/endf/mf6.py @@ -120,11 +120,12 @@ def dict_from_endf(file_obj: TextIO) -> dict: for i in range(NE): items, values = get_list_record(file_obj) _, E_i, LANG, _, NW, NL = items - dist = {'LANG': LANG, 'NW': NW, 'NL': NL} + dist = {'LANG': LANG, 'NW': NW, 'NL': NL, 'A_l': np.asarray(values)} data['E'][i] = E_i - data['A_l'] = np.asarray(values) data['distribution'].append(dist) + return data + class ChargedParticleElasticScattering: def __init__(self): From 28f9f1830f9baf6309455970b6f6930c7edf5002 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Wed, 13 Aug 2025 15:46:26 +0700 Subject: [PATCH 2/2] Update copyright and link to ENDF-6 manual --- LICENSE | 2 +- doc/source/conf.py | 2 +- src/endf/__init__.py | 2 +- src/endf/ace.py | 2 +- src/endf/data.py | 2 +- src/endf/fileutils.py | 2 +- src/endf/function.py | 2 +- src/endf/incident_neutron.py | 2 +- src/endf/material.py | 6 +++--- src/endf/mf1.py | 2 +- src/endf/mf12.py | 2 +- src/endf/mf13.py | 2 +- src/endf/mf14.py | 2 +- src/endf/mf15.py | 2 +- src/endf/mf2.py | 2 +- src/endf/mf23.py | 2 +- src/endf/mf26.py | 2 +- src/endf/mf27.py | 2 +- src/endf/mf28.py | 2 +- src/endf/mf3.py | 2 +- src/endf/mf33.py | 2 +- src/endf/mf34.py | 2 +- src/endf/mf4.py | 2 +- src/endf/mf40.py | 2 +- src/endf/mf5.py | 2 +- src/endf/mf6.py | 2 +- src/endf/mf7.py | 2 +- src/endf/mf8.py | 2 +- src/endf/mf9.py | 2 +- src/endf/reaction.py | 2 +- 30 files changed, 32 insertions(+), 32 deletions(-) diff --git a/LICENSE b/LICENSE index 4c64798..fae1118 100644 --- a/LICENSE +++ b/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2023 Paul Romano +Copyright (c) 2023-2025 Paul Romano Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/doc/source/conf.py b/doc/source/conf.py index 2b2d0c0..c0fe654 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -9,7 +9,7 @@ from importlib.metadata import version as metadata_version project = 'ENDF Python Interface' -copyright = '2023, Paul Romano' +copyright = '2023-2025, Paul Romano' author = 'Paul Romano' release = metadata_version('endf') diff --git a/src/endf/__init__.py b/src/endf/__init__.py index 312d542..8c60032 100644 --- a/src/endf/__init__.py +++ b/src/endf/__init__.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Paul Romano +# SPDX-FileCopyrightText: 2023-2025 Paul Romano # SPDX-License-Identifier: MIT from importlib.metadata import version, PackageNotFoundError diff --git a/src/endf/ace.py b/src/endf/ace.py index 3554bc7..290d37e 100644 --- a/src/endf/ace.py +++ b/src/endf/ace.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 OpenMC contributors and Paul Romano +# SPDX-FileCopyrightText: 2023-2025 OpenMC contributors and Paul Romano # SPDX-License-Identifier: MIT """This module is for reading ACE-format cross sections. ACE stands for "A diff --git a/src/endf/data.py b/src/endf/data.py index 6891587..9af4204 100644 --- a/src/endf/data.py +++ b/src/endf/data.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Paul Romano +# SPDX-FileCopyrightText: 2023-2025 Paul Romano # SPDX-License-Identifier: MIT import re diff --git a/src/endf/fileutils.py b/src/endf/fileutils.py index 038192a..3e02c75 100644 --- a/src/endf/fileutils.py +++ b/src/endf/fileutils.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Paul Romano +# SPDX-FileCopyrightText: 2023-2025 Paul Romano # SPDX-License-Identifier: MIT import os diff --git a/src/endf/function.py b/src/endf/function.py index 9c0a38b..1fa05db 100644 --- a/src/endf/function.py +++ b/src/endf/function.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 OpenMC contributors and Paul Romano +# SPDX-FileCopyrightText: 2023-2025 OpenMC contributors and Paul Romano # SPDX-License-Identifier: MIT from collections.abc import Iterable diff --git a/src/endf/incident_neutron.py b/src/endf/incident_neutron.py index 85de8db..5ee1eff 100644 --- a/src/endf/incident_neutron.py +++ b/src/endf/incident_neutron.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Paul Romano +# SPDX-FileCopyrightText: 2023-2025 Paul Romano # SPDX-License-Identifier: MIT from __future__ import annotations diff --git a/src/endf/material.py b/src/endf/material.py index d8638ac..3965603 100644 --- a/src/endf/material.py +++ b/src/endf/material.py @@ -1,12 +1,12 @@ -# SPDX-FileCopyrightText: 2023 OpenMC contributors and Paul Romano +# SPDX-FileCopyrightText: 2023-2025 OpenMC contributors and Paul Romano # SPDX-License-Identifier: MIT """Module for parsing and manipulating data from ENDF files. All the classes and functions in this module are based on the ENDF-102 report titled "ENDF-6 Formats Manual: Data Formats and Procedures for the Evaluated -Nuclear Data Files". The version from January 2018 can be found at -https://doi.org/10.2172/1425114. +Nuclear Data Files". The version from September 2023 can be found at +https://doi.org/10.2172/2007538. """ import io diff --git a/src/endf/mf1.py b/src/endf/mf1.py index 269d6a3..24dee65 100644 --- a/src/endf/mf1.py +++ b/src/endf/mf1.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Paul Romano +# SPDX-FileCopyrightText: 2023-2025 Paul Romano # SPDX-License-Identifier: MIT from typing import TextIO diff --git a/src/endf/mf12.py b/src/endf/mf12.py index 3b1f1ad..d7aa5f8 100644 --- a/src/endf/mf12.py +++ b/src/endf/mf12.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Paul Romano +# SPDX-FileCopyrightText: 2023-2025 Paul Romano # SPDX-License-Identifier: MIT from typing import TextIO diff --git a/src/endf/mf13.py b/src/endf/mf13.py index 2b8ae4d..23489c3 100644 --- a/src/endf/mf13.py +++ b/src/endf/mf13.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Paul Romano +# SPDX-FileCopyrightText: 2023-2025 Paul Romano # SPDX-License-Identifier: MIT from typing import TextIO diff --git a/src/endf/mf14.py b/src/endf/mf14.py index 821a876..35e426f 100644 --- a/src/endf/mf14.py +++ b/src/endf/mf14.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Paul Romano +# SPDX-FileCopyrightText: 2023-2025 Paul Romano # SPDX-License-Identifier: MIT from typing import TextIO diff --git a/src/endf/mf15.py b/src/endf/mf15.py index a2ebdd9..8117313 100644 --- a/src/endf/mf15.py +++ b/src/endf/mf15.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Paul Romano +# SPDX-FileCopyrightText: 2023-2025 Paul Romano # SPDX-License-Identifier: MIT from typing import TextIO diff --git a/src/endf/mf2.py b/src/endf/mf2.py index bbb069c..042519e 100644 --- a/src/endf/mf2.py +++ b/src/endf/mf2.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Paul Romano +# SPDX-FileCopyrightText: 2023-2025 Paul Romano # SPDX-License-Identifier: MIT from typing import TextIO diff --git a/src/endf/mf23.py b/src/endf/mf23.py index 4af0829..2cb3f2d 100644 --- a/src/endf/mf23.py +++ b/src/endf/mf23.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Paul Romano +# SPDX-FileCopyrightText: 2023-2025 Paul Romano # SPDX-License-Identifier: MIT from typing import TextIO diff --git a/src/endf/mf26.py b/src/endf/mf26.py index b8e59c7..f3f5585 100644 --- a/src/endf/mf26.py +++ b/src/endf/mf26.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Paul Romano +# SPDX-FileCopyrightText: 2023-2025 Paul Romano # SPDX-License-Identifier: MIT from typing import TextIO diff --git a/src/endf/mf27.py b/src/endf/mf27.py index 55b1d21..2d5e397 100644 --- a/src/endf/mf27.py +++ b/src/endf/mf27.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Paul Romano +# SPDX-FileCopyrightText: 2023-2025 Paul Romano # SPDX-License-Identifier: MIT from typing import TextIO diff --git a/src/endf/mf28.py b/src/endf/mf28.py index 62b37df..04c14f4 100644 --- a/src/endf/mf28.py +++ b/src/endf/mf28.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Paul Romano +# SPDX-FileCopyrightText: 2023-2025 Paul Romano # SPDX-License-Identifier: MIT from typing import TextIO diff --git a/src/endf/mf3.py b/src/endf/mf3.py index d3a23d8..c25d446 100644 --- a/src/endf/mf3.py +++ b/src/endf/mf3.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Paul Romano +# SPDX-FileCopyrightText: 2023-2025 Paul Romano # SPDX-License-Identifier: MIT from typing import TextIO diff --git a/src/endf/mf33.py b/src/endf/mf33.py index d23e7d4..066e5d9 100644 --- a/src/endf/mf33.py +++ b/src/endf/mf33.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Paul Romano +# SPDX-FileCopyrightText: 2023-2025 Paul Romano # SPDX-License-Identifier: MIT from typing import TextIO diff --git a/src/endf/mf34.py b/src/endf/mf34.py index 8aa08ca..cf30ed5 100644 --- a/src/endf/mf34.py +++ b/src/endf/mf34.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Paul Romano +# SPDX-FileCopyrightText: 2023-2025 Paul Romano # SPDX-License-Identifier: MIT from typing import TextIO diff --git a/src/endf/mf4.py b/src/endf/mf4.py index b82faa2..800dcb3 100644 --- a/src/endf/mf4.py +++ b/src/endf/mf4.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Paul Romano +# SPDX-FileCopyrightText: 2023-2025 Paul Romano # SPDX-License-Identifier: MIT from __future__ import annotations diff --git a/src/endf/mf40.py b/src/endf/mf40.py index dc28dc3..79099f9 100644 --- a/src/endf/mf40.py +++ b/src/endf/mf40.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Paul Romano +# SPDX-FileCopyrightText: 2023-2025 Paul Romano # SPDX-License-Identifier: MIT from typing import TextIO diff --git a/src/endf/mf5.py b/src/endf/mf5.py index e279036..397fc6a 100644 --- a/src/endf/mf5.py +++ b/src/endf/mf5.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Paul Romano +# SPDX-FileCopyrightText: 2023-2025 Paul Romano # SPDX-License-Identifier: MIT from abc import ABC diff --git a/src/endf/mf6.py b/src/endf/mf6.py index a1d9aeb..82dae36 100644 --- a/src/endf/mf6.py +++ b/src/endf/mf6.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Paul Romano +# SPDX-FileCopyrightText: 2023-2025 Paul Romano # SPDX-License-Identifier: MIT from typing import TextIO diff --git a/src/endf/mf7.py b/src/endf/mf7.py index 4d453dc..7c80e42 100644 --- a/src/endf/mf7.py +++ b/src/endf/mf7.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Paul Romano +# SPDX-FileCopyrightText: 2023-2025 Paul Romano # SPDX-License-Identifier: MIT from typing import TextIO diff --git a/src/endf/mf8.py b/src/endf/mf8.py index f2c4a80..19364fd 100644 --- a/src/endf/mf8.py +++ b/src/endf/mf8.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Paul Romano +# SPDX-FileCopyrightText: 2023-2025 Paul Romano # SPDX-License-Identifier: MIT from typing import TextIO diff --git a/src/endf/mf9.py b/src/endf/mf9.py index 45e781b..dc0bdb8 100644 --- a/src/endf/mf9.py +++ b/src/endf/mf9.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 Paul Romano +# SPDX-FileCopyrightText: 2023-2025 Paul Romano # SPDX-License-Identifier: MIT from typing import TextIO diff --git a/src/endf/reaction.py b/src/endf/reaction.py index 72cbf6d..8c0e0fb 100644 --- a/src/endf/reaction.py +++ b/src/endf/reaction.py @@ -1,4 +1,4 @@ -# SPDX-FileCopyrightText: 2023 OpenMC contributors and Paul Romano +# SPDX-FileCopyrightText: 2023-2025 OpenMC contributors and Paul Romano # SPDX-License-Identifier: MIT from __future__ import annotations