Skip to content

Commit ad57961

Browse files
committed
All za identifiers are now integers, for consistency
1 parent 8202f45 commit ad57961

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+152
-130
lines changed

python/src/section/1/451.python.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void wrapSection_1_451( python::module& module, python::module& viewmodule ) {
4545
section
4646
.def(
4747

48-
python::init< double, double, int, int, int, int,
48+
python::init< int, double, int, int, int, int,
4949
double, double, int, int, int,
5050
double, double, int, int, int,
5151
double, int,

python/src/section/1/452.python.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void wrapSection_1_452( python::module& module, python::module& ) {
4141
.def(
4242

4343
//! @todo pybind11 lambda move custom type workaround
44-
python::init( [] ( double zaid, double awr, Multiplicity multiplicity )
44+
python::init( [] ( int zaid, double awr, Multiplicity multiplicity )
4545
{ return Section( zaid, awr,
4646
std::move( multiplicity ) ); } ),
4747
python::arg( "zaid" ), python::arg( "awr" ), python::arg( "multiplicity" ),

python/src/section/1/455.python.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void wrapSection_1_455( python::module& module, python::module& viewmodule ) {
5656
.def(
5757

5858
//! @todo pybind11 lambda move custom type workaround
59-
python::init( [] ( double zaid, double awr, DecayConstantData constants,
59+
python::init( [] ( int zaid, double awr, DecayConstantData constants,
6060
Multiplicity multiplicity )
6161
{ return Section( zaid, awr,
6262
std::move( constants ),

python/src/section/1/456.python.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void wrapSection_1_456( python::module& module, python::module& ) {
4141
.def(
4242

4343
//! @todo pybind11 lambda move custom type workaround
44-
python::init( [] ( double zaid, double awr, Multiplicity multiplicity )
44+
python::init( [] ( int zaid, double awr, Multiplicity multiplicity )
4545
{ return Section( zaid, awr,
4646
std::move( multiplicity ) ); } ),
4747
python::arg( "zaid" ), python::arg( "awr" ), python::arg( "multiplicity" ),

python/src/section/1/458.python.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ void wrapSection_1_458( python::module& module, python::module& viewmodule ) {
5757
.def(
5858

5959
//! @todo pybind11 lambda move custom type workaround
60-
python::init( [] ( double zaid, double awr,
60+
python::init( [] ( int zaid, double awr,
6161
FissionEnergyReleaseData fissionq )
6262
{ return Section( zaid, awr,
6363
std::move( fissionq ) ); } ),

python/src/section/1/460.python.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ void wrapSection_1_460( python::module& module, python::module& viewmodule ) {
5656
.def(
5757

5858
//! @todo pybind11 lambda move custom type workaround
59-
python::init( [] ( double zaid, double awr,
59+
python::init( [] ( int zaid, double awr,
6060
DelayedPhotonData photons )
6161
{ return Section( zaid, awr,
6262
std::move( photons ) ); } ),

python/src/section/10.python.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void wrapSection_10( python::module& module, python::module& viewmodule ) {
4444
section
4545
.def(
4646

47-
python::init< int, double, double, long,
47+
python::init< int, int, double, long,
4848
std::vector< ReactionProduct >&& >(),
4949
python::arg( "mt" ), python::arg( "zaid" ), python::arg( "awr" ),
5050
python::arg( "lis" ), python::arg( "products" ),

python/src/section/12.python.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void wrapSection_12( python::module& module, python::module& viewmodule ) {
4343
section
4444
.def(
4545

46-
python::init< int, double, double, PhotonProduction&& >(),
46+
python::init< int, int, double, PhotonProduction&& >(),
4747
python::arg( "mt" ), python::arg( "zaid" ), python::arg( "awr" ),
4848
python::arg( "production" ),
4949
"Initialise the section\n\n"

python/src/section/13.python.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void wrapSection_13( python::module& module, python::module& viewmodule ) {
4545
.def(
4646

4747
//! @todo pybind11 lambda move custom type workaround
48-
python::init( [] ( int mt, double zaid, double awr,
48+
python::init( [] ( int mt, int zaid, double awr,
4949
PartialCrossSection partial )
5050
{ return Section( mt, zaid, awr,
5151
std::move( partial ) ); } ),
@@ -62,7 +62,7 @@ void wrapSection_13( python::module& module, python::module& viewmodule ) {
6262
.def(
6363

6464
//! @todo pybind11 lambda move custom type workaround
65-
python::init( [] ( int mt, double zaid, double awr,
65+
python::init( [] ( int mt, int zaid, double awr,
6666
TotalCrossSection total,
6767
std::vector< PartialCrossSection >&& partials )
6868
{ return Section( mt, zaid, awr,

python/src/section/14.python.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void wrapSection_14( python::module& module, python::module& viewmodule ) {
5555
section
5656
.def(
5757

58-
python::init< int, double, double, unsigned int >(),
58+
python::init< int, int, double, unsigned int >(),
5959
python::arg( "mt" ), python::arg( "zaid" ), python::arg( "awr" ),
6060
python::arg( "nk" ),
6161
"Initialise the section for all isotropic photons\n\n"
@@ -68,7 +68,7 @@ void wrapSection_14( python::module& module, python::module& viewmodule ) {
6868
)
6969
.def(
7070

71-
python::init< int, double, double,
71+
python::init< int, int, double,
7272
std::vector< PhotonDistribution >&& >(),
7373
python::arg( "mt" ), python::arg( "zaid" ), python::arg( "awr" ),
7474
python::arg( "photons" ),
@@ -82,7 +82,7 @@ void wrapSection_14( python::module& module, python::module& viewmodule ) {
8282
)
8383
.def(
8484

85-
python::init< int, double, double,
85+
python::init< int, int, double,
8686
std::vector< std::array< double, 2 > >&&,
8787
std::vector< AnisotropicPhotonDistribution >&& >(),
8888
python::arg( "mt" ), python::arg( "zaid" ), python::arg( "awr" ),
@@ -98,7 +98,7 @@ void wrapSection_14( python::module& module, python::module& viewmodule ) {
9898
)
9999
.def(
100100

101-
python::init< int, double, double,
101+
python::init< int, int, double,
102102
std::vector< double >&&,
103103
std::vector< double >&&,
104104
std::vector< AnisotropicPhotonDistribution >&& >(),

python/src/section/15.python.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ void wrapSection_15( python::module& module, python::module& viewmodule ) {
5050
section
5151
.def(
5252

53-
python::init< int, double, double, std::vector< PartialDistribution >&& >(),
53+
python::init< int, int, double, std::vector< PartialDistribution >&& >(),
5454
python::arg( "mt" ), python::arg( "zaid" ), python::arg( "awr" ),
5555
python::arg( "partials" ),
5656
"Initialise the section\n\n"

python/src/section/2/151.python.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void wrapSection_2_151( python::module& module, python::module& viewmodule ) {
105105
section
106106
.def(
107107

108-
python::init< double, double, std::vector< Isotope >&& >(),
108+
python::init< int, double, std::vector< Isotope >&& >(),
109109
python::arg( "zaid" ), python::arg( "awr" ), python::arg( "isotopes" ),
110110
"Initialise the section using isotopes\n\n"
111111
"Arguments:\n"
@@ -116,7 +116,7 @@ void wrapSection_2_151( python::module& module, python::module& viewmodule ) {
116116
)
117117
.def(
118118

119-
python::init< double, double, bool, std::vector< ResonanceRange >&& >(),
119+
python::init< int, double, bool, std::vector< ResonanceRange >&& >(),
120120
python::arg( "zaid" ), python::arg( "awr" ), python::arg( "lfw" ),
121121
python::arg( "ranges" ),
122122
"Initialise the section using a single isotope\n\n"
@@ -129,7 +129,7 @@ void wrapSection_2_151( python::module& module, python::module& viewmodule ) {
129129
)
130130
.def(
131131

132-
python::init< double, double, double, double, double, double >(),
132+
python::init< int, double, double, double, double, double >(),
133133
python::arg( "zaid" ), python::arg( "awr" ), python::arg( "el" ),
134134
python::arg( "eh" ), python::arg( "spin" ), python::arg( "ap" ),
135135
"Initialise the section for the special case (only scattering radius is\n"

python/src/section/2/151/Isotope.python.cpp

+7-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ void wrapIsotope( python::module& module, python::module& viewmodule ) {
3838
component
3939
.def(
4040

41-
python::init< double, double, bool, std::vector< ResonanceRange >&& >(),
41+
python::init< int, double, bool, std::vector< ResonanceRange >&& >(),
4242
python::arg( "zai" ), python::arg( "abn" ), python::arg( "lfw" ),
4343
python::arg( "ranges" ),
4444
"Initialise the component\n\n"
@@ -55,6 +55,12 @@ void wrapIsotope( python::module& module, python::module& viewmodule ) {
5555
&Component::ZAI,
5656
"The ZA identifier of the isotope"
5757
)
58+
.def_property_readonly(
59+
60+
"isotope_identifier",
61+
&Component::isotopeIdentifier,
62+
"The ZA identifier of the isotope"
63+
)
5864
.def_property_readonly(
5965

6066
"ABN",

python/src/section/2/152.python.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void wrapSection_2_152( python::module& module, python::module& ) {
4242
section
4343
.def(
4444

45-
python::init< double, double, bool, int, double,
45+
python::init< int, double, bool, int, double,
4646
std::vector< double >&&, std::vector< double >&&,
4747
std::vector< std::vector< double > >&&,
4848
std::vector< std::vector< double > >&&,

python/src/section/23.python.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ void wrapSection_23( python::module& module, python::module& ) {
2929
section
3030
.def(
3131

32-
python::init< int, double, double, double, double,
32+
python::init< int, int, double, double, double,
3333
std::vector< long >&&, std::vector< long >&&,
3434
std::vector< double >&&, std::vector< double >&& >(),
3535
python::arg( "mt" ), python::arg( "zaid" ), python::arg( "awr" ),

python/src/section/26.python.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ void wrapSection_26( python::module& module, python::module& viewmodule ) {
9292
section
9393
.def(
9494

95-
python::init< int, double, double,
95+
python::init< int, int, double,
9696
std::vector< ReactionProduct >&& >(),
9797
python::arg( "mt" ), python::arg( "zaid" ), python::arg( "awr" ),
9898
python::arg( "products" ),

python/src/section/27.python.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ void wrapSection_27( python::module& module, python::module& ) {
2929
section
3030
.def(
3131

32-
python::init< int, double, double,
32+
python::init< int, int, double,
3333
std::vector< long >&&, std::vector< long >&&,
3434
std::vector< double >&&, std::vector< double >&& >(),
3535
python::arg( "mt" ), python::arg( "zaid" ), python::arg( "awr" ),

python/src/section/28.python.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void wrapSection_28( python::module& module, python::module& viewmodule ) {
4040
section
4141
.def(
4242

43-
python::init< int, double, double, std::vector< SubshellData >&& >(),
43+
python::init< int, int, double, std::vector< SubshellData >&& >(),
4444
python::arg( "mt" ), python::arg( "zaid" ), python::arg( "awr" ),
4545
python::arg( "subshells" ),
4646
"Initialise the section\n\n"

python/src/section/3.python.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ void wrapSection_3( python::module& module, python::module& ) {
2929
section
3030
.def(
3131

32-
python::init< int, double, double, double, double, long,
32+
python::init< int, int, double, double, double, long,
3333
std::vector< long >&&, std::vector< long >&&,
3434
std::vector< double >&&, std::vector< double >&& >(),
3535
python::arg( "mt" ), python::arg( "zaid" ), python::arg( "awr" ),
@@ -52,7 +52,7 @@ void wrapSection_3( python::module& module, python::module& ) {
5252
)
5353
.def(
5454

55-
python::init< int, double, double, double, double,
55+
python::init< int, int, double, double, double,
5656
std::vector< double >&&, std::vector< double >&&,
5757
long, long >(),
5858
python::arg( "mt" ), python::arg( "zaid" ), python::arg( "awr" ),

python/src/section/31.python.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void wrapSection_31( python::module& module, python::module& viewmodule ) {
3333
section
3434
.def(
3535

36-
python::init< int, double, double, std::vector< ReactionBlock >&& >(),
36+
python::init< int, int, double, std::vector< ReactionBlock >&& >(),
3737
python::arg( "mt" ), python::arg( "zaid" ), python::arg( "awr" ),
3838
python::arg( "reactions" ),
3939
"Initialise the section\n\n"

python/src/section/33.python.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void wrapSection_33( python::module& module, python::module& viewmodule ) {
3333
section
3434
.def(
3535

36-
python::init< int, double, double, std::vector< ReactionBlock >&& >(),
36+
python::init< int, int, double, std::vector< ReactionBlock >&& >(),
3737
python::arg( "mt" ), python::arg( "zaid" ), python::arg( "awr" ),
3838
python::arg( "reactions" ),
3939
"Initialise the section\n\n"

python/src/section/34.python.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ void wrapSection_34( python::module& module, python::module& viewmodule ) {
4646
section
4747
.def(
4848

49-
python::init< int, double, double, int,
49+
python::init< int, int, double, int,
5050
std::vector< ReactionBlock >&& >(),
5151
python::arg( "mt" ), python::arg( "zaid" ), python::arg( "awr" ),
5252
python::arg( "ltt" ), python::arg( "reactions" ),

python/src/section/35.python.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void wrapSection_35( python::module& module, python::module& viewmodule ) {
4444
section
4545
.def(
4646

47-
python::init< int, double, double, std::vector< SquareMatrix >&& >(),
47+
python::init< int, int, double, std::vector< SquareMatrix >&& >(),
4848
python::arg( "mt" ), python::arg( "zaid" ), python::arg( "awr" ),
4949
python::arg( "blocks" ),
5050
"Initialise the section\n\n"

python/src/section/4.python.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ void wrapSection_4( python::module& module, python::module& viewmodule ) {
5252
section
5353
.def(
5454

55-
python::init< int, double, double, int, Distributions&& >(),
55+
python::init< int, int, double, int, Distributions&& >(),
5656
python::arg( "mt" ), python::arg( "zaid" ), python::arg( "awr" ),
5757
python::arg( "lct" ), python::arg( "distributions" ),
5858
"Initialise the section\n\n"

python/src/section/40.python.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void wrapSection_40( python::module& module, python::module& viewmodule ) {
4444
section
4545
.def(
4646

47-
python::init< int, double, double, int, std::vector< LevelBlock >&& >(),
47+
python::init< int, int, double, int, std::vector< LevelBlock >&& >(),
4848
python::arg( "mt" ), python::arg( "zaid" ), python::arg( "awr" ),
4949
python::arg( "lis" ), python::arg( "blocks" ),
5050
"Initialise the section\n\n"

python/src/section/5.python.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void wrapSection_5( python::module& module, python::module& viewmodule ) {
6363
section
6464
.def(
6565

66-
python::init< int, double, double, std::vector< PartialDistribution >&& >(),
66+
python::init< int, int, double, std::vector< PartialDistribution >&& >(),
6767
python::arg( "mt" ), python::arg( "zaid" ), python::arg( "awr" ),
6868
python::arg( "partials" ),
6969
"Initialise the section\n\n"

python/src/section/6.python.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ void wrapSection_6( python::module& module, python::module& viewmodule ) {
164164
section
165165
.def(
166166

167-
python::init< int, double, double, int, int,
167+
python::init< int, int, double, int, int,
168168
std::vector< ReactionProduct >&& >(),
169169
python::arg( "mt" ), python::arg( "zaid" ), python::arg( "awr" ),
170170
python::arg( "jp" ), python::arg( "lct" ), python::arg( "products" ),

python/src/section/9.python.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ void wrapSection_9( python::module& module, python::module& viewmodule ) {
4444
section
4545
.def(
4646

47-
python::init< int, double, double, long,
47+
python::init< int, int, double, long,
4848
std::vector< ReactionProduct >&& >(),
4949
python::arg( "mt" ), python::arg( "zaid" ), python::arg( "awr" ),
5050
python::arg( "lis" ), python::arg( "products" ),

python/test/MF2/MT151/Test_ENDFtk_MF2_MT151_Isotope.py

+1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ def verify_chunk( self, chunk ) :
4242

4343
# verify content
4444
self.assertEqual( 26054, chunk.ZAI )
45+
self.assertEqual( 26054, chunk.isotope_identifier )
4546
self.assertAlmostEqual( 1., chunk.ABN )
4647
self.assertAlmostEqual( 1., chunk.abundance )
4748
self.assertEqual( 1, chunk.NER )

python/test/MF2/Test_ENDFtk_MF2_MT152_Section.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def verify_chunk( self, chunk ) :
9797
chunk.to_string( 9437, 2 ) )
9898

9999
# the data is given explicitly - infinite dilution only
100-
chunk = Section( zaid = 94239., awr = 2.369986e+2, lssf = True,
100+
chunk = Section( zaid = 94239, awr = 2.369986e+2, lssf = True,
101101
interpolation = 2, temperature = 0.,
102102
energies = [ 2500., 2550., 30000. ],
103103
total = [ 2.009120e+1, 1.923568e+1, 1.366039e+1 ],
@@ -109,7 +109,7 @@ def verify_chunk( self, chunk ) :
109109
verify_chunk( self, chunk )
110110

111111
# the data is given explicitly - infinite dilution only
112-
chunk = Section( zaid = 94239., awr = 2.369986e+2, lssf = True,
112+
chunk = Section( zaid = 94239, awr = 2.369986e+2, lssf = True,
113113
interpolation = 2, temperature = 0.,
114114
dilutions = [ 1e+10 ], energies = [ 2500., 2550., 30000. ],
115115
total = [ [ 2.009120e+1 ], [ 1.923568e+1 ], [ 1.366039e+1 ] ],

python/test/MF23/Test_ENDFtk_MF23_File.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -121,22 +121,22 @@ def verify_chunk( self, chunk ) :
121121
self.assertEqual( self.chunk + self.valid_FEND,
122122
chunk.to_string( 125 ) )
123123

124-
sorted = [ Section( 1, 1001., 0.9991673, 0., 0.,
124+
sorted = [ Section( 1, 1001, 0.9991673, 0., 0.,
125125
[ 2 ], [ 5 ],
126126
[ 1e-5, 2e+7 ], [ 1., 2. ] ),
127-
Section( 2, 1001., 0.9991673, 0., 0.,
127+
Section( 2, 1001, 0.9991673, 0., 0.,
128128
[ 2 ], [ 2 ],
129129
[ 1e-5, 2e+7 ], [ 3., 4. ] ),
130-
Section( 102, 1001., 0.9991673, 2.224631e+6, 2.224631e+6,
130+
Section( 102, 1001, 0.9991673, 2.224631e+6, 2.224631e+6,
131131
[ 2 ], [ 5 ],
132132
[ 1e-5, 2e+7 ], [ 5., 6. ] ) ]
133-
unsorted = [ Section( 102, 1001., 0.9991673, 2.224631e+6, 2.224631e+6,
133+
unsorted = [ Section( 102, 1001, 0.9991673, 2.224631e+6, 2.224631e+6,
134134
[ 2 ], [ 5 ],
135135
[ 1e-5, 2e+7 ], [ 5., 6. ] ),
136-
Section( 2, 1001., 0.9991673, 0., 0.,
136+
Section( 2, 1001, 0.9991673, 0., 0.,
137137
[ 2 ], [ 2 ],
138138
[ 1e-5, 2e+7 ], [ 3., 4. ] ),
139-
Section( 1, 1001., 0.9991673, 0., 0.,
139+
Section( 1, 1001, 0.9991673, 0., 0.,
140140
[ 2 ], [ 5 ],
141141
[ 1e-5, 2e+7 ], [ 1., 2. ] ) ]
142142

0 commit comments

Comments
 (0)