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

Add "get_latest_timestamp" to map root ids to their latest valid timestamp that can be queried #499

Open
ceesem opened this issue May 31, 2024 · 1 comment

Comments

@ceesem
Copy link
Collaborator

ceesem commented May 31, 2024

For a variety of reasons, it would be useful to take root ids and find the most recent timestamp at which they are or were valid. This would be the later-in-time complement of the root_timestamps endpoint that returns the earliest timepoints for a given root id. Experience suggests that the values this returns are not valid timestamps for the ids in question either, and we need to manually add a small time increment to use these timestamps.

The proposed function would take root_ids, a list/array of root ids and optionally timestamp and return an equal length list of the latest timestamps at or before the timestamp specified, at which each of the respective root ids would be valid in the ChunkedGraph. If a timestamp is not provided, it would default to the current timestamp in the same way functions like get_roots work. This implicit timestamp is currently computed on the client side.

@ceesem
Copy link
Collaborator Author

ceesem commented May 31, 2024

The current endpoint is just called root_timestamps with no indication of early or late timestamps, and the CAVEclient function follows this nomenclature. For clarity when reading the API or using CAVEclient, this feature could be implemented as new parameters on the same endpoint, with one defaulting to latest=False (with False being the existing behavior and True being the behavior described above) and the second being to timestamp=None (with None not being used for latest=False and a timestamp being necessary only in the latest=True case)

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

No branches or pull requests

1 participant