Skip to content

Auto downsampling starts at five times the configured maximum number of points #30

Closed

Description

@PierreRaybaut

Part of DataLab-Platform/DataLab#455.

Symptoms

apply_downsampling (sigimax/adapters_plotpy/objects/signal.py) only downsamples a curve when it has more than 5 times sig_autodownsampling_maxpoints points. With the default value (100,000), signals of up to 500,000 points are drawn in full, which is not what the option name and its description announce.

The downsampling factor, nbpoints // maxpoints, may also draw more points than the maximum: a 599,999-point signal is downsampled with a factor of 5, i.e. 120,000 points are drawn.

Besides, the item is only updated when use_dsamp changes: when only the factor changes (e.g. after a change of the maximum number of points), update_item relies on the caller to update the drawn data.

Proposed changes

  • Downsample as soon as a curve has more points than sig_autodownsampling_maxpoints.
  • Use ceil(nbpoints / maxpoints) as the factor, so that at most maxpoints points are drawn.
  • Update the drawn data when the downsampling state or factor changes.
  • Clarify the description of sig_autodownsampling_maxpoints (maximum number of points displayed; data are not modified).

Activity

  1. PierreRaybaut commented on Oct 29, 2026

    @PierreRaybaut
    ContributorAuthor

    Fixed by #31 (merged into develop, will be released in SigimaX 1.1.0). Part of DataLab-Platform/DataLab#455.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions