Referencing waves in a function
Tue, 07/28/2020 - 11:01 am
I am trying to reference in a function, sets of existing waves in a data folder: They have names such as "Event" , "Tstart" and "Points" and there are some twenty of them. Strings of these name waves are also in a text wave named "Param" I would also want to select which of these parameter I use in the function - some or all. With my current programming skills with IGOR PRO I have to do this the hard way
wave mycTStart = $(statsFoldername +":"+ myParam)
wave mycPoints = $(statsFoldername +":"+ myParam)
where myParam = "Event", myParam = "Tstart" ...etc. I would use a flag in another wave, say "ParamFlag" to select which was referenced. To complicate things a bit more there are two other datafolders with same named waves that I need to reference with names such as "myrEvent" and "myaEvent"
What I would like help on please is how to put this in a loop so that the name of wave I am referencing is taken from the string in Param text wave and prefixed with "myc" . I feel there must be a way of doing it because the above is too tedious surely...