Skip to content

Issue when chaining commands #190

@thomasms

Description

@thomasms

Using U235 from ENDF-B-VIII.0 (n-092_U_235.endf) with the njoy file below I notice some issues when trying to parse the output (tape50) in ENDFtk.

moder
20 -30
reconr
-30 -21 /
'reconstructed u235' /
9228 /
0.001 /
0 /
broadr
-30 -21 -22
9228 /
0.01 /
300 /
0 /
heatr
-30 -22 -23 0 /
9228 3 /
302 318 402 /
moder
-23 50
stop

It seems strange to me, although perhaps I have made a mistake :), that the following produces a seg fault.

import ENDFtk as tk
x = tk.tree.Tape.from_file('./tape50').materials.front().section(3,2).parse()

whereas doing this in the more verbose way as below, produces no error.

import ENDFtk as tk

tape = tk.tree.Tape.from_file('./tape50')
mat = tape.materials.front()
mf3_mt2 = mat.section(3, 2).parse()
print(mf3_mt2.energies.to_list())

Note my system is: python3.11 with ENDFtk compiled from source on Ubuntu 20.04 with gcc 9.4.0.

Am I misunderstanding the ENDFtk API or could this be a bug?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions