Skip to content

Bug with ShapeSolver and Circle #320

Open
@Jammy2211

Description

@Jammy2211

I was trying to use the ShapeSolver to compute points within a Circle.

When I used this API:

        centre = self.source_plane_centre.in_list[0]

        triangles = solver.solve_triangles(
            tracer=self.max_log_likelihood_tracer,
            shape=aa.Circle(y=centre[0], x=centre[1], radius=0.3)
        )

I did not compute solutions which matched the PointSolver, but instead were quite different.

When I use this API (swapping y and x I get a good solution:

        centre = self.source_plane_centre.in_list[0]

        triangles = solver.solve_triangles(
            tracer=self.max_log_likelihood_tracer,
            shape=aa.Circle(y=centre[1], x=centre[0], radius=0.3)
        )

Digging into the Circle object, I think the problem is that grids are (unintuitively) defined where index [0] is y and index [1] is x, however the Circle object defines them the other way round.

Thus, the use of Circle in certain calculation is likely incorrect.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions