First of all, great job, as usual, Phil. I love the way you implemented it, and the seconds_to_tv96 function should do all I want in a much clearer way than the negative time input and scale factor I used. The docs that waterwingz wrote are perfect too Thanks!
I noticed that Phil uses a (short) argument for a function that I thought was defined to have an (int) argument. I didn't realize the compiler would implicitly convert in that case. It's nice to learn something new.
ISO 200 = SV96 576
ISO 200 real = ISO329 market <--- really ?
ISO 200 market = ISO122 real <--- can this be true ?
SV96 576 real = 645 market <-- here too
SV96 576 market = 507 real <-- and here
The idea is that doubling the market ISO should double the real ISO. This translates to adding 96 to the real or market sv96. So the sv96 conversion is a constant offset:
sv96 market = sv96 real + offset.
In my cameras, the offset it 59, but Canon picks the offset for each camera depending on the properties of the sensor. I think they're trying to match the exposure of a old style film camera with various ISO film speeds.
sv96 addition is ISO multiplication, so:
ISO market = ISO real * 2^(offset/96).
ISO market = ISO real *1.53 -- for a sv96 offset of 59
So ISO 200 real = ISO 306 Market on my cameras. Your camera sv96 offset must be a little larger.
I think maybe the purpose for the sv96 "base" and "delta" propcases may be that higher ISO film (physical film) speeds aren't exactly double the next lower film speed. ISO 3200 film isn't exactly twice as sensitive as ISO 1600 film. The constant sv96 offset for real and market holds true up to ISO 800 on my cameras, but above that it isn't the same, I've found.
I'm not sure how Phil handled this, but I'm happy with it however he did it. I just ignored it in my script, and used a constant offset. I only used market ISO for input and display, and all the exposure changes were s96 real.
***
I see phil and reyalp have answered this while I'm typing, and phil uses 69 for the conversion. Is this for all cameras?
[EDIT]
This is how I find the offset in my script:
sv=get_sv96()
svdiff=iso_to_sv96(get_iso_market())-sv -- real to market difference
svmin=iso_to_sv96(s)-svdiff -- min sv ISO 100 market default
svmax=iso_to_sv96(z)-svdiff