Skip to content
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

Feature request: lossless sample aggregation #44

Open
rdaforno opened this issue Oct 26, 2021 · 2 comments
Open

Feature request: lossless sample aggregation #44

rdaforno opened this issue Oct 26, 2021 · 2 comments

Comments

@rdaforno
Copy link

rdaforno commented Oct 26, 2021

Currently, there is an argument to specify sample aggregation (averaging) for rates below 1kHz. However, this aggregation is lossy, i.e. if in only one sample within one aggregation block the valid bit is 0, the low current channel will be discarded entirely.
Therefore, the aggregation method should be improved, for example by doing channel merging first and then aggregating the values (this of course will necessitate a new analog channel in the output file).

depends on: #16
relates to: #47

@lsigrist
Copy link
Contributor

I've extracted the request for aggregation from sampling rates > 1 kSps and moved it to a new feature request as it deserves a dedicated discussion.

@lsigrist
Copy link
Contributor

This is a good observation and a consequence of the currently data pipeline. As already noted this relates to current channel merging at runtime (#16). I even see #16 as a mandatory prerequisite for this feature request, because I see no alternative to the current approach of marking the full low current aggregation window as invalid:

  • As the currently performed average includes all samples, the calculated value is invalid if a single sample of the window is invalid.
  • Considering only the valid samples (e.g. only 7 out of 10 samples of a window) for average calculation is not feasible as it changes the semantics of the resulting value (i.e. of what the result is derived from). This would break the assumptions that low and high current channel measurement values represent two parallel observations of the very same current. As a result the merging in post processing would not be allowed anymore for aggregated values (one may be merging apple and oranges).

Apart form this, I fail to see an alternative without linking or merging the two channels during acquisition that does not suffer from similar problems. But there may be other ideas around?

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

No branches or pull requests

2 participants