Importing general text waves
imksh2000
But problem is that, there are 12 columns in the text files and i want to pick just four waves. (i.e., 1st, 2nd, 6th, and 11th column)
And want to name the waves, separately. (i.e., 1st wave named "Voltage", 2nd wave named "Current" etc.)
In Igor Manual, i found,
Function LoadAndGraph(fileName, pathName)
String fileName
String pathName
if (V_flag==0) // No waves loaded. Perhaps user canceled.
return -1
endif
String s0, s1, s2
s0 = StringFromList(0, S_waveNames)
s1 = StringFromList(1, S_waveNames)
s2 = StringFromList(2, S_waveNames)
Wave w0 = $s0
Wave w2 = $s2
SetScale/P x, 0, 1, "s", w0, w1, w2
SetScale d 0, 0, "V", w0, w1, w2
Display w0, w1, w2 // Create a new graph
// Annotate graph
Textbox/N=TBFileName/A=LT "Waves loaded from " + S_fileName
return 0 // Signifies success.
End
But when I configured this example for my case, when the general text file is loaded, it presents select column menu.
Is there a solution for this?
P.S. why there is a setscale for load wave?
The LoadWave /B flag can skip columns and specify the names of the columns to be loaded. Carefully read the documentation for the LoadWave /B flag.
In the example we are loading waveforms, not XY pairs, and we know the X scaling of the waveforms. To gain an understanding of the wave concept, do the first half of the Igor guided tour. Choose Help->Getting started.
Also see this help topic:
October 13, 2015 at 12:31 pm - Permalink