Skip to content

hertzforge.service.zoom

zoom

A zoomed 2-D plot drawn from the samples, not the outline.

An operation sends a long trace peak-thinned (hertzforge.decimate): a plot a few thousand pixels wide cannot show a million samples, and the thinning keeps every extreme. Zoomed into a fraction of a second, those few points are joined by straight lines that are not the record. So a spectrum view whose curves were thinned carries span, the request that drew it (op.run or project.show), and the shell sends that again with the span of x it shows (schema/PROTOCOL.md). The answer keeps the samples in the span, thinned to the points the plot can draw there, which is every sample once they are fewer, and the outline of the rest.

Functions:

Name Description
checked_span

A request's span as (low, high, points), or a bad_request that

drawn

call(*args)'s views, thinned for span when one is given, and

mark

Each spectrum in views marked with how to draw it again over a

Functions:

checked_span

checked_span(span: Any) -> tuple[float, float, int]

A request's span as (low, high, points), or a bad_request that names what is wrong with it.

drawn

drawn(span: tuple[float, float, int] | None, call: Callable[..., Any], *args: Any) -> tuple[Any, bool]

call(*args)'s views, thinned for span when one is given, and whether any trace in them was thinned. Runs on the thread that draws, since the window rides on a context variable.

mark

mark(views: list[dict], method: str, params: Mapping[str, Any]) -> list[dict]

Each spectrum in views marked with how to draw it again over a span: the request that drew it, method with params as the client sent them, and the view's place in the answer. In place; returned for chaining.