Skip to content

Commit

Permalink
correct the aspect_ratio correction
Browse files Browse the repository at this point in the history
  • Loading branch information
chrishavlin committed Aug 28, 2023
1 parent f8bde69 commit 10392a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/yt_napari/_model_ingestor.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ def calculate_scale(self, other_layer: LayerDomain) -> unyt_array:
sc = other_layer.grid_width / self.grid_width
sc[sc == 0] = 1.0

# we also need to multiply by the initial reference layer aspect ratio
# to account for any initial distortion.
return sc * self.aspect_ratio
# we also need to account for any initial distortion relative to ref
# layer
return sc / self.aspect_ratio

def calculate_translation(self, other_layer: LayerDomain) -> unyt_array:
# get the translation vector for another layer relative to the left edge
Expand Down

0 comments on commit 10392a8

Please sign in to comment.