Skip to content

Feature: Added option to merge identically named timeseries across files #996

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Jofkos
Copy link
Contributor

@Jofkos Jofkos commented Aug 8, 2024

Note: If any part of this pull-request is not up to the expected standards, preventing it from being merged, I would appreciate any feedback so that I can iterate on it until it is!

Background

Depending on the software used to collect data during experiments, the resulting logs can be fragmented. If that is the case, one can, currently, visualize them all at the same time in PlotJuggler by just giving them different prefixed.

This approach has one main drawback, however: Every timeseries is present as often as the number of log fragments one is dealing with. As a result, layouts don't work and custom series are cumbersome (need to be created for every /timeseries).

Changes

This pull request adds an option in the 'multifile prefix' dialog, that, when ticked, merges timeseries of the same name of all files loaded. In the use-case described before, this can be used in two ways: (1) By setting all prefixes to empty strings, the resulting timeseries in PlotJuggler behave as if coming from one individual file. (2) By grouping the timeseries into different prefixes, multiple fragmented datasets can be visualized simultaneously.

Additionally, this pull requests adds a 'clear already present data' checkbox, that is only active when 'merge identically named timeseries' is, too, and does as the name suggests. When not ticked, newly loaded timeseries are merged with the ones already present in PlotJuggler. When ticked, all points in existing timeseries are cleared before importing the new data.

Examples and Screenshots

For example, this configuration:
image

where the files all contain timeseries with the same names at different times would merge the content of those.

Unchecking the box results in the current behaviour, where the last file loaded is the one whose timeseries with clashing names survive.
image

@Jofkos Jofkos force-pushed the feature/merge_identical_timeseries branch 4 times, most recently from b0fd0a1 to 2fc2d6d Compare June 29, 2025 12:10
@Jofkos Jofkos force-pushed the feature/merge_identical_timeseries branch from 2fc2d6d to 58317f0 Compare June 29, 2025 12:30
@@ -1453,7 +1456,8 @@
return false;
}

std::unordered_set<std::string> MainWindow::loadDataFromFile(const FileLoadInfo& info)
std::unordered_set<std::string> MainWindow::loadDataFromFile(const FileLoadInfo& info,

Check warning

Code scanning / CodeQL

Poorly documented large function Warning

Poorly documented function: fewer than 2% comments for a function of 154 lines.
@Valle125
Copy link
Contributor

Valle125 commented Jul 2, 2025

A very handy feature!

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

Successfully merging this pull request may close these issues.

2 participants