How it is known

Fit the scale, then put the lean back

Scaling two wavelengths to each other builds in an error of the cancelling sign, because their means differ for a physical reason. The proposal was to fit against the part the edge does not touch, at high resolution. It does the opposite: f₀ falls with angle and f′ does not, so the outer shells lean furthest and fitting them costs more. Taking the scale from the composition alone reproduces the lean as well. What works is fitting as usual and then putting back the difference the composition expects, and that recovers the whole peak.

Assumes A scale error between two wavelengths has a sign, A second wavelength completes the map and The average that knows the atoms and not where they are.

A scale error between wavelengths has a sign found a cost nobody had priced. A dispersive difference compares two datasets, as a second wavelength completes the map set out, and those two datasets have to be put on one scale before they are subtracted. The factor that makes their mean magnitudes agree looks like a neutral step. It is not. The true dispersive differences do not average to zero, since at an absorption edge the anomalous atoms scatter less on average at one wavelength than at the other, and so the fit treats a physical difference as an error and removes it. The result is a scale error of exactly the cancelling sign, built in by the scaling, and it took two-fifths of the substructure’s Patterson peak on a structure with no error at all.

That essay named the way out, and gave its reason. Fit the scale to something other than the mean magnitudes: “the part of the scattering the edge does not touch”. At high resolution, it said, the anomalous atoms’ share of the scattering is small, and a scale fitted there, or fitted to an average computed from composition, would not see the lean. How much of the loss that recovers was left as the next calculation.

The calculation has been made, and both halves of the proposal are wrong, in instructive ways. High resolution is where the lean is largest, and fitting there costs more than fitting everywhere. An average computed from the composition reproduces the lean, since a composition that knows about f′f' predicts it. What does work is a small variation on the second idea, and it recovers everything.

What the model has to add

The earlier model cannot test the proposal, because its atoms scatter the same at every resolution. In that model no shell differs from another except by chance, and “at high resolution” has no meaning. Real atoms do not scatter that way. An atom’s ordinary scattering factor f0f_0 falls with the scattering angle, because its electrons are spread over a volume comparable to the wavelength, and the smaller the spacing the more they interfere destructively.

The dispersive terms behave differently. f′f' and f′′f'' come from the transitions of electrons in the innermost shells, whose orbits are tiny, and they barely fall at all across the range of a diffraction experiment. So the model here keeps the same structure, a hundred and twenty light atoms and two anomalous ones with the inflection and high-remote values of the earlier essays, and replaces f0f_0 by f0exp⁡(−Bs2)f_0 \exp(-Bs^2), leaving f′f' and f′′f'' alone. BB sets how fast the normal scattering falls, and five values are compared.

That single change settles the first half of the proposal before anything is computed. If f0f_0 falls and f′f' does not, the part the edge moves is a larger share of what remains at high angle. The proposal’s reasoning runs in the wrong direction.

Where the lean lives

The lean grows with resolution, because f₀ falls and f′ does not. The scale error a least-squares fit would build in if it fitted one resolution shell at a time. With atoms that scatter the same at every angle it levels off near two per cent. With f₀ falling as exp(−B s²) and the anomalous f′ and f″ unchanged, it grows outward to several per cent, because the part the edge moves is a larger share out there.
Fig. 1 The scale error a least-squares fit would build in if it fitted one resolution shell at a time, on data with no error. With atoms that scatter the same at every angle it levels off near two per cent. With f0f_0 falling and the anomalous terms unchanged it grows outward, to several per cent in the outer shells.

Fitting one shell at a time shows where the lean is. The innermost shell is low in every case, since at small angles the structure’s scattering is nearly all in phase and the two anomalous atoms are a minor part of it. With no falloff the curve then levels off near two per cent. With falloff it keeps going: at B=2B = 2 the inner three shells average −1.5-1.5 per cent and the outer ones −4.2-4.2, reaching −6.4-6.4 in the ninth. The curves are not smooth, because a shell of a two-dimensional pattern holds few reflections and those are particular to this structure, but the direction is unambiguous.

So the part of the scattering the edge does not touch is at low resolution, not high. In this one sentence the earlier essay had the physics reversed, for a reason that is easy to see in retrospect: it was thinking about the anomalous atoms’ f0f_0, which does fall away, and forgetting that the dispersive terms are the ones that matter here and they stay.

Three scalings of perfect data

The test of a scaling is what it does to data with no error in it. Whatever it does there is the cost of using it.

