Enrico, thanks for the additional information. This last result actually is what I would have expected, given the earlier results.
Let's see if I can explain how things work. Please bear with me...
To begin,
Zerene latches onto this detail
It is not good to imagine that Zerene "latches onto detail" when doing its alignment. Actually Zerene makes no specific attempt to find details and match them up.
Instead, it works by essentially overlaying one image on another and adjusting the offsets, rotation, and scale so as to maximize the correlation of luminance values at all pixel positions in the whole image. This process does give some extra weight to focused detail (because the pixel values are changing quickly there), but with shallow-DOF images the alignment is strongly influenced by the 99% of all pixels that are not focused.
This use of overall correlation is the reason that asymmetric compositions sometimes produce bogus alignment defects. As a dark-to-light transition goes out of focus, the blurred edge can appear to move across the image. When that happens, Zerene will pay attention to the blurred edge. If there's not enough other information in the image to dominate the alignment, then Zerene will keep the blurred edges lined up, and as a result will incorrectly infer that a shift has occurred.
Similar problems can occur with scaling, even when the subject and composition are symmetric. The fruit fly face that I use to talk about Zerene is a bit more "bug-eyed" than it should be because of this effect.
There is more discussion and illustration of this problem at
http://www.photomacrography.net/forum/v ... 9878#79878.
The alignment process always starts at one end of the stack and proceeds to the other. The starting image establishes framing for the whole stack. All other images shift to match that, based on the chain of image-to-image alignments.
With default settings, Zerene aligns the two end images against each other to estimate scale change, then begins the stack at the end with narrower FOV. With most stacks, this results in subsequent images expanding to more than fill the frame, which results in no edge streaks at all. However, if the alignment process is led astray by the apparent shifting of blurred transitions, then it can happen that subsequent images get scaled or shifted so that they do
not fill the frame. In that case the non-covered pixel positions get filled in by interpolation from the closest edge. It's that interpolation process that produces the streaks.
You asked "
did you ever see images with edge trails along three margins?". Sure, I've even seen streaks on all four margins. The default behavior tries to avoid streaks by starting at what appears to be the narrow end. But if that decision turns out to have been wrong and actually it started at the wide end, then some images can shrink away from the frame on all edges. If those frames happen to contain well focused detail at their own edges, then the interpolation process can produce sharp streaks that propagate into the final result.
Sharp streaks that propagate into the output can also degrade the alignment process. That's another reason why the default is to minimize them by starting at the narrow end. My guess is that your two different orders produced different dust trails because the different streaks degraded the alignment in different ways.
Now, a bit more about the interpolation process that produces the streaks... Zerene's process is basically driven by pixel positions in the final framing. For each of those pixel positions, for each source image, Zerene needs to retrieve a pixel value from the source image. So, it computes a pixel position based on the alignment parameters and drops an interpolating kernel over the source image at that position. If this position ends up outside the source image, as it does around the edges of shifted or shrunk images, then the resulting pixel value is obtained by just grabbing the nearest edge pixel. Where there's a wide band of pixels that are outside the source image, the same edge pixel gets grabbed again and again. That's what produces the streaks.
You mentioned that "
If edge trails are not perpendicular to the edge of the frame, then there is misalignment (or a weird rotation of parts of the optical assembly around its axis relative to the subject...)". Edge trails not perpendicular to the edge of the frame will occur specifically when the alignment process has inferred a rotation. Of course that can mean that either there really was rotation, or that the subject & composition was asymmetric in a way that made Zerene see a rotation due to blooming of bright/dark transitions in OOF areas.
Detecting telecentricity and dealing with lenses that are not telecentric is an interesting and challenging problem.
Because of the blooming problem, it's not really reliable to decide telecentricity based on a deep 3D subject. Instead, I think it works better to use a flat subject that has a lot of detail all over it, and look at the scale change as the whole frame just barely goes into and out of focus. This avoids misleading indications caused by blooming, giving instead an accurate reading of scale change within the in-focus slab, which is what really matters.
If a lens is close enough to telecentric (insignificant scale change within the in-focus slab), then the best approach is to turn off Scale at Options > Preferences > Alignment. This will impose perfect orthographic projection on the assembled stack, just what you would expect if the lens were perfectly telecentric
and the computational alignment process was also perfectly accurate.
If a lens is
not close enough to telecentric to get good results by turning off Scale adjustment, then at present all you can do is to turn on Scale adjustment and hope that it works well. It would be better if Zerene allowed you to force a specific scale change per image, but that option is still sitting on the to-do list.
--Rik