
Shorting values from different folders

SJ
I have loaded my data in igor using a loader that saves each spectrum (saved as a wave) separately together with some variables (Current, etc.) by creating individual folder. Now I would like to average/do some mathematics with the spectrum only with those folders having the value of a particular variable same (lets say when Current=15). How can I short those folders and do this? Thanks in advance.
Regards,
Somnath
Maybe this function I wrote to do similar stuff helps you:
You would use it in a for loop like this:
(I haven't tested this example loop.)
I also have another function which lets you do execute_code_in_all_subfolders("print 0") but I think it's less useful in this context.
By the way, Igor's trace name feature is extremely useful when you use functions like this. For example, if you do
Display
andAppendToGraph Spectrum /TN=$thisFolder
in the above loop, you will be able to see from the graph legend which wave is which. Otherwise, you would just get Spectrum, Spectrum#1, Spectrum#2, ...May 19, 2015 at 11:40 pm - Permalink