Fitting the outer shells makes it worse, and correcting the fit recovers it. The substructure's weaker peak as a share of its height with no scaling, on data with no error, with the scale error each scaling builds in, for five falloffs and three scalings. Fitting everything loses 42% with no falloff and less as the falloff grows. Fitting only the outer shells loses more, and at the steepest falloffs builds in a large error of the opposite sign. The fit corrected by the ratio the composition expects recovers the whole peak at every falloff, within a few per cent.
Fig. 2 The substructure’s weaker peak as a share of its height with no scaling, on data with no error, and the scale error each scaling builds in, for five falloffs and three scalings. Fitting only the outer shells loses more than fitting everything until the falloff is steep, and then it builds in a large error of the opposite sign. The corrected fit is within a few per cent of the unscaled peak at every falloff.

The picture at the head of this essay has three bars for each falloff. The first is the ordinary least-squares factor over all reflections, which is what the earlier essay priced. With no falloff it keeps 58 per cent of the peak, which agrees with that essay’s result. As the falloff grows, the loss shrinks, to 83 per cent kept at B=2B = 2 and 94 at B=4B = 4, because a stronger falloff makes the dispersive signal itself a larger part of the pattern, and a fixed scale error then matters less.

The second bar fits the outer shells only, resolution above seven-tenths of the limit. It is worse than the first until the falloff is steep, keeping 55, 60 and 76 per cent against 58, 71 and 83. Then something different happens. At B=3B = 3 the outer fit builds in an error of +2.4+2.4 per cent, and at B=4B = 4 of +27+27 per cent, with the peak off the scale of the figure. That is not recovery. By then the outer shells contain almost no normal scattering, so their magnitudes are mostly the f′f' and f′′f'' of the anomalous atoms, and the fit is matching one wavelength’s anomalous scattering to the other’s. The peak goes up because the sign rule of the earlier essay says a positive error raises the peak, and a map of that kind is wrong by a third, as well as being high.

The third bar is the method that works. It builds in a few tenths of a per cent, positive, and keeps the whole peak at every falloff.

Why a scale from the composition alone fails

Before describing it, there is a tempting form of it that does not work, and the reason is the most useful thing in this essay. The second half of the proposal was to fit to an average computed from the composition. The average that knows the atoms shows how: the expected mean-square magnitude in a shell is the sum of the squares of the atoms’ scattering factors, a number that requires a chemical formula and no phases. Do that at each wavelength, using that wavelength’s own f′f' and f′′f'', and take the ratio as the factor between the datasets. No fit to the data is involved, so nothing should be able to see the lean.

A scale taken from the composition alone reproduces the lean. The scale error each factor builds in, on data with none. A factor from the ratio of expected mean squares at the two wavelengths lands next to the fitted factor, because a composition that includes f′ predicts the lean, and scaling to that prediction removes the difference as fitting does. Dividing the measured ratio by the expected ratio is what leaves the difference in place.
Fig. 3 The scale error each factor builds in, on data with none. A factor from the ratio of expected mean squares lands next to the fitted factor, and it has the same sign and nearly the same size. Dividing the measured ratio by the expected one is what leaves the difference in place.

It does not avoid the lean at all. It lands within a few tenths of a per cent of the fitted factor at every falloff, at −2.66-2.66 against −2.30-2.30 for B=2B = 2. A composition that includes f′f' predicts the lean, so scaling to that prediction removes the lean as thoroughly as fitting it does. The reason the fit was wrong was never that it used the data. It was that it made two means agree that ought to differ, and any factor which makes them agree does the same damage, however it was obtained. This went wrong on the first attempt here too: the first computed version of the idea used the expected ratio directly, and it came back with the same loss as the fit, which is how the point was noticed.

The correction is one operation. The measured data has some ratio of mean squares between the two datasets, and the composition says what that ratio should be if the scale were right. The real scale error is the first divided by the second, and only that part should be removed. So the factor applied to the second dataset is the square root of the measured ratio divided by the expected ratio. If the data has no error the two ratios agree, the factor is nearly one, and the lean stays in the data, where it belongs.

On perfect data that builds in between +0.16+0.16 and +0.70+0.70 per cent, with the sign and size set by how well this particular structure’s mean matches the statistical expectation. It does not vanish because a hundred and twenty-two atoms are not a very large number. The peak is 104 to 107 per cent of its unscaled height, slightly high rather than low because the residual error has the favourable sign.

What a fit costs, in one number

The size of the lean can be written down, and doing so turns up something the earlier essay’s numbers were hiding. The expected mean square at a wavelength is the sum of squared scattering factors, and the two wavelengths differ only through the anomalous atoms. To first order the two means differ by a share equal to the number of anomalous atoms, times f0f_0, times the difference in f′f', over the total scattering power ∑f02\sum f_0^2. That is the lean a fit removes, and with no falloff it predicts −2.2-2.2 per cent against the −1.9-1.9 measured.

