Skip to content

Commit

Permalink
rename to neighbor degree for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
rhayes777 committed Nov 8, 2024
1 parent 9b2fa7a commit 0a93055
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions autolens/point/solver/point_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def solve(
tracer: OperateDeflections,
source_plane_coordinate: Tuple[float, float],
source_plane_redshift: Optional[float] = None,
neighbor_order: int = 0,
neighbor_degree: int = 0,
) -> aa.Grid2DIrregular:
"""
Solve for the image plane coordinates that are traced to the source plane coordinate.
Expand All @@ -37,7 +37,7 @@ def solve(
Parameters
----------
neighbor_order
neighbor_degree
The number of times recursively add neighbors for the triangles that contain
the source plane coordinate.
source_plane_coordinate
Expand All @@ -57,7 +57,7 @@ def solve(
source_plane_redshift=source_plane_redshift,
)

for _ in range(neighbor_order):
for _ in range(neighbor_degree):
kept_triangles = kept_triangles.neighborhood()

filtered_means = self._filter_low_magnification(
Expand Down
6 changes: 3 additions & 3 deletions test_autolens/point/triangles/test_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def test_real_example(grid, tracer):


@pytest.mark.parametrize(
"neighbor_order, expected",
"neighbor_degree, expected",
[
(0, 1),
(1, 4),
Expand All @@ -91,15 +91,15 @@ def test_real_example(grid, tracer):
)
def test_neighbor_order(
solver,
neighbor_order,
neighbor_degree,
expected,
):
assert (
len(
solver.solve(
NullTracer(),
source_plane_coordinate=(0.0, 0.0),
neighbor_order=neighbor_order,
neighbor_order=neighbor_degree,
)
)
== expected
Expand Down

0 comments on commit 0a93055

Please sign in to comment.