Can't find column names in delimited text file
psingh8
I'm an intermediate user of Igor pro and I can't figure this easy problem out and it's bugging me.
I have a tab delimited text file that I'm writing an ipf for so that each column can be loaded as a wave and the name of each wave is in the header of the file. Sounds easy right? I can't find the right combinations of flags on LoadWave to get the columnnames to be recognized. I have an example of the txt file im using.
What am I doing wrong? Loadwaves either uses the first line of the file for column names which isn't right or it just gives up and says wave0, wave1, etc. I've used this function in more complicated functions and never had an issue.
Puneet
One solution is to change the # character to something else, such as N. Then you can load with this command:
Another solution is to specify the column names in the load command itself, like this:
String columnInfoStr = ""
columnInfoStr += "N=secs;"
columnInfoStr += "N=rfTotal;"
columnInfoStr += "N=rfPM1;"
columnInfoStr += "N=rfPM2_5;"
columnInfoStr += "N=rfPM4;"
columnInfoStr += "N=rfPM10;"
columnInfoStr += "N=N1182;"
columnInfoStr += "N=N1188;"
columnInfoStr += "N=N1197;"
LoadWave/G/D/W/E=1/L={1,2,0,0,0}/B=columnInfoStr ""
End
August 13, 2015 at 01:13 pm - Permalink
Puneet
August 14, 2015 at 08:33 am - Permalink
Thanks!
August 14, 2015 at 08:52 am - Permalink
August 14, 2015 at 09:01 am - Permalink