-
Notifications
You must be signed in to change notification settings - Fork 88
Build lh.probe_tip_presence_via_pickup()
#524
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
base: main
Are you sure you want to change the base?
Conversation
) -> List[int]: | ||
""" | ||
Probe tip presence by attempting pickup on each TipSpot. | ||
|
||
Args: | ||
tip_spots: TipSpots to probe. | ||
use_channels: Channels to use (must match tip_spots length). | ||
|
||
Returns: | ||
List[int]: 1 if tip is present, 0 otherwise. | ||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't you want to return a bool?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found it doesn't matter: The important point is that the returns of this method (a list of True/False or 1/0) will be used in simple array/matrix additions/subtractions.
For that purpose True/False or 1/0 are equivalent.
I am happy to change it to True / False :)
successful = [ | ||
(spot, ch) for spot, ch, i in cluster | ||
if presence_flags[i] == 1 | ||
] | ||
if successful: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe if any(successful)
so it's more readable
) | ||
except Exception as e: | ||
print(f"Warning: drop_tips failed for cluster at x={cluster[0][0].location.x}: {e}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how do you know it's this cluster?
await self.pick_up_tips( | ||
list(tip_subset), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is list conversion necessary?
very nice and clever feature addition!
i wouldn't call this an atomic command since it uses the atomic command |
Hi everyone,
In this PR I am proposing the addition of the "atomic command" for tip_probing:
This is step 1 of a multi-feature generation process:
Build lh.probe_tip_presence_via_pickup()
Build measured_tip_inventory = lh.probe_tip_inventory(probing_mode=lh.probe_tip_presence_via_pickup)
Build lh.update_tip_inventory(measured_tip_inventory)
Build lh.consolidate_tip_inventory()
For further details please see the user & developer forum thread:
https://discuss.pylabrobot.org/t/liquid-handler-auto-detection-of-real-tip-presence/212/3