Issues with EnergyFilter and MeshFilter

I have some questions about the usage of EnergyFilter and MeshFilter. Here are my Tally
settings.

tallies = openmc.Tallies()
mesh = openmc.RegularMesh()
mesh.dimension = [100, 100,100]
mesh.lower_left = [-0.63, -0.63,-0.63]
mesh.upper_right = [0.63, 0.63,0.63]
mesh_filter = openmc.MeshFilter(mesh)
energy_filter = openmc.EnergyFilter([0,0.025,2e6])
tally = openmc.Tally(name=‘flux’,tally_id=1)
tally.filters = [mesh_filter,energy_filter]
tally.scores = [‘flux’]
tallies.append(tally)
tallies.export_to_xml()

I have a total of 1e6 mesh bins and two energy ranges. So, when reading the results, there should be 2e6 values (1e6 * 2). At this point, I use reshape([100,100,100,2]).

sp = openmc.StatePoint(‘statepoint.30.h5’)
tally = sp.get_tally(name=“flux”)
flux = tally.get_slice(scores=[“flux”])
goal_array=flux.get_values().reshape([100,100,100,2])

I’m not entirely sure about the indices. Does the ‘2’ here represent energy? The first three ‘100’ represent the number of mesh bins along the x, y, and z axes, respectively. Also, I’m a bit confused about the index order for the mesh. Is goal_array[0][0][0][0] referring to the tally count in the first energy range for the bottom-left corner of the model (i.e., [0] is the first mesh bin along the x-axis, which corresponds to the leftmost side of the model, and [99] is the rightmost mesh bin along the x-axis)? Is my understanding correct? Finally, I would like to know if MeshFilter can be used together with MaterialFilter. If so, when the mesh doesn’t have that material, is the mean value directly set to 0? Thank you very much for your help. :slightly_smiling_face: