Bug in pre v.2.3b6 PaleoMag

Crash when trying to use "combine lines and planes" for Fisher statistics with only one plane or circle fit (Certain. Reported bug). Possible erroneous results using Fisher statistics with combine line and plane fits option (might be directly visable if really bad (not yet reported) or might be difference between means and/or errors for different runs (not reported) or might be visable as difference between geographic and stratigraphic mean directions not explained by tilt of beds (also not reported)). If you notice any of the unreported bugs, I would appreciate being notified.
Use v2.3b6 or later of PaleoMag. Recheck any previous results of Fisher statistics combining lines and planes. Note that this does not affect Bingham or Watson statistics at all, nor does it affect Fisher statistics using just line fits.
Is it fixed?
I sure hope so, but it is hard to absolutely sure. The possible problem that remains is that the criteria for terminating the iteration for the lines+planes mean is just the change in the mean direction. There exists the possibility that in some circumstances the iterative approach will fail to find a true best-fit mean. I am not aware of such an occurance, but if it exists, it would represent as much a flaw in the McFadden and McElhinny technique as in the coding for PaleoMag.
Detailed Summary:
Two bugs were present. One causes a poor to spurious initial estimate of a mean direction to be used, the second can cause early termination of the loop searching for the mean direction. This is clearer if you understand the technique proposed by McFadden and McElhinny. First you estimate a possible mean direction, from line data if available, or just a guess (here just vertical down) otherwise. For each plane or circle, you then find the point closest to the proposed mean. You now sum these in with any line data to form a first-iteration mean. You then iterate by repeating the following for each plane or circle: remove its "point" from the mean and determine the closest point on the plane or circle to the resulting (temporary) mean. A new mean then combines the new closest points; iteration ceases when the mean fails to move by a small fraction of a degree.
The first bug failed to include any line fits in the first-iteration mean for the True Fisher statistics. When the code then ran through the iteration, if there was only one circle/plane fit, it was all that was in the first-iteration mean. When it was subtracted out, there was a zero-length vector remaining, which produced a divide-by-zero and a crash. In other cases, subsequent iterations should obliterate this problem as the choice of a starting mean is not too important.
The second bug was far more subtle; it was a poor approximation used in estimating the change in the position of the iterating mean direction. It could occasionally falsely terminate iteration well in advance of the true criteria being reached. This rather nasty bug probably has little or no effect when most of the data are line fits (mean simply will not move far) and Hemisphere Fisher statistics were used. There is a chance that this, combined with the first bug, could make a rather ugly error for True Fisher statistics.
Return to C.H. Jones home page

Return to PaleoMag overview

Craig Jones, cjones@mantle.colorado.edu