procedure to load the txt data
Thu, 11/29/2018 - 11:43 am
I'd like to load the attached file (1.txt), and combine h,k,l (first three columns) to one column and set it to TEXT string with the format: [h<space>k<space>l]. For example, in the attached file, the 1st row has h=1,k=1 and l=0, I'd like to set the loaded data to [1 1 0]. Moreover, I'd like to name the waves with each column title, provided that all the characters are allowed in igor language.
In the attached 1.txt, each row has the same number of columns. But this is not always the case, as can be seen in 2.txt. When I use cmd+L to load the data, igor automatically separates to two sub-loading process. 1st block with 7 columns (7 waves) and 2nd block with 7+5 columns (additional 7+5 waves). This is not what I want. As you see in the data, it's just some rows missing the last 5 columns. All I need is the 12 waves named after the column title. If some columns are missing, I'd like to pad with something like "Null" that doesn't effect the future plotting.
Could anyone help me to write a procedure to automatically load in the file? I'm pretty new to igor programming, and don't know where to start.
Thanks a lot!
Igor Pro 8
Igor XOP Toolkit
Igor NIDAQ Tools MX