![]() ![]() Make /O /N= (samplesize ) timewave=timeint * p I hope this helps and if I was bit too basic please forgive me, better too basic than too obscure.įunction Split (WaveID,samplesize,timeint ) ![]() Usually when writing code you need to test it a couple of times and if you don't use the overwrite you need to remember to delete the created waves before each run. This is one reason I have also included the /O overwrite flag. Wavex is just reused and actually will case an error the second time the duplicate function is called because it was created the first pass and will be used again the next time. In your code the use of "wavex" does not change as you increment x. You could further extend the function to take a base name as an input parameter. ![]() For the output wave name, notice I create a base name as a string and then convert the index value to a string to concatenate onto the base name and use the $ operation to have Igor use the value of the string. The duplicate function now goes through each chuck of the input wave and creates a subset. From there I determine the number of possible subsets and do not assume that there is an event multiple which cause an error if it is applied to a wave with a non-even number of subsets. To that end I have also brought the sample size into the parameters which makes the overall function a bit more reusable. Since Igor Pro starts at 0, going from 0 up to but not including 81 actually gives you 81 points and not 80 as is sometimes the real goal. The first thing that caught my eye was the interval of 81 which is not a common number and I was wondering if it was accurate. Here is how I would approach it and make it a bit more general. Wide-Angle Neutron Spin Echo Spectroscopy. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |