Author Topic: Take a photo at each ISO  (Read 2822 times)

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3654
  • Blunt and to the point
Take a photo at each ISO
« on: September 27, 2018, 02:49:42 PM »
Code: [Select]
function test()
    camera.iso.apex = 5
    camera.shoot()
    camera.iso.apex = 6
    camera.shoot()
    camera.iso.apex = 7
    camera.shoot()
    camera.iso.apex = 8
    camera.shoot()
    camera.iso.apex = 9
    camera.shoot()
    camera.iso.apex = 10
    camera.shoot()
    camera.iso.apex = 11
    camera.shoot()
    camera.iso.apex = 12
    camera.shoot()
end

keymenu = menu.new
{
    name = "ISO photo bracket",
    select = function(this) task.create(test) end,
}


I found the apex values by running this script.  Is there some documentation somewhere that explains apex and raw values?

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: Take a photo at each ISO
« Reply #1 on: September 27, 2018, 06:25:46 PM »
http://dougkerr.net/Pumpkin/articles/APEX.pdf

https://builds.magiclantern.fm/lua_api/examples/api_test.lua.html -> look for "Setting ISO"

e.g. these are all equivalent:
Code: [Select]
camera.iso = 100
camera.iso.value = 100
camera.iso.apex = 5
camera.iso.raw = 72

Nitpicks:
- why not using a for loop?
- with experimental builds (including iso-research), you should be able to delete all of that boilerplate code:

Code: [Select]
-- ISO photo bracket
for a = 5,12 do
    camera.iso.apex = a
    camera.shoot()
end

Audionut

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3654
  • Blunt and to the point
Re: Take a photo at each ISO
« Reply #2 on: September 28, 2018, 01:22:06 AM »
I figured I was doing it extremely long handed.
When it comes to LUA, I'm the equivalent age of 3.  I'm happy to dump code snippets here as I'm moving along, document the process.
The really simple stuff.  Might help to ease the transition into the excellent work that garry23 has done in this section.

Thankyou for your time.

Sapporo

  • Freshman
  • **
  • Posts: 93
Re: Take a photo at each ISO
« Reply #3 on: May 31, 2021, 02:46:46 PM »
Works great for 7D even up to H. With 6D it only goes up to ISO 6400 and not 12800, 25600, H1 and H2.

I have tried

Code: [Select]
function test()
    camera.iso.value = 100
    camera.shoot()
    camera.iso.value = 200
    camera.shoot()
    camera.iso.value = 400
    camera.shoot()
    camera.iso.value = 800
    camera.shoot()
    camera.iso.value = 1600
    camera.shoot()
    camera.iso.value = 3200
    camera.shoot()
    camera.iso.value = 6400
    camera.shoot()
    camera.iso.value = 12800
    camera.shoot()
    camera.iso.value = 25600
    camera.shoot()
    camera.iso.value = 51200
    camera.shoot()
    camera.iso.value = 124000
    camera.shoot()
end

keymenu = menu.new
{
    name = "ISO photo bracket",
    select = function(this) task.create(test) end,
}

My goal is to take raw samples for NR in a neural network https://commons.wikimedia.org/wiki/Natural_Image_Noise_Dataset