0

Is there a way to generate a sequence of usual/standard exposure time options mathematically? Something like 1/5000, 1/2500, 1/1500, 1/1000...1/500, 1/250/ 1/125...1/60...1/30...1/8, 1/4, 1/2, 1, 2, 3, 4...8, 16, 32 (all in seconds).

Note that the sequence above is just an example to describe what I mean. The gap between different options does not have to be the same as above, nor the actual values.

Also, the sequence might be a combination of different sequences generated differently.

Tooniis
  • 103
  • 3
  • 3
    I'm not quite sure what you're asking. Mathematically, the algorithm is "make each exposure time twice as long as the previous, rounding to some nice (customary) fraction". – Kahovius Dec 20 '19 at 13:23
  • 1
    Do you only want an Excel formula? Or, a method to automatically control your camera with these sequences? – Mattman944 Dec 20 '19 at 13:33
  • @Mattman944 I want the formula itself, which I will then use in my Android camera application – Tooniis Dec 20 '19 at 14:03

2 Answers2

2

The values you quote are Nominal values, approximate values not necessarily actually existing, historically stated by humans to be sort of nice rounded numbers. As such, the nominal values are somewhat arbitrary, but convention over 100 years has standardized them to be your list. But the cameras actually use more precise goal values, powers of 2.

Shutter speeds necessarily have to actually be powers of 2, each full stop being 2x intervals. So the precise values the camera actually uses are 1, 1/2, 1/4, 1/8, 1/16, 1/32, 1/64, 1/128, 1/256, 1/512, 1/1024, etc. Humans just sort of instead call them rounded approximate names. But math and calculation must use the precise values.

Your camera might have a 15 or 30 second shutter speed (nominal), but if you time it, it will be 16 or 32 seconds (precise). If it were only 15 or 30 seconds, it would NOT be a precise 2x stop, and the plan would go astray.

These actual precise values are generated by 2 to power of stop number (0, 1, 2, 3, 4, etc), with all fractional values being a negative exponent. Fstops are a positive exponent of square root of 2.

Third stops are the sequence of stop numbers 0, 0.3333, 0.6667, 1, 1.3333, 1.6667, 2, etc.

for (i = 5; i > -10; i -= 1/3) {   // thirds for 32 second to 1/1024 second   
  value = Math.pow(2, i);   
}     

These are the precise goals actually used, not the approximate nominal numbers as we imagine them.

My site has much more about this at https://www.scantips.com/lights/fstop2.html (bottom part of that page is about calculation)

Romeo Ninov
  • 12,030
  • 4
  • 31
  • 49
WayneF
  • 12,879
  • 1
  • 16
  • 30
  • 2
    Also, by the time you get to milliseconds, the difference between nominal and actual is a) probably lost in the tolerances of mechanical devices and b) so small as to have no meaningful difference to exposure. – mattdm Dec 20 '19 at 19:06
  • Since nominal values are not real (does not necessarily exist in reality), I would argue that any difference exists only in our own mind. :) The camera uses the precise goal, the best it can. – WayneF Dec 20 '19 at 20:19
  • 1
    In many cases (more so with apertures and mechanical linkages between camera body and lens, but to one degree or another with anything mechanical, including shutter curtains), the variability from one attempt to target the same precise goal to the next is also greater than the differences we're talking about here. – Michael C Dec 20 '19 at 23:23
  • 1
    Nothing is perfect, there is surely some limit on significant digits, but focal plane shutters today are precisely crystal controlled. The shutter duration is the simple timing between starting the first and second curtain (both using the same mechanism). Quoting Wikipedia: "Whereas the best mechanically controlled shutters were rated for 150,000 cycles and had an accuracy of ±¼ stop from nominal value (more typically 50,000 cycles at ±½ stop), today's best electronically controlled FP shutters can last 300,000 cycles and have no noticeable speed error." – WayneF Dec 21 '19 at 00:10
  • Should I include half (or any fraction of) stops? Are they used much? – Tooniis Dec 21 '19 at 03:16
  • Does your camera use half stops?. Modern cameras instead provide thirds for shutter and aperture today. But some Auto ISO can use even finer stops. – WayneF Dec 21 '19 at 03:33
  • @WayneF I am making a camera application for Android, whose camera2 API allows for controlling exposure time in nanoseconds. The actual accuracy might not reach that level, but it should still be quite close considering there is no mechanical shutter in the camera of a phone. Now I am asking whether a control finer than full stops would be useful or not. I guess half stops would be useful only in times longer than a second. – Tooniis Dec 21 '19 at 06:14
  • "Are fractional stops used much" is probably a different question. In short, it depends on your intended audience and the app UX design. If you are providing options, why not make it one, and then see how much your actual users are using it? – mattdm Dec 21 '19 at 15:41
  • Exposure depends on shutter speed, aperture, and ISO. Aperture likely is limited to third stops, but ISO and electronic shutter might allow finer steps. But a cell phone is a simple camera. Maximum shutter speeds on more versatile cameras might approach 0.1 millisecond (which is normally too fast to be usable for exposure). The math's precision limit might be nanoseconds, but would be very unreal, too small to possibly affect exposure. I guess that can't hurt if accepted, but it won't make any difference. I certainly would not want to be seen asking the user to enter nanoseconds. – WayneF Dec 21 '19 at 16:47
  • Sorry, I saw "nanoseconds" and went crazy, and missed the actual question. You would surely want to ask for third stops, as is standard photographic practice. No, It is Not for long exposures, it is for finer precision of any exposure. Yes, third stops is very useful finer precision, and is the way it is done now. Until after maybe 1960, cameras only did full stops. Then Half stops became common, and now modern cameras do third stops. It is about the precision of the exposure. – WayneF Dec 21 '19 at 17:33
1

Shutter_Speed = 2 ^ (Stop_Delta)

Where Stop_Delta is a whole number if you want whole step stops. Zero corresponds to one second. The range is about -12 ... +5 for your example.

Mattman944
  • 1,234
  • 1
  • 7
  • 13