So my first experiment was to see the difference between use_ev_as_initial_target!"false" and "true"
here is the result
So here the use of initial exposure was really important and I find that it corresponds exactly to what I think is a great exposure for sunset and sunrise.
So this is interesting. Normally, "Use initial Ev as target" shouldn't make a huge difference in normal situations, but ...
Since my image is a circle in the midle of this 3:2 ratio I was also wondering if the Meter Width/Height % should be adjust.
Yes. I'm guessing your lens has a LOT of vignetting?
Background:
rawopint measure the scene in two ways:
1) The "meter" which is the average (mean) of a rectangle on the raw image defined by "Meter width %" and "Meter Hight %" (and in the dev version also position). On your runs, this was 90%, i.e. most of the sensor area.
2) Over and under exposure measurement which takes a histogram of essentially the entire sensor, and counts the fraction of pixels above and below the over / under thresholds.
The basic exposure algorithm tries keep the "meter" equal to a particular value. By default (if you haven't used use_ev_as_initial_target, or the ev shift or bv/ev shift options), this is an empirical "neutral" that should be relatively close to what Canon auto-exposure would use photographing a grey card. It might be off a bit, but I haven't seen it be hugely off. The meter96 value in the log will be 0 when the meter average is equal to the neutral value.
use_ev_as_initial_target tells it to use whatever value it got from the meter for the initial shot as the target instead of the neutral. That means if you used Canon auto exposure, it should try to keep the same exposure Canon used. Or if you used manual, it should try to keep the exposure like whatever you set.
So this suggests either the "neutral" value is way off on this cam, or the meter the area measured by the meter is skewed.
Looking at your sunset_sunrise_test1, on cam1, which appears over-exposed for most of the run, the meter barely reaches 0, while under_frac stays over 50% (sunset_sunrise_test1-cam1.png). Meanwhile cam4 starts with meter near -200 and keeps it there through pretty much the whole run, and under_frac is even higher (sunset_sunrise_test1-cam4.png, first part).
So my guess the meter and under exposure histogram are heavily influenced by the vignette outside the usable image area.
If this is the case, you could reduce the effect of this by reducing the meter width / height % values, though given the meter is a rectangle, this will be a compromise of how much of the circular image you include. The histogram area can't be adjusted without modifying the code, so your best bet there is to turn under exposure control off (I can point to the lines to edit, if you do want to adjust the histogram area). Over-exposure should still work, though if a significant fraction of your sensor isn't useful image data, you'll want to use lower thresholds.
Looking at a raw image shot through this setup without any lens correction should be a useful guide. If CHDK DNG works on this cam, that should give an uncorrected view of the full sensor.
Note that meter width and height are expressed in % of the sensor dimensions, so you'll have to correct for the aspect ratio to get a square. You can use the "Draw debug info" meter option to show the metered area (edit: On shot image, not the camera display).
I was also thinking that since I'm having a 180° FOV, I have ground and sky and it might be interesting to only look for the top half of the image so I expose only for the sky (that should be in theory the brightest part).
The in development version (from
https://github.com/reyalpchdk/chdkscripts) lets you adjust the position of the meter. But just restricting the meter to the image area should help a lot.
I just wondering why it's so dark during sunrise, few seconds before the sun goes above the horizon.
If you mean cam 4 around 1 minute into rawopint_sunset_and_sunrise_test1, I think it's trying to keep the sky at the -2 stops of the initial meter. It brightens at the end because it ran out of shutter. See sunset_sunrise_test1-cam4.png, second part, the tv96 value goes flat around 1200, while d_ev goes to -32. That means the exposure algorithm is requesting less exposure, but has no further adjustment available.
Indeed, on all the camera the LED blink but on this one the LED stay off. Same SD used for the other cameras, same battery, ... might be dead :/
Yeah, that should confirm it's not doing the boot and shutdown thing. Could open it up and look for crispy bits