The quarter rule says a substructure’s peak reaches zero at a scale error of Δf′/4f0\Delta f' / 4f_0. Take the ratio of the two and the difference in f′f' cancels, since it appears in both. What is left is four times the anomalous atoms’ share of the scattering power. So the fraction of the peak a fit takes does not depend on how far apart the two wavelengths are or how large the dispersive signal is. A better choice of wavelengths makes the signal larger and the lean larger in step, and the fit takes the same fraction of it. Only the composition enters.

What a fit costs follows the anomalous atoms' share of the scattering. The substructure's weaker peak under a fitted scale, on data with no error, with the same two anomalous atoms among 60 to 960 light ones. To first order the fit's error divided by the cancelling point has no difference of f′ in it, and leaves four times the anomalous atoms' share of the scattering power. The measured cost follows that share at every size, a little below the estimate.
Fig. 4 What a fit costs on perfect data, against how many light atoms surround the same two anomalous ones. The cost follows the anomalous atoms’ share of the scattering power, slightly below four times that share at every size. A real experiment on a large protein sits far to the right.

Varying the number of light atoms tests that, and it holds in shape. With 60 light atoms beside the two anomalous ones, the share is 23 per cent and the fit leaves 40 per cent of the peak. With 240 the share is 7 per cent and 78 remains; with 960 it is under 2 and 96 remains. The cost is about three and a half times the share rather than four, and the gap has a known source: the fit matches mean magnitudes and the estimate used mean squares. It explains why this loss has gone largely unremarked. The structures on which multi-wavelength phasing is routine have a few anomalous atoms among thousands of light ones, a share of well under one per cent, so a fit costs them a per cent or two. The loss is real and it is large exactly where the anomalous atoms are a large share of the scattering, which means small structures and heavy substructures, where the signal looks so strong that nobody would think to check.

With a real error in the data

Perfect data is only half the test, since the whole point of scaling is that real data has an error to remove.

With a real scale error, the corrected fit does not move at all. The substructure's weaker peak, as a multiple of its unscaled height on perfect data, against a real scale error in the second dataset, at B = 2. With no scaling the peak follows the error, down towards the cancelling point on one side and growing on the other. The fitted factor removes the error and keeps the loss. The corrected factor removes the error and has no loss, and it is flat because the error enters it and leaves it exactly.
Fig. 5 The substructure’s weaker peak, as a multiple of its height on perfect data with no scaling, against a real scale error in the second dataset, at B=2B = 2. With no scaling it follows the error. The fitted factor removes the error and keeps its loss. The corrected factor removes the error and has no loss.

The three curves are the earlier essay’s result completed. With no scaling at all, the peak follows the error: lower for an error of the cancelling sign, and much higher for an error of the other, multiplied sevenfold at twenty per cent, where a good part of what is showing is the rest of the structure. The fitted factor is flat, at 83 per cent. The corrected factor is flat too, at 107. A five per cent error enters the corrected factor and leaves it exactly, to the twelfth decimal place, because the measured ratio contains it and the expected ratio does not.

That is the whole practical conclusion. A scale fitted between two datasets of a multi-wavelength experiment, and then divided by the ratio the composition expects, removes the real error and leaves the signal. It is a two-line change to a calculation that every scaling program already does.

How well the composition has to be known

The natural worry is that this replaces one problem with another, since a chemical formula is not always known and tabulated f′f' values are not reliable near an edge. So the corrected factor was computed with the composition wrong on purpose.

What a wrong composition costs the corrected factor. The substructure's weaker peak, as a share of its unscaled height, when the corrected factor is computed from a wrong composition, at B = 2. Listing too many anomalous atoms builds in a positive error and the peak grows; listing too few builds in a small negative one. Tabulated f′ and f″ wrong by half change the error by about one per cent, and the peak never falls below the fitted factor's.
Fig. 6 The peak as a share of its unscaled height, when the corrected factor is computed from a wrong composition, at B=2B = 2. Listing too many anomalous atoms builds in a positive error and the peak grows; listing too few builds in a small negative one. Tabulated values wrong by half change the error by about one per cent.

The correction turns out not to need much. The structure has two anomalous atoms, and listing one builds in −0.6-0.6 per cent and keeps 95 per cent of the peak, which is better than the fit’s 83. Listing three or four builds in up to three per cent of the positive sign. Tabulated f′f' and f′′f'' wrong by a factor of one and a half, far worse than any tabulation, change the result by less than a per cent. That follows from the size of the correction itself, which is only about two per cent of the scale, and a twenty per cent error in a two per cent correction is four-tenths of a per cent.

