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 - csg2

#1
Quote from: Walter Schulz on January 03, 2024, 10:44:31 AM
I can only strongly recommend not to use nightly build for LUA scripting!

I was looking at the lua-fix builds under experimental builds. Is this for all cameras?
#2
Quote from: names_are_hard on January 03, 2024, 02:57:48 AM
What build of ML are you using?

If you reduce your script so it only does a sleep(2) in main, do you still see an error?
If you replace sleep(2) with msleep(2000), do you see an error?

Nightly.2018.Jul03.550D.109

With a sleep being the only call in function_main() I get a different error message.

[C] in function 'globals.error'
[dtring "-- strict.lua..."]:49 in metamethod '__index'
ML/Scripts/Lunatic.lua:10: in function 'globals.main'

Line 10 is the line sleep is called from in the modified script.

With msleep in place of sleep, there is no error.

require("logger")

-- global logger
test_log = nil
LAF = nil
Number_of_Shots=nil
AF_every_Shot=nil

function main()
    sleep(2)
end

function main2()
    test_log = logger("ML/LOGS/LUATEST.LOG")
    Number_of_Shots=100
    AF_every_Shot=10
    menu.close()
    console.show()
    print "Lunatic!"
    sleep(2)
    for i=Number_of_Shots,1,-1
    do
if ((Number_of_Shots % AF_every_Shot) == 0) then
            lunatic_AF()
        else
            camera.shoot(false)
end
        sleep(1.6)
    end
    print "Press any key to exit."
    key.wait()
    console.hide()
end

function lunatic_AF()
    if lens.name == "" then
       printf("No Lens Detected.\n")
       return false
    end

    if not lens.af then
        printf("Please enable autofocus.\n")
        return false
    end

    if not lv.running then
       lv.start()
       assert(lv.running)
    end

    if lens.af then
LAF=camera.shoot(true)
        lv.stop()
        return LAF
    end

    lv.stop()
    return false

end -- lunatic_AF

function printf(s,...)
    test_log:writef(s,...)

    if not console.visible then
        display.notify_box(s:format(...), 5000)
    end
end

keymenu = menu.new
{
    name   = "Lunatic - Moon Stack Automation",
    help   = "Automates Lunar Stack Capture",
    select = function(this) task.create(main) end,
}
#3
Hi Folks,

I am working on a LUA script. Have been stumbling along OK, but recently hit a wall. I want to be able to pause in the scrip0t for certain lengths of time. So I have been trying to use the sleep global function.

When i do this I get a console message "variable 'sleep' is not declared. If ti matters, this is on a Canon 550d.

My script is supposed to start with an auto-focus, and take 99 more pictures, then auto focus and so on until complete. I have a delay to start so any motion caused by pressing the button to start the script can die down. There is also supposed to be a delay between shots so as not to fill up the buffer.

Code follows:

require("logger")

-- global logger
test_log = nil
LAF = nil
Number_of_Shots=nil
AF_every_Shot=nil

function main()
    test_log = logger("ML/LOGS/LUATEST.LOG")
    Number_of_Shots=100
    AF_every_Shot=10
    menu.close()
    console.show()
    print "Lunatic!"
    sleep(2)
    for i=Number_of_Shots,1,-1
    do
if ((Number_of_Shots % AF_every_Shot) == 0) then
            lunatic_AF()
        else
            camera.shoot(false)
end
        sleep(1.6)
    end
    print "Press any key to exit."
    key.wait()
    console.hide()
end

function lunatic_AF()
    if lens.name == "" then
       printf("No Lens Detected.\n")
       return false
    end

    if not lens.af then
        printf("Please enable autofocus.\n")
        return false
    end

    if not lv.running then
       lv.start()
       assert(lv.running)
    end

    if lens.af then
LAF=camera.shoot(true)
        lv.stop()
        return LAF
    end

    lv.stop()
    return false

end -- lunatic_AF

function printf(s,...)
    test_log:writef(s,...)

    if not console.visible then
        display.notify_box(s:format(...), 5000)
    end
end

keymenu = menu.new
{
    name   = "Lunatic - Moon Stack Automation",
    help   = "Automates Lunar Stack Capture",
    select = function(this) task.create(main) end,
}
#4
Quote from: dansawyer on August 02, 2019, 09:32:11 PM
Use of astro.mo
I was able to compile and install astro.mo. Last night I tried to test it and have a couple of general questions.
First, it generally worked. I was using a an EOSM and a 90 mm fl f4 lens. This may be short for the module design target, but I believe the fl should not matter significantly. The issue above of the red background oscillating in and out did not occur in actual use, only in the menu screen.
First, the number of visible stars was very limited in the display. I was aiming generally West and chose Vega around 3 AM. Other stars did not show up in the field. Is this the general experience or on there something I am missing? Should I use EV display amplification? Will that distort the operation by creating noise?
Second, the actual focus display seemed to vary quite a bit on its own. That is the min bar would move to null then up several bars, then back down. This variation seemed to be on the same order of magnitude as changes in focus. Is this normal? Is there an error in my testing? Is this the result of a relatively short fl lens. 
I am looking forward to testing this on my Celestron 9.25.

Hi dan,

I have been doing moon photography with a 550d. I find when doing alignment for my GoTo mount with live view, the stars are faint and I have to crank up the exposure time and ISO to see an image there. If you are doing long exposures, the live view will not be a good indicator of the final result. Also keeping the live view on drains the battery and heats up the sensor. Heating up the sensor introduces more noise into the final image. What I do is crank up for the alignment phase, and then adjust exposure for my final target. I usually take pics of the moon and so the exposure is not too tricky. If you want to take pics of stars, constellations and so on, I suggest you seek advice over on cloudynights.com or another amateur astronomy forum.

I haven't got a clue about the other issue.
#5
Hi folks,

So what does the camera do when you press the shutter or trigger an exposure with an intervalometer?

I have been trying to stack images of the moon and been plagued by blurry shots. Out of curiosity, I got an accelerometer to measure the vibrations the camera was making. With a mirror lens, and therefore no shutter, there appear to be 4 motions. I guess this is
1. Mirror up
2. Light curtain?

Exposure

3. Light curtain?
4. Mirror down

Is this right?

What about the electronic part of the process?

If there is an post somewhere about this I would be glad of a pointer.

For ref I have a 550D.