Any Frame Scaling

An example of how to scale reflections per frame.
command comment
expression 8 intensity store the current intensity in expression 8. Expression 8 is not used but allow you to restore the intensity
expression 9 sigmaorig store the original sigma in expression 9. Expression 9 is not used but allow you to restore sigma
msa = apply kfactor, sigmafactor, msafactor and msapower
icrscale 20 Extreme tolerant limits (for plot only)
sigma 10 set threshold
forbid weak no weak reflections
icr frame draw intensity variation as function of frame
histoempty 1 be safe, if no reflections are available in a frame, use 1 as default
histosmooth 10 apply a moving mean with a size of 21 (-10 to +10)
histo icr frame draw smoothed average icr per frame
This also sets reflection variable histo
dotsize 3 larger dots in plot
plot histo frame Check the variable histo
expression 7 histo save histo values
expression 1 intensity/expr7 calculate scaled intensity
expression 2 sigmaorig/expr7 calculate scaled sigma
overwrite intensity 1 copy expression 1 values to intensity
overwrite sigmaorig 2 copy expression 2 values to sigmaorig
msa = apply kfactor, sigmafactor, msafactor and msapower
sigma 2.5 change threshold
allow weak all reflections
dotsize 1 small dots
icr frame and examine the result
The used scalefactor (histo), the original intensity and sigmaorig are saved in expressions 7, 8 and 9. This is not necessary, but it allows to redo or undo the frame scaling.
Here is the whole script:
expression 8 intensity
expression 9 sigma
msa =
icrscale 20
sigma 10
forbid weak
icr
histoempty 1
histosmooth 10
histo icr frame
dotsize 3
plot histo frame
expression 7 histo
expression 1 intensity/expr7
expression 2 sigmaorig/expr7
overwrite intensity 1
overwrite sigmaorig 2
msa =
sigma 2.5
allow weak
dotsize 1
icr frame

Any
Command list