Skip to content

Commit ae9efab

Browse files
committed
Adding S and A functions to photoatomic data
1 parent 0803ceb commit ae9efab

3 files changed

Lines changed: 62 additions & 2 deletions

File tree

‎python/src/PhotoatomicTable.python.cpp‎

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,17 +141,41 @@ void wrapPhotoatomicTable( python::module& module, python::module& ) {
141141
&Table::length,
142142
"The total length of the XSS array"
143143
)
144+
.def_property_readonly(
145+
146+
"S",
147+
&Table::S,
148+
"The excited state of the target"
149+
)
150+
.def_property_readonly(
151+
152+
"excited_state",
153+
&Table::excitedState,
154+
"The excited state of the target"
155+
)
144156
.def_property_readonly(
145157

146158
"Z",
147159
&Table::Z,
148-
"The atom number of the element"
160+
"The atom number of the target"
149161
)
150162
.def_property_readonly(
151163

152164
"atom_number",
153165
&Table::atomNumber,
154-
"The atom number of the element"
166+
"The atom number of the target"
167+
)
168+
.def_property_readonly(
169+
170+
"A",
171+
&Table::A,
172+
"The mass number of the target"
173+
)
174+
.def_property_readonly(
175+
176+
"mass_number",
177+
&Table::massNumber,
178+
"The mass number of the target"
155179
)
156180
.def_property_readonly(
157181

‎src/ACEtk/PhotoatomicTable.hpp‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,26 @@ class PhotoatomicTable : protected Table {
133133
*/
134134
unsigned int atomNumber() const { return this->Z(); }
135135

136+
/**
137+
* @brief Return the excited state of the target
138+
*/
139+
unsigned int S() const { return 0; }
140+
141+
/**
142+
* @brief Return the excited state of the target
143+
*/
144+
unsigned int excitedState() const { return 0; }
145+
146+
/**
147+
* @brief Return the mass number of the target
148+
*/
149+
unsigned int A() const { return 0; }
150+
151+
/**
152+
* @brief Return the mass number of the target
153+
*/
154+
unsigned int massNumber() const { return this->A(); }
155+
136156
/**
137157
* @brief Return the number of energy points
138158
*/

‎src/ACEtk/PhotoatomicTable/test/PhotoatomicTable.test.cpp‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,8 +620,12 @@ void verifyChunkMcplib( const PhotoatomicTable& chunk ) {
620620
CHECK_THAT( 0., WithinRel( chunk.temperature() ) );
621621

622622
CHECK( 389 == chunk.length() );
623+
CHECK( 0 == chunk.S() );
624+
CHECK( 0 == chunk.excitedState() );
623625
CHECK( 1 == chunk.Z() );
624626
CHECK( 1 == chunk.atomNumber() );
627+
CHECK( 0 == chunk.A() );
628+
CHECK( 0 == chunk.massNumber() );
625629
CHECK( 43 == chunk.NES() );
626630
CHECK( 43 == chunk.numberEnergyPoints() );
627631
CHECK( 0 == chunk.NFLO() );
@@ -759,8 +763,12 @@ void verifyChunkMcplib03( const PhotoatomicTable& chunk ) {
759763
CHECK_THAT( 0., WithinRel( chunk.temperature() ) );
760764

761765
CHECK( 821 == chunk.length() );
766+
CHECK( 0 == chunk.S() );
767+
CHECK( 0 == chunk.excitedState() );
762768
CHECK( 3 == chunk.Z() );
763769
CHECK( 3 == chunk.atomNumber() );
770+
CHECK( 0 == chunk.A() );
771+
CHECK( 0 == chunk.massNumber() );
764772
CHECK( 82 == chunk.NES() );
765773
CHECK( 82 == chunk.numberEnergyPoints() );
766774
CHECK( 0 == chunk.NFLO() );
@@ -946,8 +954,12 @@ void verifyChunkEprdata12( const PhotoatomicTable& chunk ) {
946954
CHECK_THAT( 0., WithinRel( chunk.temperature() ) );
947955

948956
CHECK( 12025 == chunk.length() );
957+
CHECK( 0 == chunk.S() );
958+
CHECK( 0 == chunk.excitedState() );
949959
CHECK( 1 == chunk.Z() );
950960
CHECK( 1 == chunk.atomNumber() );
961+
CHECK( 0 == chunk.A() );
962+
CHECK( 0 == chunk.massNumber() );
951963
CHECK( 647 == chunk.NES() );
952964
CHECK( 647 == chunk.numberEnergyPoints() );
953965
CHECK( 0 == chunk.NFLO() );
@@ -1338,8 +1350,12 @@ void verifyChunkEprdata14( const PhotoatomicTable& chunk ) {
13381350
CHECK_THAT( 0., WithinRel( chunk.temperature() ) );
13391351

13401352
CHECK( 24009 == chunk.length() );
1353+
CHECK( 0 == chunk.S() );
1354+
CHECK( 0 == chunk.excitedState() );
13411355
CHECK( 6 == chunk.Z() );
13421356
CHECK( 6 == chunk.atomNumber() );
1357+
CHECK( 0 == chunk.A() );
1358+
CHECK( 0 == chunk.massNumber() );
13431359
CHECK( 1210 == chunk.NES() );
13441360
CHECK( 1210 == chunk.numberEnergyPoints() );
13451361
CHECK( 0 == chunk.NFLO() );

0 commit comments

Comments
 (0)