Skip to content

Commit

Permalink
Merge pull request #85 from brittonsmith/intersect
Browse files Browse the repository at this point in the history
[bugfix] off by one error in subgrid index calculation
  • Loading branch information
brittonsmith committed Jul 29, 2019
2 parents cccec2b + 8dc0dcd commit 0a5d625
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ env:
TRIDENT_CONFIG=$TRIDENT_ION_DATA/config.tri
YT_GOLD=953248239966
YT_HEAD=master
TRIDENT_GOLD=test-standard-v3
TRIDENT_GOLD=test-standard-v4

before_install:
- |
Expand Down
2 changes: 1 addition & 1 deletion trident/absorption_spectrum/absorption_spectrum.py
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ def _add_lines_to_spectrum(self, field_data, use_peculiar_velocity,
# window in the original spectrum's tau array
else:
intersect_left_index = max(left_index, 0)
intersect_right_index = min(right_index, self.n_lambda-1)
intersect_right_index = min(right_index, self.n_lambda)
EW_tau_deposit = EW_tau[(intersect_left_index - left_index): \
(intersect_right_index - left_index)]
self.tau_field[intersect_left_index:intersect_right_index] \
Expand Down

0 comments on commit 0a5d625

Please sign in to comment.