Open valeriaRaffuzzi opened 6 months ago
Hi, and welcome to PyNE! :wave: Thanks for opening your first issue. We recommend that you include information such as the version of PyNE you're working with (eg, develop branch or a specific version), the platform you are operating on, the expected behavior, and the actual behavior you are bringing our attention to. The more deatil you provide, the better others in this community will be able to help you.
Describe the Bug
The function
read
in the classIsotxs
in cccc.py to read multi group cross sections from the NJOY ISOTXS format returns wrong scattering matrices (at least when using the NJOY scattering matrix compacting flag IFOPT =1; I haven't tried with IFOPT = 2). Matrices are built by the function_read_nuclide_scatter
, and stored insidenuc.micros["scat", block, g, fromg, order]
. When trying to read fromnuc.micros["scat",` block, g, fromg, order]
, the scattering matrices are wrong; the fix is to swap the loopsfor order in range(lordn):
andfor j in range(jl, ju + 1):
inside_read_nuclide_scatter
. That worked for me.To Reproduce
Given an NJOY output
tape25
, formatted into ISOTXS format with flag IFOPT = 1, one can read it by:If then you plot
P0scatt[gin,gout,block]
, whereblock
corresponds to a different scattering reaction (0: inelastic, 1: elastic, 2: n2n, 3: total scattering), the matrix will look unphysical.Screenshots or Code Snippets
The cccc.py code (lines approx. 360-380) could become:
NOTE: my solution works when IFOPT = 1, but I haven't tried with the NJOY flag IFOPT = 2. It should be tried before changing things!