das-developers / das2java

The original das2 library. Provides interactive publication-ready 2-D plotting
https://das2.org
GNU Lesser General Public License v3.0
4 stars 0 forks source link

ambiguity of SemanticOps.xtagDataSet when T->(X,Y,Z) #63

Open jbfaden opened 1 year ago

jbfaden commented 1 year ago

I made what I thought was a trivial change to bundle which shows an ambiguity with SemanticOps.xtagDataSet when a bundle of X,Y,Z is the argument, when X itself has timetags with DEPEND_0. The bundle command was made to preserve the timetags, so that the bundle itself would have the timetags of the bundled datasets. The problem is xtagDataSet was expected to return "X" of the bundle, but since there is a DEPEND_0, T was returned instead.

Some thought and thorough testing is needed for this change. For example, if (T->X,T->Y)->Z, should X simply be returned? X is an independent variable, so it seems appropriate. Often a bundle is just X,Y,Z, so how does one know that X is an independent variable?

jbfaden commented 1 year ago

There's a comment in BundleDataSet.java, "This can't be done carelessly, because test037_breakCounter_2 shows a problem." I'm sure this is the same bug.