Added surfaces to the reordering of pandas dataframe

This commit is contained in:
Miriam 2020-07-19 20:52:25 +00:00
parent b903775c46
commit 979317f614
2 changed files with 30 additions and 29 deletions

View file

@ -6240,13 +6240,14 @@ class SurfaceMGXS(MGXS):
mesh_str = 'mesh {0}'.format(self.domain.id)
if len(self.domain.dimension) == 1:
df.sort_values(by=[(mesh_str, 'x')] + columns, inplace=True)
df.sort_values(by=[(mesh_str, 'x'), (mesh_str, 'surf')]
+ columns, inplace=True)
elif len(self.domain.dimension) == 2:
df.sort_values(by=[(mesh_str, 'x'),
(mesh_str, 'y')] + columns, inplace=True)
df.sort_values(by=[(mesh_str, 'x'), (mesh_str, 'y'),
(mesh_str, 'surf')] + columns, inplace=True)
elif len(self.domain.dimension) == 3:
df.sort_values(by=[(mesh_str, 'x'),
(mesh_str, 'y'), (mesh_str, 'z')] + columns, inplace=True)
df.sort_values(by=[(mesh_str, 'x'), (mesh_str, 'y'),
(mesh_str, 'z'), (mesh_str, 'surf')] + columns, inplace=True)
return df

View file

@ -180,38 +180,38 @@
3 2 2 1 1 1 total 0.031336 0.001614
mesh 1 group in nuclide mean std. dev.
x y surf
0 1 1 x-min out 1 total 0.0000 0.000000
1 1 1 x-min in 1 total 0.0000 0.000000
2 1 1 x-max out 1 total 0.2738 0.093735
3 1 1 x-max in 1 total 0.1892 0.011302
4 1 1 y-min out 1 total 0.0000 0.000000
5 1 1 y-min in 1 total 0.0000 0.000000
6 1 1 y-max out 1 total 0.2358 0.041204
2 1 1 x-max out 1 total 0.2738 0.093735
1 1 1 x-min in 1 total 0.0000 0.000000
0 1 1 x-min out 1 total 0.0000 0.000000
7 1 1 y-max in 1 total 0.1724 0.009114
16 1 2 x-min out 1 total 0.0000 0.000000
17 1 2 x-min in 1 total 0.0000 0.000000
18 1 2 x-max out 1 total 0.1778 0.010514
6 1 1 y-max out 1 total 0.2358 0.041204
5 1 1 y-min in 1 total 0.0000 0.000000
4 1 1 y-min out 1 total 0.0000 0.000000
19 1 2 x-max in 1 total 0.1822 0.011922
20 1 2 y-min out 1 total 0.1724 0.009114
21 1 2 y-min in 1 total 0.2358 0.041204
22 1 2 y-max out 1 total 0.0000 0.000000
18 1 2 x-max out 1 total 0.1778 0.010514
17 1 2 x-min in 1 total 0.0000 0.000000
16 1 2 x-min out 1 total 0.0000 0.000000
23 1 2 y-max in 1 total 0.0000 0.000000
8 2 1 x-min out 1 total 0.1892 0.011302
9 2 1 x-min in 1 total 0.2738 0.093735
10 2 1 x-max out 1 total 0.0000 0.000000
22 1 2 y-max out 1 total 0.0000 0.000000
21 1 2 y-min in 1 total 0.2358 0.041204
20 1 2 y-min out 1 total 0.1724 0.009114
11 2 1 x-max in 1 total 0.0000 0.000000
12 2 1 y-min out 1 total 0.0000 0.000000
13 2 1 y-min in 1 total 0.0000 0.000000
14 2 1 y-max out 1 total 0.2290 0.038756
10 2 1 x-max out 1 total 0.0000 0.000000
9 2 1 x-min in 1 total 0.2738 0.093735
8 2 1 x-min out 1 total 0.1892 0.011302
15 2 1 y-max in 1 total 0.1894 0.012331
24 2 2 x-min out 1 total 0.1822 0.011922
25 2 2 x-min in 1 total 0.1778 0.010514
26 2 2 x-max out 1 total 0.0244 0.024400
14 2 1 y-max out 1 total 0.2290 0.038756
13 2 1 y-min in 1 total 0.0000 0.000000
12 2 1 y-min out 1 total 0.0000 0.000000
27 2 2 x-max in 1 total 0.0000 0.000000
28 2 2 y-min out 1 total 0.1894 0.012331
29 2 2 y-min in 1 total 0.2290 0.038756
30 2 2 y-max out 1 total 0.0236 0.023600
26 2 2 x-max out 1 total 0.0244 0.024400
25 2 2 x-min in 1 total 0.1778 0.010514
24 2 2 x-min out 1 total 0.1822 0.011922
31 2 2 y-max in 1 total 0.0000 0.000000
30 2 2 y-max out 1 total 0.0236 0.023600
29 2 2 y-min in 1 total 0.2290 0.038756
28 2 2 y-min out 1 total 0.1894 0.012331
mesh 1 delayedgroup group in nuclide mean std. dev.
x y z
0 1 1 1 1 1 total 0.000007 4.734745e-07