could you elaborate on these changes?
The idea is to use shot N to adjust exposure for shot N+1.
For example, if I am exposing 40", the CCD data (the ones read by getBV) are useless to tell me if I am under- (or over-) exposing.
But aust after every shot, (at the beginning of raw_savefile might be the best place) I examine the image raw data and see if its exposition was ok.
If (for example) the shot was onder-exposed, I will expose next shot a little bit longer.
The difficoult part is to decide what a "correct" exposure is for a night shot.
Night shots (if they have artificial light in them) have HUGE contrasts and the standard algorigthms to see if an image is well exposed make no sense here.
So, basically, I think some custom algorithm will be needed, maybe with some parametrization to decide if one wants to have
1) a night look (dark night with stars)
2) a day look (luminous sky, but no stars and over-exposed town lights)
I have done some of the coding already, after having done the shot, I do a (sub-sampled) histogram of the RAW data and I save it to disk.
I repeat this for a large set of exposures of the same scene (from 1" to 64" in 1/3 stops) and try to see if I can develop a program that looks at the histohgrams and tell me which is the "best" exposed photo.
But, as I was saying,
best is very subjective here :-)