setScriptDescription('This shows how adding a dimensionless number to a time location gives a poor message')
msod= 14401380
Units.mj1958.createDatum(15204) + msod / 864000000.
Traceback (innermost last): File "demo1958bug.jy", line 4, in ?java.lang.IllegalArgumentException: You can't add mj1958 to mj1958, they both identify a location in a space at org.das2.datum.LocationUnits.add(LocationUnits.java:69) at org.das2.datum.Datum.add(Datum.java:351) at org.das2.datum.Datum.add(Datum.java:337) at org.autoplot.jythonsupport.PyDatum.add(PyDatum.java:57) at org.python.core.PyObject._basic_add(PyObject.java:1941) at org.python.core.PyObject._add(PyObject.java:1927) at org.python.pycode._pyx4.f$0(demo1958bug.jy:4) at org.python.pycode._pyx4.call_function(demo1958bug.jy) at org.python.core.PyTableCode.call(PyTableCode.java:217) at org.python.core.PyCode.call(PyCode.java:14) at org.python.core.Py.runCode(Py.java:1224) at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:165) at org.autoplot.scriptconsole.ScriptPanelSupport.executeScriptImmediately(ScriptPanelSupport.java:933) at org.autoplot.scriptconsole.ScriptPanelSupport.lambda$executeScript$10(ScriptPanelSupport.java:1048) at java.lang.Thread.run(Thread.java:748)java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: You can't add mj1958 to mj1958, they both identify a location in a space
This script shows a poor message for the mistake:
Traceback (innermost last): File "demo1958bug.jy", line 4, in ?java.lang.IllegalArgumentException: You can't add mj1958 to mj1958, they both identify a location in a space at org.das2.datum.LocationUnits.add(LocationUnits.java:69) at org.das2.datum.Datum.add(Datum.java:351) at org.das2.datum.Datum.add(Datum.java:337) at org.autoplot.jythonsupport.PyDatum.add(PyDatum.java:57) at org.python.core.PyObject._basic_add(PyObject.java:1941) at org.python.core.PyObject._add(PyObject.java:1927) at org.python.pycode._pyx4.f$0(demo1958bug.jy:4) at org.python.pycode._pyx4.call_function(demo1958bug.jy) at org.python.core.PyTableCode.call(PyTableCode.java:217) at org.python.core.PyCode.call(PyCode.java:14) at org.python.core.Py.runCode(Py.java:1224) at org.python.util.PythonInterpreter.execfile(PythonInterpreter.java:165) at org.autoplot.scriptconsole.ScriptPanelSupport.executeScriptImmediately(ScriptPanelSupport.java:933) at org.autoplot.scriptconsole.ScriptPanelSupport.lambda$executeScript$10(ScriptPanelSupport.java:1048) at java.lang.Thread.run(Thread.java:748)java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: You can't add mj1958 to mj1958, they both identify a location in a space