LoadWave merge delimiters

I'm trying to load data files from an instrument a colleague wrote the logging software for (in LabView). Data files are (largely) tab separated ASCII, but the column names are spaced delimited. I've used:

fileName = passed to function
lineNumber = first line in file containing only numbers or "NaN" (header is 2 lines above first data line)


LoadWave/J/M/U={0,0,1,0}/D/A=FogMontmp/E=0/K=0/V={"\t, "," $",0,1}/L={(lineNumber-2),lineNumber,0,0,0}/Q fileName


The problem seems to be that some of the data columns are delimited by both a tab AND a space. This results in blank columns in the loaded matrix and stops the right numbers lining up with the right headers. Ideally I'd like to be able to "merge" the tab and space characters where they appear. Is there a simple way to do this? Something like an option in the LoadWave command to ignore consecutive delimiters?

Thanks in advance.
LoadWave has no provision to merge the delimiters.

If the file always uses the same column names then I recommend using the /B flag to set the names and remove the /W flag so they are not read from the file.

If that does not work then you will have to create a cleaned up version of the file. For an example see http://www.igorexchange.com/node/856.

Another approach would be to read the wave names from the file using FReadLine, then use /B to set the wave names. Here is a snippet that might help you: http://www.igorexchange.com/node/908
Thanks for that. I was confused by this from the documentation:

/V={delimsStr, skipCharsStr, numConversionFlags, loadFlags }

My skipCharsStr conatins " $", so LoadWave should be ignoring the spaces before numeric vlues should it not? It seems not to behave as suggested...
Ignore me. It was appearently ignoring skipCharsStr because space was already defined as a delimiter. I've just used LoadWave twice on the same file with diferent delimiters defined, - once to get the headers in the right places and once to get the data in the right places. Copying the second wave over the first seems to do th trick. Sure it could be more efficient, but there you go...

Thanks for the pointers.
I could do that myself John, and possibly will, but I'm too lazy to re-run the experiments from earlier this week. I'm a naughty scientist...
I hear you. I've been there myself.

But if the format can be changed, then that suggests that an approach for just a few files might be to just manually edit the header lines on files created before you change the format.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com