Skip to content

Commit

Permalink
Fix dimensions in Athena too
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewturk committed Feb 16, 2024
1 parent a38ec70 commit dd0e536
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions yt/frontends/athena/data_structures.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,14 +327,15 @@ def _parse_index(self):
self.dataset.domain_center = 0.5 * (
self.dataset.domain_left_edge + self.dataset.domain_right_edge
)
self.dataset.domain_dimensions = np.round(
self.dataset.domain_width / gdds[0]
).astype("int64")
domain_dimensions = np.round(self.dataset.domain_width / gdds[0]).astype(
"int64"
)

if self.dataset.dimensionality <= 2:
self.dataset.domain_dimensions[2] = 1
domain_dimensions[2] = 1
if self.dataset.dimensionality == 1:
self.dataset.domain_dimensions[1] = 1
domain_dimensions[1] = 1
self.dataset.domain_dimensions = domain_dimensions

dle = self.dataset.domain_left_edge
dre = self.dataset.domain_right_edge
Expand Down

0 comments on commit dd0e536

Please sign in to comment.