Errors in the composition have a preferred direction here too. Too few atoms gives an error of the cancelling sign, which weakens the peak. Too many gives the favourable sign, which raises it, and also starts to admit the rest of the structure’s Patterson at the rate the earlier essay measured. Neither is large at the amounts tested, and the fit’s fixed loss is never the better choice. An experimenter with no idea of the composition can still do no worse than the fit, because a composition with no anomalous atoms at all reproduces the fit’s own factor.

What this does not show

The model is two-dimensional and has few atoms. Shells here hold tens of reflections, so the shell-by-shell curves are noisy, and the peak heights are for one structure with one pair of anomalous atoms. The direction of the lean with resolution follows from f0f_0 falling and f′f' not, and that is general. The numbers 83 and 107 belong to this model.

f′f' and f′′f'' are treated as constant with resolution. They fall very slightly, and a real experiment has a temperature factor that applies to all the scattering and to the anomalous part as well. A temperature factor is not the same as the falloff of f0f_0 here, and a relative temperature factor between datasets needs a resolution-dependent scale of the kind the earlier essay showed puts both signs in one map. The correction would have to be applied shell by shell for that case, and that has not been run.

A bar for a peak’s height is not a map. The figures report the height of one peak, the weaker of two substructure vectors, relative to its own unscaled height. A map whose peak is 107 per cent can still be worse than a map at 100 if the error it carries is lifting everything else as well, and the third bar’s small positive residual is favourable only for this measurement. No structure was solved from these maps, and the test of a map that needs no phases is what it lets a solver find.

“Recovers the whole peak” means on this structure with these values, and with no measurement noise in either dataset. How the correction behaves when the two mean squares themselves have sampling errors is the question a real dataset would ask first.

What it had to survive

The structure factors are computed directly from the atoms for every reflection in a range of twenty, for both mates of each Friedel pair at each wavelength. The substructure’s peaks are found in a Patterson synthesis on a grid of sixty, by searching for the local maximum near each expected vector.

What the scale comparison must satisfy. 6 tests, each able to fail, and one refused claim: with f₀ falling and f′ not, the outer shells lean further than the inner; fitting only the outer shells is worse than fitting everything; the corrected factor recovers the peak where the fitted one loses it; a real five per cent scale error is removed exactly; with no falloff the model is the earlier one, fitted factor near −2 per cent; the cost follows the anomalous share as the light atoms change; REFUSED: scaling to an average from the composition avoids the lean.
Fig. 7 Five tests and one refused claim. The outer shells lean further than the inner; fitting them is worse; the corrected factor recovers the peak; a real five per cent error is removed exactly; and with no falloff the model returns to the earlier essay’s number. Refused: that scaling to an average from the composition avoids the lean.

Setting the falloff to zero has to give back the earlier model. Its fitted factor comes to −1.88-1.88 per cent, where that essay’s −1.68-1.68 has two metal atoms in the structure and this one has none; the mean changes, and the lean with it. Removing a real error has to be exact, not approximate, or something is wrong in the bookkeeping. It agrees to twelve decimal places.

The claim the earlier essay made has to be turned down by the same computation that would have confirmed it. The natural reading of “fit to something the edge does not touch” is both of the things tested here, and both are refused. The correction that works is a third thing, which neither reading contains, and it took the failure of the second to find it. The multi-wavelength experiment that has been assumed throughout these essays has only one such scale factor to get right per pair of datasets, so the correction is small to apply. That is no reason to trust it unmeasured.

Still open: scaling in shells, and a real temperature factor

The corrected factor here is one number for the whole dataset. A real pair of datasets differ by a relative temperature factor as well, which the earlier essay found can put both signs of error into one map, and the standard remedy, scaling in shells, is the one that builds in the largest lean of all at each shell. The obvious extension is the same correction shell by shell, with each shell’s expected ratio computed from its own falling f0f_0. The expected ratio grows outward by exactly the amount the lean does, so it should work. But a shell has few reflections, its measured ratio has a real sampling error, and that error would be carried into the scale undiluted. Whether a smooth curve through the shells’ corrections does better than either extreme, and how much noise it takes before the plain fitted factor wins, is the same calculation with one more loop. It has not been made.

Named alongside this one

Essays reaching for the same objects. Nobody chose these; they are what the concept index makes visible.

The objects this essay names

Each one links to every other essay that touches it.

Anomalous scatteringHeavy atomThe Patterson functionResolutionStructure factor