checking exposure - best method? - page 2 - Script Writing - CHDK Forum  

checking exposure - best method?

  • 28 Replies
  • 16095 Views
Re: checking exposure - best method?
« Reply #10 on: 28 / April / 2009, 00:03:27 »
Advertisements
Quote
If you intend to shoot immediately after determining Bv by half_shooting, there's no point in releasing shoot_half after autoexposure since it takes time and stresses the mechanics.

I just retested and verified that the above method crashes my a650 and indeed it does.

feel free to critique the test -
Code: [Select]
require("date")
require("log")

propcase=require("propcase")

count_frames=0

log.open("test.log")

repeat
log.print("press shoot_half")
  press("shoot_half")
  repeat
    sleep(1)
  until get_shooting() == true
  log.print("get shooting is true")
  -- get metered day exposure
  log.print("get bv")
  bv=get_bv96()
  log.print("get av")
  av=get_av96()
  log.print("get sv")
  sv=get_sv96()
 
  log.print("calc tv")
  local calculated_tv=bv-av+sv
 
  -- override tv and sv for this shot,
  log.print("set tv")
  set_prop(propcase.TV,calculated_tv)
  sleep(100)
  --set_prop(propcase.SV,sv)
  -- focus to Inf and finally press and release shutter.
  --set_focus(subjdist)
  log.print("press shoot_full")
  press("shoot_full")
  log.print("release shoot_full")
  release("shoot_full")
  log.print("release shoot_half")
  release("shoot_half")
  -- wait for shooting to finish
  repeat
    sleep(1)
  until get_shooting() ~= true
log.print("get shooting is half")

log.print("count then sleep")
count_frames=count_frames+1
print(count_frames)
sleep(10000)
until 1==2


---

I'm going to do another graph of bv values to see how stable they are mid day.

*

Offline fbonomi

  • ****
  • 469
  • A570IS SD1100/Ixus80
    • Francesco Bonomi
Re: checking exposure - best method?
« Reply #11 on: 28 / April / 2009, 01:03:53 »
@mattkime, I think you have something interesting here....
Compare your graph with mine (A570IS) and we see a RADICALLY different behaviour!


The absolute values in the graph might be way off, as I don't remember exactly but I have other calculations in the middle. Anyway, the relative behaviour is quite different. On the other hand, I live in the countryside, so my nights might be darker than yours....

I should repeat the logging tonight..

Could you give me the script and the parameters you used to to log your data, to be able to exactly compare the results?

BTW, during the day you will NOT see stable results, but that's normal: the slightest, almost invisible "fog" passing in front of the sun easily gives you 2-3 BV stops.  The camera will record that faithfully, giving a a nice roller coaster..

BTW, where are you from?
I was trying to guess from the sunrise you can see in the graph at 6:25....
« Last Edit: 28 / April / 2009, 01:46:52 by fbonomi »

*

Offline fbonomi

  • ****
  • 469
  • A570IS SD1100/Ixus80
    • Francesco Bonomi
Re: checking exposure - best method?
« Reply #12 on: 28 / April / 2009, 01:05:45 »
As for the ND filter, (which I studied for the SD1100 used in the balloon project), I haven't been able at all to set it via script via propcases or functions. I resorted to over-riding it via the CHDK menu, and calculate exposures consequently.
It should work if you call set_nd_filter(1) before pressing halfshoot. It will only be in effect for one halfshoot or full shoot.

I think I tried that, but I might be wrong.

I will check again, thanks. That would be much a cleaner solution!

Re: checking exposure - best method?
« Reply #13 on: 28 / April / 2009, 14:54:48 »
i'm in brooklyn. here's another run with more daylight hours. living in brooklyn certainly must introduce light pollution. i should try to find darker conditions.

i'm curious what value there may be to various smoothing algorithms.



http://img407.imageshack.us/img407/7259/picture3n.png


*

Offline fudgey

  • *****
  • 1705
  • a570is
Re: checking exposure - best method?
« Reply #14 on: 29 / April / 2009, 17:52:18 »
I just retested and verified that the above method crashes my a650 and indeed it does.

I haven't tried your script in my a570 yet, but I'll make a wild guess it won't crash when I find the time.

Three questions:

1) Does it crash if you remove logging?
2) Does it crash if you add sleeps between press("shoot_full"), release("shoot_full") and release("shoot_half")?
3) Does a functionally equivalent ubasic script (obviously without logging) crash too?

And the usual checks i.e. did you have flash and ae lock both disabled?

Re: checking exposure - best method?
« Reply #15 on: 29 / April / 2009, 18:00:07 »
Quote
I haven't tried your script in my a570 yet, but I'll make a wild guess it won't crash when I find the time.

I will try everything you recommend above but i must note that i find your flippant tone to be extremely obnoxious.

You have no idea how much time i put into isolating that problem.

Re: checking exposure - best method?
« Reply #16 on: 30 / April / 2009, 12:49:05 »
Three questions:

1) Does it crash if you remove logging?
2) Does it crash if you add sleeps between press("shoot_full"), release("shoot_full") and release("shoot_half")?
3) Does a functionally equivalent ubasic script (obviously without logging) crash too?

And the usual checks i.e. did you have flash and ae lock both disabled?

1. Logging has no impact on stability. (it is stable code)
2. Adding the sleep commands seems to fix the problem. I'm using sleep(100), can i use a smaller value? I don't understand why this fixes it. None of my other code requires sleep commands for stability.
3. No crashing with the uBasic version either.

What are these usual checks that you mention? While they don't seem necessary I'm still curious about them.

*

Offline reyalp

  • ******
  • 14119
Re: checking exposure - best method?
« Reply #17 on: 01 / May / 2009, 04:04:39 »
1. Logging has no impact on stability. (it is stable code)
It's not clear if this is what you are saying, but the stability of the logging code isn't the point. It would be unsurprising if for example doing file io at certain parts of the shooting sequence caused unexpected results.

As for putting sleeps between press/release, the camera won't expect those to happen instantly. It would again be unsurprising if thing went haywire when they were instant. ubasic has built in sleeps every instruction.
Don't forget what the H stands for.


Re: checking exposure - best method?
« Reply #18 on: 01 / May / 2009, 11:15:36 »
It's not clear if this is what you are saying, but the stability of the logging code isn't the point. It would be unsurprising if for example doing file io at certain parts of the shooting sequence caused unexpected results.

I have verified that it is stable by conducting hundreds of hours of testing. the presence of logging code has never contributed to a crash. In fact, aside from bad code, the only time i've seen a crash is in the half_shoot/full_shoot sequence we're discussing above.

As for putting sleeps between press/release, the camera won't expect those to happen instantly. It would again be unsurprising if thing went haywire when they were instant. ubasic has built in sleeps every instruction.

I'm confused about what you mean when you say "camera won't expect those to happen instantly"

I was unaware that ubasic sleeps after every instruction. Are there downsides to this? It seems to me that if sleep commands are required after specific commands that they should be implemented in lua somehow, rather than requiring the programmer to add them.

Re: checking exposure - best method?
« Reply #19 on: 01 / May / 2009, 11:27:35 »
I was unaware that ubasic sleeps after every instruction.


Maybe he means that a uBasic instruction takes a very short time compared with the 10 msecond scan rate.

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal