Incorrect settings of av96 and sv96 - Script Writing - CHDK Forum  

Incorrect settings of av96 and sv96

  • 1 Replies
  • 3279 Views
Incorrect settings of av96 and sv96
« on: 17 / August / 2012, 16:15:31 »
Advertisements
Hi everybody,
I noticed something probably incorrect in CHDK 1.1.0.2033.0
I wanted to find the lowest and highest values for ISO for my Canon 720 IS,
so I wrote this short lua script:

--[[
@title Test
--]]

sleep(2000)
file, msg, no = io.open("A/CHDK/log.txt", "w")
if file==nil then
   print('file not opened')
   sleep(2000)
   exit_alt()
end

set_tv96(640)
set_av96(288)
set_iso_mode(0)
set_sv96(1056)
shoot()
for i=96,1152,96 do
   print(i)
   set_tv96(640)
   sleep(200)
   tv=get_tv96()
   set_av96(288)
   sleep(200)
   av=get_av96()
   set_iso_mode(0)
   set_sv96(i)
   sleep(200)
   sv=get_sv96()
   isoreal=get_iso_real()
   isomarket=get_iso_market()
   isomode=get_iso_mode()
   ret,msg,no = file:write(string.format("i=%d tv=%d av=%d sv=%d - realISO=%d marketISO=%d isoMode=%d \r\n", i, tv, av, sv, isoreal, isomarket, isomode))
   shoot()
end
file:close()
sleep(2000)
--exit_alt()
shut_down()

I put my camera to Manual (Av works too, Tv and P do not allow correct settings)
and started the script, I got this log:

i=96 tv=640 av=303 sv=1056 - realISO=6888 marketISO=10532 isoMode=0
i=192 tv=640 av=303 sv=96 - realISO=6 marketISO=10 isoMode=0
i=288 tv=640 av=303 sv=192 - realISO=13 marketISO=20 isoMode=0
i=384 tv=640 av=303 sv=288 - realISO=26 marketISO=41 isoMode=0
i=480 tv=640 av=303 sv=384 - realISO=53 marketISO=82 isoMode=0
i=576 tv=640 av=303 sv=480 - realISO=107 marketISO=164 isoMode=0
i=672 tv=640 av=303 sv=576 - realISO=215 marketISO=329 isoMode=0
i=768 tv=640 av=303 sv=672 - realISO=430 marketISO=658 isoMode=0
i=864 tv=640 av=303 sv=768 - realISO=861 marketISO=1316 isoMode=0
i=960 tv=640 av=303 sv=864 - realISO=1722 marketISO=2633 isoMode=0
i=1056 tv=640 av=303 sv=960 - realISO=3444 marketISO=5266 isoMode=0
i=1152 tv=640 av=303 sv=1056 - realISO=6888 marketISO=10532 isoMode=0

You can notice that:
1) in the first line of the log I set value 96 for sv and I read 1056
2) in the following lines sv is set with a value and read with the previous one
   (strange enough sv is the same as i in the previous line)
3) av is set to 288 (f/2.8 that my Canon has) but in the log you can
   see 303 (in other logs the first one was 288 and the following 303),
   anyway EXIF reports 2.8
4) I had to put iso_mode(0) to prevent that the first image be shoot with the
   ISO settings set on the camera (it was 400 ISO, so value=4, in non-CHDK settings)
5) realISO and marketISO are not the rounded values like 160/320/640 I would expect,
   this causes some trouble in exact measurements

I took these values from Daum book from Rooky Nook (good book but sometimes imprecise).

The part of code before the loop is useful for avoiding first-shot ineffective value settings.

Can anybody confirm that is incorrect beavior (or tell me where I am wrong)?

Thank you in advance

   Clausfor

*

Offline reyalp

  • ******
  • 14082
Re: Incorrect settings of av96 and sv96
« Reply #1 on: 17 / August / 2012, 16:42:18 »
1) in the first line of the log I set value 96 for sv and I read 1056
The value that most of the get* function return is only updated on halfshoot. To return the value you just set, you need to press half_shoot and wait until get_shooting becomes true.
Quote
2) in the following lines sv is set with a value and read with the previous one
   (strange enough sv is the same as i in the previous line)
As above, I think. The readback values only update when you halfshoot, so each print shows the preceding values.
Quote
3) av is set to 288 (f/2.8 that my Canon has) but in the log you can
   see 303 (in other logs the first one was 288 and the following 303),
   anyway EXIF reports 2.8
The values are APEX*96, so 288 = APEX 3 = 2.8. Why are you getting 303 ? Not clear. What does the user AV propcase (26 for propset 2 cams like a720) show if you manually set the AV to 2.8 in the Canon UI ?

FWIW, aperture_sizes_table for a720 gives 283 for 2.8. Not clear what the source of this is, and it should affect setting AV with set_av96 (AFAIK).
Quote
5) realISO and marketISO are not the rounded values like 160/320/640 I would expect,
   this causes some trouble in exact measurements
CHDK just reports the values of the underlying propcases, why do you expect them to be rounded ? How would rounding make it more exact ?
Don't forget what the H stands for.

 

Related Topics