I am completely unfamiliar with Igor Pro but unfortunately all of the data I have been given for a project is in Igor project files. I am trying to rescale both axis of an image plot by an equation but I have no idea how to go about doing this. I know how to shift curves by adding numbers, but nothing similar for image plots. The current axes are in the wrong units and I have an equation that I can use to convert them. Please help, thank you.
I suspect the reason no one has responded here is the same reason I haven't -- I am not at all clear on what you want.
I think we need more details and actual values. i.e., what are the current values and units. Is your equation just a linear rescaling or is it non-linear?
I am working with angle resolved photoemission data, so the data I have is in electron volts and degrees. The electron volts I just need to linearly scale, i.e. I need to subtract another value also in eV. The angle (theta) needs to be converted using the equation (constant * sin(theta)).
You have a matrix with on dimension in eV and the other in degrees.
Well, on second thought, there are too many variables so lets gather some information. Please do this:
With the image window frontmost, choose Windows->Window Control...
In the resulting dialog, check Create Window Macro (give it a different name if it says rename.)
Click Do It and then go to the procedure window and copy out the macro that was just created (the insertion point will be right after it.)
Post that macro here so we can see exactly how the image data is plotted.
and now I create a 1D wave for use as a replacement for the deg data.
Make/N=(DimSize('junkNIM_17.55eV',1)+1) junkY // notice +1; need both left and right edges of pixels SetScale/Px, -14.1538,0.0283077,"deg",junkY // same scaling as image y dimension
junkY= 1.23*sin(pi*x/180)// replace 1.23 with your constant Display/W=(539,165,931,576) AppendImage 'junkNIM_17.55eV' vs {*,junkY} AutopositionWindow
The above images don't look very different simply because the range of the degree axis is small. (But if it were large, this would not work because the image axis coordinates can't backtrack.)
If you have units for the result of the sin(x) scaling, you can set them via:
SetScale d,0,0,"units" junkY
You said you need to offset the eV units. To do that, you can either use SetScale on the original data or you could create a junkX analogous the the junkY.
I think we need more details and actual values. i.e., what are the current values and units. Is your equation just a linear rescaling or is it non-linear?
June 16, 2009 at 02:22 pm - Permalink
June 17, 2009 at 07:11 am - Permalink
You have a matrix with on dimension in eV and the other in degrees.
Well, on second thought, there are too many variables so lets gather some information. Please do this:
With the image window frontmost, choose Windows->Window Control...
In the resulting dialog, check Create Window Macro (give it a different name if it says rename.)
Click Do It and then go to the procedure window and copy out the macro that was just created (the insertion point will be right after it.)
Post that macro here so we can see exactly how the image data is plotted.
June 19, 2009 at 02:36 pm - Permalink
PauseUpdate; Silent 1 // building window...
Display /W=(539,165,931,576)
AppendImage 'NIM_17.55eV'
ModifyImage 'NIM_17.55eV' ctab= {*,*,Grays,0}
ModifyGraph mirror=2
EndMacro
July 7, 2009 at 09:40 am - Permalink
OK, you have a plain image without any x or y waves for the axes. As it stands then you have equally spaced x an y pixels.
But it is still not clear to me what dimensions have what units.
What are the units of the x, y and z (data) dimensions? Execute this and let us know the results:
Print WaveUnits('NIM_17.55eV',-1), WaveUnits('NIM_17.55eV',0), WaveUnits('NIM_17.55eV',1)
Print DimDelta('NIM_17.55eV',0), DimOffset('NIM_17.55eV',0), DimDelta('NIM_17.55eV',1), DimOffset('NIM_17.55eV',1)
July 13, 2009 at 02:24 pm - Permalink
•Print WaveUnits('NIM_17.55eV',-1), WaveUnits('NIM_17.55eV',0), WaveUnits('NIM_17.55eV',1)
eV deg
•Print DimDelta('NIM_17.55eV',0), DimOffset('NIM_17.55eV',0), DimDelta('NIM_17.55eV',1), DimOffset('NIM_17.55eV',1)
0.002 12.75 0.0283077 -14.1538
The z-axis units are probably not listed because that data is just intensity, which has no units.
July 13, 2009 at 07:18 pm - Permalink
SetScale/P x, 12.75,0.002,"eV",'junkNIM_17.55eV'
SetScale/P y, -14.1538,0.0283077,"deg",'junkNIM_17.55eV'
Display /W=(539,165,931,576)
AppendImage 'junkNIM_17.55eV'
ModifyGraph mirror=2
and now I create a 1D wave for use as a replacement for the deg data.
SetScale/P x, -14.1538,0.0283077,"deg",junkY // same scaling as image y dimension
junkY= 1.23*sin(pi*x/180) // replace 1.23 with your constant
Display /W=(539,165,931,576)
AppendImage 'junkNIM_17.55eV' vs {*,junkY}
AutopositionWindow
The above images don't look very different simply because the range of the degree axis is small. (But if it were large, this would not work because the image axis coordinates can't backtrack.)
If you have units for the result of the sin(x) scaling, you can set them via:
SetScale d,0,0,"units" junkY
You said you need to offset the eV units. To do that, you can either use SetScale on the original data or you could create a junkX analogous the the junkY.
July 14, 2009 at 01:18 pm - Permalink
July 17, 2009 at 12:13 pm - Permalink