Skip to content

Commit

Permalink
fourier-transformed 2D rectangle map
Browse files Browse the repository at this point in the history
  • Loading branch information
kduxin committed Nov 2, 2022
1 parent 6b6fc2c commit 1efece8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions firelang/map/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from .rect import *
from .fourier import *
17 changes: 17 additions & 0 deletions firelang/map/fourier.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import torch
from .rect import (
SmoothedRectMap,
)

__all__ = [
'SmoothedRectFourier2DMap',
]

class SmoothedRectFourier2DMap(SmoothedRectMap):

@property
def grid(self):
g = SmoothedRectMap.get_grid(self)
assert g.ndim == 2

g = torch.fft.fft2(g).real

0 comments on commit 1efece8

Please sign in to comment.