Skip to content

Commit

Permalink
Merge pull request #82 from chrishavlin/fix_slice_scale
Browse files Browse the repository at this point in the history
fix the reference layer scaling
  • Loading branch information
chrishavlin authored Aug 28, 2023
2 parents f8bde69 + 10392a8 commit efb416b
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 efb416b

Please sign in to comment.