Skip to content

Commit

Permalink
add a warning
Browse files Browse the repository at this point in the history
  • Loading branch information
bdpedigo committed Mar 11, 2024
1 parent e62917b commit 5645379
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions caveclient/chunkedgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -786,8 +786,8 @@ def level2_chunk_graph(self, root_id, bounds=None) -> list:
bounds : np.array
3x2 bounding box (x,y,z) x (min,max) in chunked graph coordinates. Note that
the result will include any level 2 nodes which have chunk boundaries within
some part of this bounding box, meaning that the representative point for
a given level 2 node could still be slightly outside of these bounds.
some part of this bounding box, meaning that the representative point for
a given level 2 node could still be slightly outside of these bounds.
If None, returns all level 2 chunks for the root ID.
Returns
Expand All @@ -805,6 +805,17 @@ def level2_chunk_graph(self, root_id, bounds=None) -> list:

url = self._endpoints["lvl2_graph"].format_map(endpoint_mapping)
r = handle_response(self.session.get(url, params=query_d))

used_bounds = r.headers["Used-Bounds"]
if bounds is not None and not used_bounds:
warning = (
"Bounds were not used for this query, even though it was requested."
"This is likely because your system is running a version of the "
"chunkedgraph that does not support this feature. Please contact "
"your system administrator to update the chunkedgraph."
)
raise UserWarning(warning)

return r["edge_graph"]

def remesh_level2_chunks(self, chunk_ids) -> None:
Expand Down

0 comments on commit 5645379

Please sign in to comment.