Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Computing available targets #431

Open
forero opened this issue Apr 29, 2022 · 2 comments
Open

Computing available targets #431

forero opened this issue Apr 29, 2022 · 2 comments
Assignees
Labels

Comments

@forero
Copy link
Member

forero commented Apr 29, 2022

I am updating the fiberassign tutorial here
https://github.com/desihub/tutorials/blob/39ab3f17a648322e44c7ab932eead2edaeb335f8/FiberAssignAlgorithms_Part1.ipynb

In that notebook the available targets are computed using a tree that comes from a C++ method (TargetTree) that used to be in fiberassign

# Compute the targets available to all positioners
tree = TargetTree(tgs, 0.01)
tgsavail = TargetsAvailable(hw, tgs, tiles, tree)

That C++ internal method was replaced by scipy KDTree in PR #353.
What would be then the best way to compute tgsavail with the current fiberassign version?

@dstndstn
Copy link
Contributor

Hi @forero , here's how tgsavail gets computed in the fa code:

https://github.com/desihub/fiberassign/blob/master/py/fiberassign/scripts/assign.py#L382-L394

so it looks like you need to call targets_in_tiles.

@forero
Copy link
Member Author

forero commented Apr 29, 2022

Thanks @dstndstn !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants