Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - f.javi.pz

#1
Scripting Corner / Re: Script for Astrophotography
November 04, 2020, 02:44:55 PM
OK, no more long codes till the final one.

Probably is somewhere between "nice to have" and "emotionally essential"  ;)

Drama on
It is dark and cold out there, you started an script to take about 100 photos and you are waiting without knowing how long or even if it is working or just emptying the battery...
Drama off

This sequence is logical for notify boxes?

1 start Live View
2 shoot in silent mode
3 pause Live View
4 display the box
#2
Scripting Corner / Re: Script for Astrophotography
November 04, 2020, 12:57:44 PM
Hi again,

I followed your advices and get it working! Thank you very much!

Now I'm trying to get a display saying "Taking picture 2 of 20" and so on. The text generator itself already works. The problem is the script is designed to take pics on "silent mode" with LV on.

I tried printing it in the console, pause de Live View before it, showing it with a notify_box... You'll see in the code I have a big mess about it:
mymenu = menu.new
{
    name = "Astrophoto",
    help = "Takes several photos to complete BIAS, DARK, LIGHT and FLAT sequences, for astrophotografy",
    submenu =
    {
    {
            name = "Start!",
            help = "Run this script.",
            select  = function(this) task.create(astro) end,
        },
        {
            name = "How many LIGHT photos?",
            help = "DARK, BIAS and FLAT will be the same",
            min = 0,
            max = 30,
            value = 2
        }       
    }
}

--mymenu.submenu["Start!"].select = function(this) task.create(astro) end,

function astro()
local n = mymenu.submenu["How many LIGHT photos?"].value 
  menu.close()
  console.show()
  -- warnings
  if camera.mode ~= MODE.M then
print("Enable MANUAL mode and run again")
key.wait()
return
  end
  console.clear()
  print("BIAS and DARK initial sequences (10+10 photos)".."\n".."Select in MANUAL mode prefered iso/aperture/speed and ".."\n".."cover the objetive with the cap".."\n".."\n".."Press any key to start")
  key.wait()
  console.clear()

  -- Declare local variables to keep camera configuration at the start and use it
 
  local a = camera.aperture.value
  local i = camera.iso.value
  local s = camera.shutter.value

print("Starting the sequence with this configuration:")
print("\n")
print ("Aperture = "..tostring(a))
print ("ISO = "..tostring(i))
print ("Speed = "..tostring(s))
print("\n")
print("\n")
print("You are going to take "..tostring(6*n).." pictures")
print("Silent mode is recomended for this script")
print("\n")
print("\n")
print("Press any key to continue")
key.wait()
  console.clear()
console.hide()
 
  -- BIAS sequence
    camera.aperture.value = a
  camera.iso.value = i
  camera.shutter.value = 1/4000
local r = 0
while r < n do
console.hide()
lv.start()
camera.shoot()
r = r+1
lv.pause()
console.show()
msleep(100)
display.notify_box("Initial BIAS "..tostring(r).." of "..tostring(n).."\n"..
"Initial DARK 0 of"..tostring(n).."\n"..
"LIGHT 0 of "..tostring(n).."\n"..
"Final DARK 0 of "..tostring(n).."\n"..
"Final BIAS 0 of "..tostring(n).."\n"..
"Final FLAT 0 of "..tostring(n).."\n"..
"TOTAL "..tostring(r).." of "..tostring(6*n),3000)
msleep(100)
end

  -- DARK sequence
  camera.aperture.value = a
  camera.iso.value = i
  camera.shutter.value = s
  console.clear()
local r = 0
while r < n do
console.hide()
lv.start()
camera.shoot()
r = r+1
lv.pause()
console.show()
msleep(100)
display.notify_box("Initial BIAS done!".."\n"..
"Initial DARK "..tostring(r).." of "..tostring(n).."\n"..
"LIGHT 0 of "..tostring(n).."\n"..
"Final DARK 0 of "..tostring(n).."\n"..
"Final BIAS 0 of "..tostring(n).."\n"..
"Final FLAT 0 of "..tostring(n).."\n"..
"TOTAL "..tostring(n+r).." of "..tostring(6*n),3000)
msleep(100)
end

  -- LIGHT sequence
  lv.pause()
console.clear()
console.show()
  print("LIGHT sequence (10 photos)","\n","Uncover the objetive","\n","\n","Press half shutter to start")
  key.wait()
  console.clear()
console.hide()

  camera.aperture.value = a
  camera.iso.value = i
  camera.shutter.value = s

local r = 0
while r < n do
console.hide()
lv.start()
camera.shoot()
r = r+1
lv.pause()
console.show()
msleep(100)
display.notify_box("Initial BIAS done!".."\n"..
"Initial DARK done!".."\n"..
"LIGHT "..tostring(r).." of "..tostring(n).."\n"..
"Final DARK 0 of "..tostring(n).."\n"..
"Final BIAS 0 of "..tostring(n).."\n"..
"Final FLAT 0 of "..tostring(n).."\n"..
"TOTAL "..tostring(2*n+r).." of "..tostring(6*n),3000)
msleep(100)
end
lv.stop()
console.clear()
console.show()
  print("Press any key to end")
  key.wait()
console.clear()
  console.hide()
end


(It's a long code, but just to show I'm lost about the display function)

What is a good way of showing the progress when taking pictures in "silent mode"? Print to console, notify box, stop the Live View before...?

