Dimension labels

I am in the process of looking at the implementation and performance of dimension labels (DisplayHelpTopic "Dimension Labels"). I'm wondering how you folks use dimension labels, or if you don't, why not?

There are a few things dimension labels are good for:

  • Making a wave into something like a structured database by giving names to elements of data
  • Providing access to rows/columns/etc. that have special meanings without tying those elements to specific row/column/etc. numbers
    • Many statistics operations output a wave with row dimension labels to identify the outputs
    • User tick labels from waves use column dimension labels to identify the column containing tick type
    • Identifying a row or column to be used as a subrange for a graph trace
  • In certain cases, Igor uses dimension labels as a source of text: column titles in Listbox controls, tic labels for category plots, and coming- text markers in graphs

What is your present use for dimension labels, if any?

At present, finding the element number that corresponds to a dimension label is slow, especially in large waves. Has that discouraged you from using dimension labels?

If you use dimension labels, do you typically label a small number of items (like 10 rows in a 1000-point wave, for instance)?

Dimension labels are Igor names (like wave names) and that means it's harder to make them like descriptive text or user-facing informational labels. Is that a problem for you?

 

Thanks for your help on this!

I should have asked:
Do you typically assign a label to every element of dimension?

Note that that is a little bit different from "Do you typically label a small number of items?"

Hi,

I have been a big fan and user of dimension labels for a long time.

Some of my use cases.

1. Use instead of Struct - They are more easily queried to the value.  I typically make two waves one for numeric and another for string values.  I pass them to the relevant functions and call the values by the dimension label. In the function I don't need to remember the value index since I use the label.  If I need to add another variable, I can just edit the wave and add the dimension label along with the value.  I would like to be able to set edit dimension labels as the default behavior for wave editing. An example is when I use IP to create front end for metrology tools and I need to store machine constants (test and numeric).

2. Use them as poor man's DataFrame.  Since waves can only have a single type and usually  the data is numeric, I stored the sample id into the dimension label.  That way I don't have synchronize between two wave one numeric and one text.  In this use case I would have a label for each row and usually one for each column.  This is often as prepare data for export to another software package such as JMP.

3. Speed issues - not a typical concern.  My work typically involves more proof of concept analysis and is not production constrained.  Most of my work is in Material Science where the data volume is more limited since the cost of each data point is extremely high.

Hope that helps.

Andy