Skip to content

Support “regular axis” metadata (t0/Δt) to avoid storing full axis vectors in NXdata line plots #1943

@NAThompson

Description

@NAThompson

Problem statement

In NeXus NXdata, H5Web can auto-plot a line when the group contains a signal dataset and an axis dataset referenced by @axes.
For a uniformly sampled time series, storing a {times, values} datastructure is unnecessarily expensive because the times array is large and redundant-times[i] = t0 + i Δt.

I’d would like to store a {t0, Δt, values} datastructure and have H5Web still auto-plot vs physical time.

Proposed behavior

Add support for an axis that is implicitly defined as a regular grid. If an axis dataset is missing, but metadata indicates regular sampling, H5Web should synthesize the axis and plot with the correct metadata.

I imagine the h5ls -dlooking something like:

/entry/data (NXdata)
  values         (float[N])   @signal=1
  t0             (float)      @units="s"
  dt             (float)      @units="s"
  @axes = "time"              (virtual axis name)

There is a "checkdown" available: Use a scaling transform in order to map the integers [0, 1, 2, 3, ..., N-1] (which is quite compressible) to [t0, t0 + Δt, ...].

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions