How to find column/wave names in table?
markusic
How can I programmatically find the name of all of the waves in a Table? Is there a command similar to TraceNameList, but for Tables?
I tried.
I couldn't get anywhere with GetWindow.
I can use ModifyTable (with selection option) followed by GetSelection, but this seems clunky and requires additional work to strip off the ".d" that are appended to the wave names in the list produced by GetSelection.
I am using Igor 8.
You can use wavelist.
wavelist("*",";","WIN:windowname")
will get a list of all waves, separated by semi-colons, that are in the window called windowname.
January 12, 2020 at 10:26 pm - Permalink
Unfortunately, WaveList doesn't include a data folder path, so if you have waves in your table from more than one data folder, or if you don't know the data folder, it isn't as useful is you might wish.
WaveRefIndexed will allow you to iterate over waves in a given window, and it returns a wave reference instead of a wave name.
January 13, 2020 at 09:27 am - Permalink
I came here looking for this precise help - great forum!!
In the meantime, what I also realized is that for the waves in a table to be detected by WaveList, I had to set the data folder to the folder where the waves were stored.
The help file does draw attention to that detail on a "Note", but I was a bit boggled by this as it seems a strange quirk (for which I am sure there is a very good reason).
Anyhow, just to leave this heads-up with the same type of doubt/question
July 12, 2021 at 01:19 pm - Permalink
WaveRefIndexed might be a better choice.
July 13, 2021 at 03:59 am - Permalink
Also TableInfo gives you a full path.
July 13, 2021 at 04:00 am - Permalink