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

Formalise Measures handling #22

Open
sjperkins opened this issue Sep 12, 2024 · 0 comments
Open

Formalise Measures handling #22

sjperkins opened this issue Sep 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@sjperkins
Copy link
Member

At present, an ad-hoc approach is used for obtaining measures data. However, there is a degree of complexity in the Measures definition that may need to be handled in order to correctly support Measures conversion.

Quoting from measures/TableMeasures/TableMeasDesc.h

// The TableMeasDesc class hierarchy contains classes for defining each
// component of the Measures to be contained in column.  A
// <linkto class="TableMeasOffsetDesc">TableMeasOffsetDesc</linkto> is used
// to specify the offset component, a
// <linkto class="TableMeasRefDesc">TableMeasRefDesc</linkto> to set up
// the reference code component and a
// <linkto class="TableMeasValueDesc">TableMeasValueDesc</linkto> names the
// column used as the main Measure column through which the
// Measure column is subsequently accessed.

Quoting measures/TablesMeasures/TableMeasOffsetDesc.h

// <synopsis>
// This class assists in the definition of the offset component of a
// TableMeasDesc
// in the TableMeasures system.  Four possibilities exist for specifying the
// handling of measure offsets in a Measure column.  These are:
//
// <ul>
//   <li> an offset is not used
//   <li> all measures in the column have the same offset
//   <li> a unique (and probably different) offset is stored for each row
//   <li> a unique offset is stored in each array element per (Array)column
//	row
// </ul>

Quoting measures/TablesMeasures/TableMeasRefDesc.h

// TableMeasRefDesc is a class for setting up the MeasRef
// component of a TableMeasDesc in the TableMeasures system.   With the aid
// of a
// TableMeasRefDesc the following possibilities for defining a Measure
// column's reference exist:
// <ul>
//   <li> a fixed, non-variable, reference code, where all Measures in a
//	column are to have the same reference code.
//   <li> a unique (and probably different) reference code stored in each row.
//   <li> a unique reference code stored in each array element per
//	(Array)column row.
// </ul>

From a cursory read of measures/TableMeasures/TableMeasValueDesc.h the TableMeasValueDesc column does not appear to vary per row or element (it may be the column actually containing the actual data).

Then, there may be a 4 x 3 cartesian product of possible interactions between the MeasRefs and MeasOffsets. At the Python layer, this can probably be achieved through broadcasting arrays against each other. This is probably reasonably easy to handle for small columns, but may be harder for larger data columns that can not reasonably be expected to fit in memory.

@sjperkins sjperkins added the enhancement New feature or request label Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant