Skip to content

Commit

Permalink
apply black
Browse files Browse the repository at this point in the history
  • Loading branch information
keflavich committed Jan 30, 2024
1 parent f190248 commit 07c50a5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions reproject/mosaicking/subset_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ def __repr__(self):
@property
def view_in_original_array(self):
if self.kmin is not None:
return (slice(self.kmin, self.kmax), slice(self.jmin, self.jmax), slice(self.imin, self.imax))
return (
slice(self.kmin, self.kmax),
slice(self.jmin, self.jmax),
slice(self.imin, self.imax),
)
else:
return (slice(self.jmin, self.jmax), slice(self.imin, self.imax))

Expand Down Expand Up @@ -96,21 +100,17 @@ def _operation(self, other, op):
# Extract cutout from each

self_array = self.array[
jmin - self.jmin : jmax - self.jmin,
imin - self.imin : imax - self.imin,
jmin - self.jmin : jmax - self.jmin, imin - self.imin : imax - self.imin
]
self_footprint = self.footprint[
jmin - self.jmin : jmax - self.jmin,
imin - self.imin : imax - self.imin,
jmin - self.jmin : jmax - self.jmin, imin - self.imin : imax - self.imin
]

other_array = other.array[
jmin - other.jmin : jmax - other.jmin,
imin - other.imin : imax - other.imin,
jmin - other.jmin : jmax - other.jmin, imin - other.imin : imax - other.imin
]
other_footprint = other.footprint[
jmin - other.jmin : jmax - other.jmin,
imin - other.imin : imax - other.imin,
jmin - other.jmin : jmax - other.jmin, imin - other.imin : imax - other.imin
]

# Carry out operator and store result in ReprojectedArraySubset
Expand Down

0 comments on commit 07c50a5

Please sign in to comment.