homepolt.blogg.se

Extract 1d wave from 2d wave igor pro
Extract 1d wave from 2d wave igor pro







  1. EXTRACT 1D WAVE FROM 2D WAVE IGOR PRO HOW TO
  2. EXTRACT 1D WAVE FROM 2D WAVE IGOR PRO PRO
  3. EXTRACT 1D WAVE FROM 2D WAVE IGOR PRO CODE

drag copies of waves to made into a 2D wave into that folderĤ. For occasional use for example a work flow could beĢ. If this is to be done a lot you might want to spend. You say start and end, how are those described? For example is there a starting number and ending number as part of the wave names? Are the waves consecutively numbered.Īlso what is the usage you see going forward.

EXTRACT 1D WAVE FROM 2D WAVE IGOR PRO HOW TO

The choice for you would be how to create the wave list string and your description needs a bit more clarity. You don't need to create the recipient wave ahead of time just give it a nameģ. It takes a list of 1D waves and creates a 2D wave from them unless you force non-promotion flagĢ. The place I would recommend starting is to look at the concatenate function.Ĭoncatenate /O] waveListStr, destWaveġ. But I don't even know where to start.Īny suggestions? I'd be definitely very appreciated if you guys would help me out with this. I am trying to make a macros that allows me to just input a "start wave" and "end wave" to automatically generate a 2D wave that contains all 1D waves between the "start" and "end". It's easy to make a 2D wave if I just want to put 2 or 3 1D waves inside, but it becomes quite time-consuming if I want to have many, let's say, 20 or even more 1D waves to make a 2D wave, by just typing these commands in sequence. I have several 1D wave data, and I want to make a 2D wave from those 1D waves, for instance.

EXTRACT 1D WAVE FROM 2D WAVE IGOR PRO PRO

I am totally new to Igor pro and I got stucked in making a 2D wave from multiple 1D waves that I currently have. Wide-Angle Neutron Spin Echo Spectroscopy.This may need debugging depending on whether HowMany is even or odd. Note how I refer to the waves from the first branch in the second branch by using index-HowMany/2. Wave TempP2norm = $ (Phase2Norm+ num2str (index ) ) Wave Tempphase1 = $ (Phase1+ num2str (index-HowMany / 2 ) ) Wave TempP1norm = $ (Phase1Norm+ num2str (index ) )ĭuplicate /O /D / R= waveID, $ (Phase2+ num2str (index ) )ĭuplicate /O /D / R= waveID, $ (Phase2Norm+ num2str (index ) ) Wave Tempphase1 = $ (Phase1+ num2str (index ) ) Variable HowMany = floor ( Numpnts (WaveID ) /samplesize )įor (index= 0 index <= HowMany index+= 1 )ĭuplicate /O /D / R= waveID, $ (Phase1+ num2str (index ) )ĭuplicate /O /D / R= waveID, $ (Phase1Norm+ num2str (index ) ) HowMany = floor ( Numpnts (WaveID ) /samplesize )įor (index= 0 index <=Howmany / 2 index+= 1 )ĭuplicate /O /D / R= waveID, $ "TEMPphase1" // $(Phase1+num2str(index))ĭuplicate /O /D / R= waveID, $ "TEMPp1norm" //$(Phase1Norm+num2str(index))ĭUplicate /O /D TEMPP1norm,$ (Phase1Norm+ num2str (index ) )ĭUplicate /O /D TEMPPhase1,$ (Phase1+ num2str (index ) )įor (index=howmany / 2+ 1 index <=Howmany index+= 1 )ĭuplicate /O /D / R= waveID, $ "TEMPphase2" // $(Phase2+num2str(index))ĭuplicate /O /D / R= waveID, $ "TEMPp2norm" //$(Phase2Norm+num2str(index))ĭUplicate /O /D TEMPP2norm,$ (Phase2Norm+ num2str (index ) )įor (index= 0 index <=Howmany index+= 1 ) 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 )

EXTRACT 1D WAVE FROM 2D WAVE IGOR PRO CODE

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.

extract 1d wave from 2d wave igor pro

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.

extract 1d wave from 2d wave igor pro

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.

extract 1d wave from 2d wave igor pro







Extract 1d wave from 2d wave igor pro