WaveList with DFREF as parameter
ChrLie
It would be nice to have an additional
WaveList
command which takes a datafolder reference as parameter. Currently I have use it together with SetDataFolder
to get the content of an arbitrary folder, which is kind of awkward.
In Igor Pro 6.30 or later you can use WaveRefIndexedDFR which returns a wave reference. For many applications you can use this in a loop instead of WaveList.
Here is an example:
NewDataFolder /O TempTestDataFolder
DFREF dfr = :TempTestDataFolder
Make/O dfr:wave0 = p, dfr:wave1=p+1, dfr:wave2=p+2
Variable index
do
Wave/Z w = WaveRefIndexedDFR(dfr, index)
if (!WaveExists(w))
break // No more waves
endif
String name = NameOfWave(w)
Print index, name
index += 1
while(1)
End
You can use StringMatch to select waves with a certain name pattern.
September 19, 2013 at 12:43 pm - Permalink