mdsplus
mdsplus copied to clipboard
Node not Found error with current release - posted for KSTAR
KSTAR has run into a problem with a set of arithmetic nodes that evaluate fine on 6.1-84 but not on the current versions. The nodes decompile to things like:
Build_With_Units((_gain = \MAGNETIC::RC03:GAIN, _conv = \MAGNETIC::RC03:CONV, _tau = \MAGNETIC::RC03:TAU, _y1fit = MEAN(DATA(\MAGNETIC::RC03:FOO)[\MAGNETIC::RC03:FIT_P1 : \MAGNETIC::RC03:FIT_P1 + \MAGNETIC::RC03:FREQ * .1 : *], 0), _y2fit = MEAN(DATA(\MAGNETIC::RC03:FOO)[\MAGNETIC::RC03:FIT_P2 : \MAGNETIC::RC03:FIT_P2 + \MAGNETIC::RC03:FREQ * .1 : *], 0), _x1fit = \MAGNETIC::RC03:FIT_P1 + \MAGNETIC::RC03:FREQ * .05, _x2fit = \MAGNETIC::RC03:FIT_P2 + \MAGNETIC::RC03:FREQ * .05, _fitdata = (_y2fit - _y1fit) / (_x2fit - _x1fit) * DATA([0 : SIZE(\MAGNETIC::RC03:FOO) - 1 : *]) + _y1fit - (_y2fit - _y1fit) / (_x2fit - _x1fit) * _x1fit, (\MAGNETIC::RC03:FOO - _fitdata) * (_conv * _gain) * 1000 * _tau * 1 * 1), "A")
and when evaluated come up with MDSplus.mdsExceptions.TreeNNF: %TREE-W-NNF, Node Not Found
>>> data = n.data()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/mdsplus/python/MDSplus/tree.py", line 1538, in data
return self.record.data(*altvalue)
File "/usr/local/mdsplus/python/MDSplus/mdsdata.py", line 622, in data
data = _cmp.DATA(self).evaluate()
File "/usr/local/mdsplus/python/MDSplus/compound.py", line 391, in evaluate
_exc.checkStatus(_TdiShr._TdiIntrinsic(
File "/usr/local/mdsplus/python/MDSplus/mdsExceptions.py", line 94, in checkStatus
raise exception
MDSplus.mdsExceptions.TreeNNF: %TREE-W-NNF, Node Not Found
I will verify that all the terms are there and evaluable as a first step.
I added an idea to discord https://discord.gg/4gt6RbhHDm #developers suggesting we add a logging capability to treeshr so we can trace all the nodes retrieved by getRecord
With the current alpha the node t._MP1P01Z
is evaluable.
I will try the same tests with the current stable.
the nodes referred to in the expression are:
t._MP1P01Z.FIT_P2.data()
t._MP1P01Z.FOO.data()
t._MP1P01Z.FREQ.data()
t._MP1P01Z.GAIN2.data()
t._MP1P01Z.NA.data()
t._MP1P01Z.POLARITY.data()
t._MP1P01Z.TAU.data()
Note: there are serveral references to t._MP1P01Z.FOO
which is pretty expensive in terms of time, making the whole evaluation pretty slow
Please verify that you are running: 7.131.6 by typing
jas@mfews-jas:~/kstar/KSTAR_27425$ mdstcl
TCLshow version
MDSplus version: 7.131.6
----------------------
Release: HEAD_release_7.131.6
Browse: https://github.com/MDSplus/mdsplus/tree/HEAD_release_7.131.6
Download: https://github.com/MDSplus/mdsplus/archive/HEAD_release_7.131.6.tar.gz
TCL>
Note that my output is slightly different since i built this version by hand.
On my system it seems to work:
jas@mfews-jas:~/kstar/KSTAR_27425$ python3
Python 3.8.10 (default, Nov 26 2021, 20:14:08)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>from MDSplus import Tree
Warning:
The MDSplus python module version (alpha_release_7.137.3) does not match
the version of the installed MDSplus libraries (HEAD_release_7.131.6).
Upgrade the module using the mdsplus/python/MDSplus directory of the
MDSplus installation or set PYTHONPATH=/usr/local/mdsplus/python.
>>>t = Tree('kstar', 27425)
>>>t._MP1P01Z.data()
array([-0.00129394, -0.01630088, -0.00489146, ..., 0.01268129,
0.01453148, 0.01545659])
Can you try:
>
$ python
>
>>>from MDSplus import Tree
>>>t = Tree('kstar' 27425)
>>> t._MP1P01Z.data()
Verify that the user runs version 7.131.6 or greater.