Skip to content

Commit

Permalink
Move test away from absorption edge
Browse files Browse the repository at this point in the history
  • Loading branch information
jgray-19 committed Feb 14, 2024
1 parent bf91fdf commit 9e1f790
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/scatter/scatter_ray.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
ls = self.lengths; idxs = self.indices;

% Get the mean free path of the first intersection
mfps = self.voxels.get_saved_mfp(idxs, self.mfp_dict);
mfps = self.voxels.get_saved_mfp(idxs, self.mfp_dict);

% Check if the ray scatters at all
ray_nmfp = self.n_mfp - cumsum(ls ./ mfps);
Expand Down
2 changes: 1 addition & 1 deletion tests/attenuation_tests.m
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function test_air_by_z(tc)
air = @(e) air_mat.get_mu(e*1000);
tc.verifyEqual(air(1e-3 ), 3.606E+03 * 1.205E-03, "RelTol", 1e-3)
tc.verifyEqual(air(1.5e-3 ), 1.191E+03 * 1.205E-03, "RelTol", 1e-3)
tc.verifyEqual(air(3.2030E-03), 1.485E+02 * 1.205E-03, "RelTol", 1e-3) % Check this is because of the absorption edge
tc.verifyEqual(air(3.2035E-03), 1.485E+02 * 1.205E-03, "RelTol", 1e-3) % Check this is because of the absorption edge
tc.verifyEqual(air(2e-2 ), 7.779E-01 * 1.205E-03, "RelTol", 1e-3)
tc.verifyEqual(air(6e-2 ), 1.875E-01 * 1.205E-03, "RelTol", 1e-3)
tc.verifyEqual(air(3e-1 ), 1.067E-01 * 1.205E-03, "RelTol", 1e-3)
Expand Down

0 comments on commit 9e1f790

Please sign in to comment.