These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
Important
SANDY works with files in ENDF-6 format. If you are not familiar with the format, have a look at the ENDF-6 documentation.
SANDY is developed in python3.6
and does not support python2
.
In order to run SANDY, make sure that you have a version of python >= 3.6
installed.
In file requirements.txt
you can find the python dependencies required to ensure
the correct functioning of SANDY.
To read and write ENDF-6 formatted files, SANDY uses some fortran routines. Make sure that you have a valid fortran compiler installed.
SANDY has been developed and tested on a Ubuntu machine.
To download SANDY, move to the folder where you want the source code and type
git clone https://github.com/luca-fiorito-11/sandy.git
To install SANDY, run the following commands
cd sandy
python setup.py install
Once the installation is completed, run pytest
to automatically start SANDY's tests
pytest
More pytest command line options can be added to customize the tests set.
More than 50 tests have been put in place in SANDY, and cover the whole range of data types that the code can process. Their purpose is to check the correct functioning of each basic SANDY unit, as well as to ensure that the implemented physics is correct.
For a list of the existing SANDY test, type
pytest --collect-only
Each name has a self-explanatory name for the function it performs.
For an overview of SANDY's usage type
sandy --help
The code will print out the following message:
usage: python -m sandy.sampling [-h] [--cov COV] [--samples SAMPLES] [--outdir DIR] [--processes PROCESSES] [--max-polynomial MAX_POLYNOMIAL] [--eig N] [--mat {1,..,9999} [{1,..,9999} ...]] [--mf {31,33,34,35} [{31,33,34,35} ...]] [--mt {1,..,999} [{1,..,999} ...]] [--outname OUTNAME] [--debug] file Run sampling positional arguments: file ENDF-6 or PENDF format file optional arguments: -h, --help show this help message and exit --cov COV, -C COV file containing covariances --samples SAMPLES, -S SAMPLES number of samples (default = 200) --outdir DIR, -D DIR target directory where outputs are stored (default = current working directory) if it does not exist it will be created --processes PROCESSES, -N PROCESSES number of worker processes (default = 1) --max-polynomial MAX_POLYNOMIAL, -P MAX_POLYNOMIAL Maximum order of Legendre polynomial coefficients considered for sampling (default = all) --eig N print the first N eigenvalues of the evaluated covariance matrices (default = do not print) --mat {1,..,9999} [{1,..,9999} ...] draw samples only from the selected MAT sections (default = keep all) --mf {31,33,34,35} [{31,33,34,35} ...] draw samples only from the selected MF sections (default = keep all) --mt {1,..,999} [{1,..,999} ...] draw samples only from the selected MT sections (default = keep all) --outname OUTNAME, -O OUTNAME basename for the output files (default is the the basename of <file>.) --debug turn on debug mode
Produce 1000 perturbed copies of a ENDF-6 file <tape>
that contains both
evaluated data and covariances.
sandy <tape> --samples 1000
Below are reported the ENDF-6 data sections that will be perturbed and the respective covariance sections.
Data type | Data section | Covariance section |
---|---|---|
fission multiplicities | MF1 | MF31 |
cross sections | MF3 | MF33 |
angular ditributions | MF4 | MF34 |
energy distributions | MF5 | MF35 |
Important
cross sections will be perturbed only if they are linearized and given in PENDF (pointwise-ENDF) format. To convert a ENDF-6 file into PENDF format, you can use nuclear data processing codes such as NJOY or PREPRO.
Add keyword option --mf
to perturb only few data types.
For example, to produce 1000 perturbed copies of a file <tape>
where
only angular and energy distributions are perturbed, type
sandy <tape> --samples 1000 --mf 34 35
Produce 1000 perturbed copies of a file <tape>
that contains evaluated
data using covariances from file <covtape>
.
sandy <tape> --cov <covtape> --samples 1000
Important
this command is often used for perturbing cross sections, where
the linearized data are in a PENDF file <tape>
that might
not contain covariances and the covariance data are in the original
ENDF-6 file <covtape>
.
ERRORR is a NJOY module that processes the covariance information present in a
ENDF-6 file into a given multigroup structure.
The resulting tabulated covariance is tabulated into an output file with a specific
ERRORR format.
Not only does ERRORR process cross section covariances in MF33
, but it can
also handle the resonance-resonance covariances in ENDF-6 covariance section
MF32
.
To produce 1000 perturbed copies of a PENDF file <pendf_tape>
including the
MF32
covariances for resonance parameters, type
sandy <pendf_tape> --cov <errorr_tape> --samples 1000
where <errorr_tape>
is a ERRORR output file.