Skip to content

Commit

Permalink
Delete applyWeights
Browse files Browse the repository at this point in the history
  • Loading branch information
nbren12 committed Sep 9, 2024
1 parent a9185bd commit 8248763
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions earth2grid/healpix.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,21 +231,6 @@ def _convert_xyindex(nside: int, src: XY, dest: XY, i):
return i


def ApplyWeights(pix: torch.Tensor, weight: torch.Tensor):
# the first dim is the 4 point stencil
# TODO delete
p, *shape = pix.shape

pix = pix.view(p, -1).T
weight = weight.view(p, -1).T

regridder = Regridder(pix.shape[:-1], p=pix.shape[1])
regridder.to(weight)
regridder.index.copy_(pix)
regridder.weight.copy_(weight)
return regridder


@dataclass
class Grid(base.Grid):
"""A Healpix Grid
Expand Down

0 comments on commit 8248763

Please sign in to comment.