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

Topics - f.javi.pz

#1
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.
#2
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.