If you look back in my videos you'll find a sunset where I used program AE on the camera resulting in the focus shifting as the light disappears - distant light started getting to be the size of dinner plates - and it was very frustrating. This phenomenon is caused by the aperture opening up, modifying the DOF in a visually distracting way.
This series was an attempt to "fix" this. Seems to have worked pretty well as the focus is pretty good over the entire series, and the AE opens up from F8 to F2.8 as the camera craves more light.
Shot with the S100fs, 200 ISO, Velvia, program AE, fixed focus. Rigged for free-running continuous shooting withouth an intervalometer - this has the effect of speeding up the night portion of the video as the speed increases to multiple seconds. This is both annoying and pleasing.
How it works: What I did is switch the camera into A-priority, set to F2.8 ( e.g. the widest it can go ), set camera to MF, and get proper focus solution. Once focus is set, switch to program AE. The aperture will go from 2.8 to the F8 ( because its still bright out ). but this is fine, as the higher aperture values will, if anything, create a wider DOF and so not ruin the focus. After the sunset, the camera drops its speed lower and lower as well as opens up the aperture. But since the focus solution was achieved with the aperture wide open, the camera is still - tada - in focus! I know its not rocket science, but hopefully it will save someine some noodling around.
Why go to all this effort? It allows you to go from full sun to full darkness. That's hard to do without involving the aperture. You will notice a small number of transitions where the aperture rachets up to the next level. They are there, but not overly annoying. SBG removed the flicker, and smoothed out these shifts, and can remove even these by setting the running average to span multiple seconds. For this video the average would be about 20 frames, and at 30fps, the transitions are still visible. Setting to a 90 frame average would make them do away completely.