Closed mwinkel-cfs closed 2 years ago
My initial assumption was likely wrong. I thought that "create pulse" would automatically upgrade a v7 tree to a v8 tree. Apparently though, it instead is just creating another v7 tree. Whether that is the appropriate behavior or not is debatable. If it is decided that the default should be to create a v7 tree, then it would be useful to add an option that forces the tree to be upgraded to v8. For example, "create pulse nnnn /v8".
Regardless, there is still a bug here. Even if shot #9999 (in the above example) is v7, adding a node with a long name, and then writing, should have converted the saved tree to v8. (Perhaps there is an option on the write command to force upgrade to v8 that I am unaware of.)
As an aside, it would be useful to have a feature in MDSplus to list the tree version. So that users can easily tell if they are working with a v7 or v8 tree.
Hey Mark, create pulse
is little more than a file copy, so I don't think that will be the mechanism to upgrade a tree from v7 to v8. Also, we don't want this happening "automatically" without the user's consent.
That upgrade will likely be a specific editing operation on the model itself, with nothing to do with create pulse
.
Something along the lines of:
edit treename
upgrade
write
close
This has been discussed but we don't have anything written yet, for the most part we're trying to focus on making fresh v8 trees work, then we'll write an upgrade function and put it in TCL.
S
As Stephen noted above, this is not a bug. (I didn't remember that it been decided that it would be safer to require explicit upgrade to the 63-character file format, than to do the upgrade automatically.) So closing this issue as per Stephen.
My understanding (perhaps incorrect) is that editing a v7 tree should automatically upgrade it to a v8 tree. That is not occurring correctly, because the v8 tree is still truncating long node names to 12 characters.
This example uses a v7 tree from C-Mod, shot #1160727005.
Use TCL to open the v7 tree and create a new pulse (in this example shot #9999). Quit TCL. Restart TCL and edit the new pulse by adding a node with a long name. Write the tree and quit. Restart TCL and open the tree again -- the new node appears, but it is truncated to 12 characters.