njoy / ENDFtk

Toolkit for reading and interacting with ENDF-6 formatted files
Other
33 stars 5 forks source link

MF8 MT457 NT validation #202

Closed thomasms closed 2 months ago

thomasms commented 2 months ago

Hi Wim,

I am trying to use ENDFtk (from develop branch - commit 936a5861fd04f8a7179a59f0f0c3a2091482a3b0) to parse JEFF33 decay data from here.

Running the following script I get an error for MAT 128. image

import argparse
import ENDFtk as tk

def main():
    parser = argparse.ArgumentParser()
    parser.add_argument("decfile")
    args = parser.parse_args()

    tape = tk.tree.Tape.from_file(args.decfile)
    print(f"Found {len(tape.material_numbers)} materials")
    print("Attempting to parse each material...")
    for mat in tape.materials:
        try:
            pmat = mat.parse()
        except Exception:
            print(f"Could not parse {mat.material_number}")

if __name__ == '__main__':
    main()

In this case NT is equal to 8 and according to the implementation here only NT values of 4, 6, and 12 are permitted.

Thanks to a very knowledgeable nuclear data colleague, he noted that NT=8 can be permitted in some cases according to the ENDF manual section 8.4.2 point 5.a: "The amount of additional information depends upon the detail in which quantities were obtained for inclusion in STYP=8. or 9. spectra, and the number of decay modes. (This detail will also be reflected in the uncertainties assigned in STYP=8. or 9. spectra.) If only the total conversion electron emission is calculated, RICC and RICC should be included and NT is specified as 8."

To me this suggests that this could be a bug in ENDFtk, is there any way to include this NT=8 corner case in ENDFtk?

thomasms commented 2 months ago

Whoops duplicate of https://github.com/njoy/ENDFtk/issues/175

whaeck commented 2 months ago

Yes, this is correct. NT can be equal to 8, as I discovered some time ago myself: #175. I've been putting off correcting it, so I'll try to do it today.

As a side note: we will be doing another release soon with a few corrections so I'll try to include this in there as well.

PS: on the GitHub emails, you come up as Tom and I find that confusing as that's my brother's name ;-)

whaeck commented 2 months ago

Whoops duplicate of #175

Don;t worry about it. Makes me want to actually fix it.

thomasms commented 2 months ago

Great thanks for the prompt response. It would be great if this could be corrected, as I am keen to include ENDFtk in my toolchain, but this is kind of blocking me from going full ENDFtk.

I changed my name to JustAnotherTom, to avoid any future confusion 😀