Advanced Octave A12 — Dataset groups and comparison between acquisitions

by Giux GX-TXT, octave-en, scripts-en 3 min read

Advanced GNU Octave with GX-TXT · Module 02

A set of Dataset can represent different acquisitions of the same study. GX-TXT has already existing dataset groups; comparing their values requires checking units, conditions and sampling.

Objectives and prerequisites

We use the two synthetic series of the A07 and A09 lessons in the same session. They are examples generated by simple models, not real acquisitions. We assume the skills of the introductory course. The test uses GX-TXT dev112-P011-bis and GNU Octave 9.4.0.

List groups and compare two series

Import confronta_serie.m, register it and run it in the Runner.

The DATASET_GROUP_API_v1/list call reads session group descriptors. Then the script reads the two series for ID and print range, number of samples and media. The complete code is in the downloadable file; the comparison core is:

groups = gxtxt_api_call('DATASET_GROUP_API_v1', 'list', {});
fprintf('Dataset groups in Session: %d\n', numel(groups));
for k = 1:numel(ids)
  d = gxtxt_api_call('CANONICAL_DATASET_API_v2', 'read_range', ...
                     {ids{k}, {'time_s','voltage_v'}, 0, counts(k)});
  t = d.time_s.values(:); y = d.voltage_v.values(:);
  fprintf('%s: n=%d, time=%.1f..%.1f s, mean=%.6f V\n', ...
          ids{k}, numel(t), min(t), max(t), mean(y));
endfor

In the test the group list is empty: the two Datasets exist, but have not been associated with a GX-TXT group. The script compares them through their IDs and does not create a group. The first contains 11 samples with average 1,825 V; the second contains 6 with average 1,050 V. Both cover 0–5 s, but they have different steps and models.

What adds a group

A GX-TXT group is a resource of the Session that associates existing Dataset with identity and roles: it does not automatically create new scientific values. The list can be empty and you do not have to interpret it as the absence of Dataset. If a group is available, consult its descriptor and check its members and conditions according to the documentation of the version used.

A difference between averages describes the championship values, but alone does not explain the cause of the difference or makes equivalent sampling grids different. To compare point-by-point series returns to the alignment procedure of the A09 lesson; for real data it also controls acquisition conditions, units and provenance.

Exercise

  1. Does the 0 value in the group list mean that the Session is devoid of Dataset?
  2. Does the average of a synthetic series prove an experimental difference?
  3. What should be verified before comparing two values taken from the same position in carriers?

Worked solution

  1. No: There are two Datasets here, but they do not belong to a group shown in the list.
  2. No. It describes only the values generated by the chosen models.
  3. That they refer to compatible instants and that units and conditions are comparable.

In the next module we will deepen publication and transformations of persistent results.

Download the Module 02 scripts (ZIP)

#GNU Octave #GX-TXT #GX-TXT public APIs

Other steps of this project

Leave a Reply

Your email address will not be published. Required fields are marked *