Skip to content

Commit

Permalink
Bug fix in directions.
Browse files Browse the repository at this point in the history
  • Loading branch information
ErnstRoell committed Jul 4, 2024
1 parent 871e5ba commit 109eac2
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions dect/directions.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def generate_uniform_2d_directions(num_thetas: int = 64):
return v


def generate_multiview_directions(num_thetas: int, bump_steps: int, d: int):
def generate_multiview_directions(num_thetas: int, d: int):
"""
Generates multiple sets of structured directions in n dimensions.
Expand All @@ -66,11 +66,18 @@ def generate_multiview_directions(num_thetas: int, bump_steps: int, d: int):
channel consists of a structured ect along a hyperplane. For the 3-d case we
would obtain a 3 channel ect with direction sampled along the xy, xz and yz
planes in three dimensions.
Parameters
----------
num_thetas: int
The number of directions to generate.
d: int
The dimension of the unit sphere. Default is 3 (hence R^3)
"""
w = torch.vstack(
[
torch.sin(torch.linspace(0, 2 * torch.pi, bump_steps)),
torch.cos(torch.linspace(0, 2 * torch.pi, bump_steps)),
torch.sin(torch.linspace(0, 2 * torch.pi, num_thetas)),
torch.cos(torch.linspace(0, 2 * torch.pi, num_thetas)),
]
)

Expand Down

0 comments on commit 109eac2

Please sign in to comment.