matrixOP question
awirsing
duplicate/o/r=[][][lower,upper] w3D, w3D_subset; matrixOP/o w2D=sumbeams(w3D_subset)
I was hoping to be able to do this in one matrixOP operation. Something like:
matrixOP/o w2D=sumbeams(w3D[][][lower,upper])
but this does not work for some reason, although Igor doesn't complain about the syntax. Does anyone know if this can be achieved within a matrixOP one-liner?
In this context I would like to post a feature request. I often display one column of a 2D wave in a graph (e.g.
display w2D[][1]
) and then change the displayed column with the column keyword of modifyGraph. This is very comfortable since it doesn't change the properties of the trace, such as color or attached cursors, etc.Now I am dealing with 3D waves and it would be great to be able to change the displayed beam by a beam keyword, such as
ModifyGraph beam=(1,2)
.
The help for MatrixOP has a section on wave ranges. There it mentions that
So what this syntax does, if I understand it correctly, is perform the calculation for each layer separately, and then to stack the layers in the end. I assume that the output of your calculation is a 3D wave, whereas you would expect it to be 2D. Still, the calculation is valid, if meaningless, and so there is little reason for Igor to complain.
I don't see a way to achieve this in a single line offhand. But I'm sure AG will be chipping in with a solution soon.
July 26, 2011 at 06:59 am - Permalink
When we add stuff like that, we have to think somewhat about how often the need will arise... you have proven to be a boundary-pusher!
You can use the less-convenient ReplaceWave command. Here is an example:
Display junk[3][4][]
ReplaceWave/Y trace=junk, junk[5][6][]
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
July 26, 2011 at 09:05 am - Permalink
I had the same assumption, but the output is also in this case a 2D wave (simply what you'll get if you omit the whole bracket stack).
In the past 2D waves were enough to cover my experimental outputs: I measured any kind of spectra (photoelectron, mass, fluorescence, etc.) as a function of one single parameter (photon energy, time delay, pressure, etc.). I think this this approach is very common. In the setup I am using currently the fluorescence of nanoparticles is recorded that are deposited on a surface. In this case the spectra depend of two parameters: x and y position. I have the feeling that this setup is not so boundary-pushing...
Anyway,
ReplaceWave
does exactly what I need. Thanks John.July 26, 2011 at 10:57 pm - Permalink
Right- one of the challenges for us to keep up with our customer's changing requirements. So just because you got a somewhat negative response doesn't mean your words are wasted- they will go to help update our notion of what our customers need. It's a sort of moving average of what our customers ask for, where the averaging kernel is somewhat exponential...
Anyway,
ReplaceWave
does exactly what I need. Thanks John.[/quote]Glad I could help.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
July 27, 2011 at 10:14 am - Permalink
Right- one of the challenges for us to keep up with our customer's changing requirements. So just because you got a somewhat negative response doesn't mean your words are wasted- they will go to help update our notion of what our customers need. It's a sort of moving average of what our customers ask for, where the averaging kernel is somewhat exponential...
Glad I could help.
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com[/quote]
John Weeks
WaveMetrics, Inc.
support@wavemetrics.com
July 27, 2011 at 10:15 am - Permalink
741 is essentially correct: the multi-dimensional syntax applies to layer by layer calculation. The solution for the OP is a 2-step process. For example:
Make/N=(10,20,30) ddd=z
MatrixOP/o subset=ddd[][][5,10]
MatrixOP/O w2d=sumBeams(subset)
I hope this helps,
A.G.
WaveMetrics, Inc.
July 27, 2011 at 11:18 am - Permalink