luca-fiorito-11 / sandy

Sampling nuclear data and uncertainty
MIT License
48 stars 29 forks source link

Not in control format #131

Closed AnderGray closed 2 years ago

AnderGray commented 2 years ago

With the newer endfb (and tendl) libraries I keep getting this error:

> sandy n-026_Fe_056.endf 

ERROR:  line ' $Rev:: 1518     $  $Date:: 2018-02-02#$                             1 0  0
' is not in CONTROL format
luca-fiorito-11 commented 2 years ago

Can you just let us know what branch you are using?

AnderGray commented 2 years ago

I believe the master branch, I installed the following way:

    git clone https://github.com/luca-fiorito-11/sandy.git
    cd sandy

    python3 setup.py install --user
luca-fiorito-11 commented 2 years ago

Just to be sure, can you type git status or git branch and make sure you are on master? If you are not, you can switch to master following the installation guide.

For reproducibility purposes, what version of the endf/b or tendl library are you working with?

AnderGray commented 2 years ago

Thanks for taking a look.

Yeah, I'm definitely on master. And I've been testing it out on endf/b viii. Attached is the file.

n-026_Fe_056.txt

luca-fiorito-11 commented 2 years ago

HI @AnderGray ,

I finally found the time to have a look at your problem. SANDY raises an error as it doesn't recognize the file as being formatted according to the ENDF-6 format rules.

Quoting the ENDF-6 manual section 0.6.1:

Finally, a section is divided into records. Every record on a tape contains three identification numbers: MAT, MF, and MT. These numbers are always in increasing numerical order, and the hierarchy is MAT, MF, MT. The end of a section, file, or material is signaled by special records called SEND, FEND, and MEND, respectively.

The file that you attached does not contain any SEND, FEND and MEND special records. These are basically 5 digits at the end of each file line that act as pointers to indicate how many lines of a given section are already parsed. They are practically useless, and apparently ENDF/B-VIII.0 decided to remove them.

In the future we will try and make SANDY less strict regarding format compliancy (this is already implemented in the develop branch, although that branch is not stable enough to produce random samples). For the moment I recommend that you add 5 digits at the end of each line. You can easily do it with sed, as

sed "s/$/11111/" <YOUR_FILE >NEW_COPY

AnderGray commented 2 years ago

Thanks for taking a look! This is very useful and has solved the problem