Bug report "get_far_limit" - AllBest's Builds - CHDK Forum  

Bug report "get_far_limit"

  • 6 Replies
  • 2840 Views
Bug report "get_far_limit"
« on: 13 / December / 2007, 20:50:13 »
Advertisements
Quote
Hi, AngusinAlberta!
Did u run this script in Manual Focus mode?

Hi Allbest,

Yes, I ran the script in Manual focus mode. In fact if it isn't in manual focus mode the script takes only the inital image and then quits.

It appears that "get_far_limit" doesn't check the current aperture value, it always assumes f/2.7.

For example here is a comparison of the actual values obtained from a set of images, starting at 140 mm, with values I calculate assuming the aperture= f/2.7 and CoC=0.005 mm
actual - calc
140 - 140
147 - 148
155 - 156
164 - 166
175 - 177
The agreement is very close indeed.

Repeating with the aperture set to f/8.0 I get the following results:
actual- calc
140 - 140
147 - 166
155 - 203
164 - 263
175 - 371

Note that the numbers in the first column haven't changed even though the aperture has changed to f/8.0

Thanks,
Angus

Re: Bug report "get_far_limit"
« Reply #1 on: 14 / December / 2007, 12:10:20 »
AngusinAlberta
Thank u!
I'll try to fix this bug. May be next my build

Re: Bug report "get_far_limit"
« Reply #2 on: 14 / December / 2007, 12:44:05 »
Quote
Thank u!
I'll try to fix this bug. May be next my build

And thank you for your hard work.

There is a second bug in get_far_limit. The value returned should be a function of the focal length. It works fine in the S3 with f=6.0mm but fails for any other zoom value, such as f=6.1mm. I hope you can fix both bugs at the same time.

Thanks again,
Angus

Re: Bug report "get_far_limit"
« Reply #3 on: 28 / December / 2007, 08:33:23 »
AngusinAlberta
Hi! This bug was fixed. please try new build: http://malbe.nm.ru/chdk/
You need bear in mind that an aperture value is set after half pressing on shoot knob
Thanks
« Last Edit: 28 / December / 2007, 08:45:26 by Allbest »


Re: Bug report "get_far_limit" V16
« Reply #4 on: 29 / December / 2007, 15:00:54 »
Quote
Hi! This bug was fixed. please try new build: http://malbe.nm.ru/chdk/
You need bear in mind that an aperture value is set after half pressing on shoot knob
Perhaps that's the problem. I don't use the automatic aperture.  I always set the aperture manually.

Here is a typical result with my focus bracketing script. As you can see there is still a problem with "get_hyp_dist" and "get_far_limit"

Test conditions:
camera S3
allbest-s3is-100a-16.zip   
Av mode, set to F5.6
focal length set to 7.7 mm
Script parameters set for focus range of 110 mm to 170 mm

output from pr_screen.txt:
Quote
set close 110 mm
set far 170 mm
f=  77 mm
aperture= 56
Hyp_dist 2000 4092
1 110 116 389
2 116 123 389
3 123 131 389
4 131 140 389
5 140 150 389
6 150 162 389
7 162 176 389

Note1
The correct hyperfocal distance should be 2,118 mm (using H=f^2/N/0.005)
My own script gives 2000 mm
"get_hyp_dist" gives 4092 mm

Note2
My  ":getfarlim" subroutine works more or less correctly, giving 116, 123, . . . 176 mm whereas
"get_far_limit" doesn't update and is stuck at 389

Thanks,
Angus


Re: Bug report "get_far_limit"
« Reply #5 on: 29 / December / 2007, 19:15:06 »
Hi, AngusinAlberta!
Well, I think that here some misunderstanding  :). Independently of current camera mode (manual or auto) value of aperture is set in time of the shoot! DOF -Calculator uses only current value of aperture (not user set )!
Therefore you can try this script (For Av or M mode with manual focus):
Code: [Select]
@title DOF test
s=1000
print_screen 1
print "Begin"
do
   s=s+200
   a=0
   do
     a=a+9
     set_user_av_by_id a
     set_focus s
     press "shoot_half"
     sleep 1000
     get_focus d
     get_av96 v
     get_hyp_dist h
     get_near_limit n
     get_far_limit f
     print "a:", v, "s:", d, "h:", h, "f:", f
     release "shoot_half"
   until a >17   
until s >=2000
print "End"
end
Results for a620 (circle of confusion is equal to 0.006):
a: 293 s: 1213 h: 3094 f: 1995
a: 576 s: 1213 h: 1110 f: -1
a: 293 s: 1435 h: 3094 f: 2676
a: 576 s: 1435 h: 1110 f: -1
a: 293 s: 1580 h: 3094 f: 3228
a: 576 s: 1580 h: 1110 f: -1
a: 293 s: 1761 h: 3094 f: 4087
a: 576 s: 1761 h: 1110 f: -1
a: 293 s: 2008 h: 3094 f: 5720
a: 576 s: 2008 h: 1110 f: -1

f=-1 is an equivalent of infinity

Thank you! :-)
« Last Edit: 29 / December / 2007, 19:21:11 by Allbest »

Re: Bug report "get_far_limit"
« Reply #6 on: 31 / December / 2007, 14:21:11 »
Quote
Well, I think that here some misunderstanding. Independently of current camera mode (manual or auto) value of aperture is set in time of the shoot! DOF -Calculator uses only current value of aperture (not user set )!
Therefore you can try this script (For Av or M mode with manual focus):

Thank you very much. That clears things up very nicely.

In case I'm not the only one who has been caught with inconsistent values when using get_far_limit, get_av96, etc, remember to use "shoot_half" and all will be well.

Example:
     press "shoot_half"
     sleep 1000
     get_far_limit f
     release "shoot_half"

A happy and prosperous new year to all,
Angus

 

Related Topics