This set requires the 26th of January update of CZM or later.
Below is a movie 'borrowed' from the MMVLWiki Sheffield Hallam University, UK
This is a 'Deep Stack' parts of it go completely out of focus and some are replaced by others which come into focus at the same position in the stack. The frames have been extracted and used to test this function in CZM (various algorhythms) and Helicon Focus (only the default settings)
Do Stack (below) this method produces several blurred patches, but the edges are sharp, you can not see through some of the clear parts.

Helicon Focus (below) produces an uneven background and blurred patches, though not as bad as the above, edges are also quite soft.

Do Weighted Average (below), of the three simple methods tested this produced the best result but still has soft edges.

Below are some tests performed with various parameter settings using the Do Deep Stack Macro Set. Load the Macro Set in the usual way, there is only the one user Macro on the macro menu. The Macro Paramaters dialog that appears allows you to alter two settings, the first is the number of frames per Do Stack group, and the second is how many frames to move between groups.
The process used by this macro is to form a new stack from the old one. Each frame in the new stack is produced by Do Stack on a small group of frames from the original stack. After the whole of the new stack is produced the old one is deleted. Finally a stacked image of the whole subject is made using the Weighted Average method.
The groups of frames are all the same sized determined by the first parameter. The first group, which produces the first frame in the new stack, starts at one end of the stack. The next group, which will produce the second new frame starts further up the stack, how far up is determined by the second parameter.
DoDeepStack(3,1)
DoDeepStack(5,2)
DoDeepStack(9,3)
DoDeepStack(9,7)
There are 100 frames in this stack. All of the above seem to be better than any of the simple methods, the penalty is they take longer to produce. The bigger you make the second parameter the smaller the second stack will be but the greater is the risk of overlapped detail being missed and blurred patches appearing. Always make sure that there is some overlap between the groups by making the second value smallar than the first. Obviously the first value should be less than the number of frames in the stack. Extra frames, duplicates of the first and last, are added at the top and bottom of the original stack during processing to make the numbers work out correctly.
If you examine the new stack you will see that each frame has more in focus information than any in the original stack (with the exception of first and last). This implies that there is less out of focus information in the stack. A consequence of this is that there are less out of focus pixels added together in the averageing process so the result is sharper. There is less need to sharpen the result afterwards, doing this would amplify any noise and results in a grainy picture.