Thanks again, the drill works!
#3
Scripting Corner / Re: Script for Astrophotography
October 27, 2020, 05:44:14 PM
Quote from: Walter Schulz on October 27, 2020, 05:15:00 PM
I think you know the drill:
Break it down into smaller pieces. Make piece after piece working and don't try to solve everything at once.

And be sure: garry23 had to struggle in the very beginning, too. We witnessed most of it and his progress. ;-)

AFAIK there is no option to switch modes. I think you have to check for manual mode change, instead.

Drill started!

Thanks!
#4
Scripting Corner / Re: Script for Astrophotography
October 27, 2020, 04:53:32 PM
Sorry about the questions. Just get it working is enough, it's true. Take it as a consecuence os being stuck.

I'll check out your DOFIS script, sure. I checked some other of your scripts before posting (you are quite active, thanks!), but I'm afraid they are really complex for me.
#5
Scripting Corner / Script for Astrophotography
October 27, 2020, 03:45:45 PM
Hi,

I'm trying to write an script for Astrophotography, to complete the sequence of pics for DARK, BIAS, LIGHT and FLAT corrections.

It seems an easy one, it just have to take several pictures in silent mode at different shutter values, with or without a cap on the objetive. But I'm afraid I'm new with lua. I copied code from other scripts in the forum, examples, etc.

This is the code I write as an starting point (don't be cruel with the rookie):
menu.new
{
  name = "Astrophoto",
  help = "Takes several photos to complete BIAS, DARK, LIGHT and FLAT sequences, for astrophotografy",
  select = function(this) task.create(astrophoto) end,
}

function astrophoto()
  menu.close()
  console.show()
  console.clear()
  print "BIAS and DARK initial sequences (10+10 photos)"
  print "Switch to Manual mode and cover the objetive with the cap"
  print "Press any key to start"
  key.wait()
  console.hide()

  -- BIAS sequence
  camera.aperture.value = 3.5
  camera.iso.value = 1600
  camera.shutter.value = 1/4000
local i = 0
while i < 10 do
camera.shoot()
i = i+1
end

  -- DARK sequence
  camera.aperture.value = 3.5
  camera.iso.value = 1600
  camera.shutter.value = 1
  local i = 0
while i < 10 do
camera.shoot()
i = i+1
end
 
  console.show()
  console.clear()
  print "LIGHT sequence (10 photos)"
  print "Uncover the objetive and press any key to start"
  key.wait()
  console.hide()

  -- LIGHT sequence
  camera.aperture.value = 3.5
  camera.iso.value = 1600
  camera.shutter.value = 1
  local i = 0
while i < 10 do
camera.shoot()
i = i+1
end

  console.show()
  console.clear()
  print "BIAS and DARK final sequences (10+10 photos)"
  print "Cover the objetive and press any key to start"
  key.wait()
  console.hide()

  -- DARK sequence
  camera.aperture.value = 3.5
  camera.iso.value = 1600
  camera.shutter.value = 1
  local i = 0
while i < 10 do
camera.shoot()
i = i+1
end
 
  -- BIAS sequence
  camera.aperture.value = 3.5
  camera.iso.value = 1600
  camera.shutter.value = 1/4000
  local i = 0
while i < 10 do
camera.shoot()
i = i+1
end

  console.show()
  console.clear()
  print "FLAT sequence (20 photos)"
  print "Cover with an iluminated diffusor and switch to Av mode"
  print "Press any key to start"
  key.wait()
  console.hide()

  -- FLAT sequence
  camera.aperture.value = 3.5
  camera.iso.value = 1600
  local i = 0
while i < 20 do
camera.shoot()
i = i+1
end

  console.show()
  console.clear()
  print "Everything done!"
  print "Press any key to end the script"
  key.wait()
  console.hide()

end


Todo:

1 Get it working!  :-\
2 Print the count of pictures taken/to be taken
3 Automatically change mode to manual/Av/silent (I don't know if can be done)
4 Automatically take shutther/iso/speed values set at the beggining of the script

I'll keep trying, but the truth is... I'm stuck. I would appreciate some help.
#6
Scripting Corner / Re: LUA Scripting (lua.mo)
January 12, 2016, 08:00:52 AM
So...

I've got all the code ready (thanks Licaon_Kter!), Black Eyed Peas are waiting at the living room with lots of fireworks, a lighter and a dangerous look...

I think I have everything, I can compile it. Wait!, it's already done at the mainline!

Thanks Walter, g3gg0, dmilligan!
#7
Scripting Corner / Re: LUA Scripting (lua.mo)
January 11, 2016, 08:29:58 AM
Hi,

I'm also eager to experiment with scripting, and as garry23, compiling can be too complicated for me.

I've tried the "codio way" at

http://www.magiclantern.fm/forum/index.php?topic=14725.msg142351#msg142351

but I'm afraid that web has now restrictions (no Terminal tool if you don't have a paid account).

I have access to a linux computer (ubuntu) so...

can anybody please tell me how to compile lua.mo on it's terminal?

I'm afraid I could need a "dummy" approach: "download all the files from this link" and so on.

This is a community project. Although my skills are quite basic, I will contribute with probably World's simplest scrip!  :)

Thank you anyway, your work has been jus amazing (and your patience with newbies like me),

Javi.
#8
Hi,

I 'm trying to use audio remote control to stop recording video, but I can't. No problem for starting.
I have previously selected, "Half shuter " in the menu " REC key" , but without success.
any ideas?


Note: I need it when camera is inside a DIY waterproof case.