change wave scaling

Hello,
I would like to change the wave scaling for many waves at the same time, using the same value for many waves and just clicking do it ?
thanks a lot
Data->Change Wave Scaling
Enter the desired values, select the relevant (many) waves and click "do it".

Be aware, that all properties are set for all selected waves.

HJ
Hello,
thank you for your answer, when you put a new value you need to click two times in order to introduce a new one for the following wave, then the precedent value return again to the old one. I don't know if you understood me ?
Hi,

HJ's answer is fine for the Change Wave Scaling dialog. So I don't understand your follow up question. Are you using the Redimension Waves dialog, by any chance? If you are, there is a "Set All..." button below the part of the dialog where new dimensions are specified. The Set All button can be used to set all selected waves to the new setting. Apologies in advance if I'm the one who's confused.

Jeff
Thank you again,
Imagine I have two different waves with delta and initial values all of them differents, now I try to change the delta for the first one and the delta also for the second one, the problem arise if you change the values and you click do it doesn't work the values remains the Olds one I really appreciate it if have at least 30 waves and change one by one is a lot.
As others have said, if you wish to change the scaling of many waves, all of them to the same values, the 'change wave scaling' dialog from the Data menu does this - shift click to select all of the waves, type in your desired values for start and delta, and click do it.

alcarar wrote:
I would like to change the wave scaling for many waves at the same time, using the same value for many waves and just clicking do it ?


Maybe what you want to do is change the wave scaling for many waves at the same time, using DIFFERENT values for many waves? If that's the case, are you looking for a user interface that allows you to type in different values of start and delta for each wave? Then I would ask how you're deciding the values for each wave - you may be able to skip a step if you can calculate the values instead of providing them manually.
thank you Tony,

the question is exactly this: " Maybe what you want to do is change the wave scaling for many waves at the same time, using DIFFERENT values for many waves?"
do you have idea how i can do it?...
thanks again.
AFAIK this is not possible with 'menu-igor'.

Use
LOOP over waves
    wave w= ....
    setscale /P d dimoffset(w,-1), dimdelta(w,1), waveunits(w,1), w
    setscale /P x dimoffset(w,0), dimdelta(w,0), waveunits(w,0), w
    setscale /P y dimoffset(w,1), dimdelta(w,1), waveunits(w,1), w  // maybe
    setscale /P z dimoffset(w,3), dimdelta(w,2), waveunits(w,2), w  // maybe
    setscale /P t dimoffset(w,4), dimdelta(w,4), waveunits(w,4), w  // maybe
ENDLOOP

replacing the relevant dimoffset/dimdelta/waveunits function with the desired value.
How the loop is implemented best depends on your data structure.
HJ
thank you,
enclosed you will find my screen, the idea is scaling by 0.3 eV all the values this is usefull for the calibration on XPS spectroscopy. However, i don't know what kind of loop to use.
thanks again
screen.png (54.23 KB)
This should do the job
Function SetDelta(Delta)
variable Delta
variable Cnt
String WaveNames=WaveList("*",";","")
    For (Cnt=0;Cnt<ItemsInList(WaveNames);Cnt+=1)
        wave w=$StringFromList(Cnt,WaveNames,";")
        SetScale /P x DimOffset(w,0), Delta, WaveUnits(w,0), w // Maybe you want to replace 'WaveUnits(w,0)' by ' "eV" ' as well
        Note w, "Delta set to "+num2str(Delta)
    EndFor
    Print "Delta of "+Num2Str(Cnt)+" waves set to "+num2str(Delta)
End

Make sure you've set the current data folder correctly. The function should only process the waves in this data folder. It will set the delta value to all waves in the data folder. It will only alter the x dimension.

Copy this code in the procedure window (Window->Procedure Windows->Procedure Window -/- CTRL-M).
Run it from the command line (history window). E.g.,
•setdelta(0.3)
  Delta of 5 waves set to 0.3


HJ

PS: The scaling should match the spacing of the data points from the acquisition device. For calibration, the offset of the spectra might be shifted in a similar way. The value will depend on the position a reference peak (Fermi-edge in VB?). All spectra should be measured with the same photon energy in that case.