fixedint.lua: Astrophotography oriented script for long exposure + timelapse - page 3 - Completed and Working Scripts - CHDK Forum

fixedint.lua: Astrophotography oriented script for long exposure + timelapse

  • 35 Replies
  • 31736 Views
*

Offline reyalp

  • ******
  • 14125
Advertisements
Is there any limitation of maximum exposure time?
Yes. The time is measured in microseconds. A bit over 2000 it overflows what fits in a signed, 32 bit integer.

Generally speaking, you are probably better off stacking instead of using such long exposures anyway.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14125
Discussion of diplsay/sensor off stuff split to https://chdk.setepontos.com/index.php?topic=13319.0
Don't forget what the H stands for.

*

Offline c_joerg

  • *****
  • 1251
Interval of 60s (TV=5s) is a limited as well?
M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

*

Offline reyalp

  • ******
  • 14125
Interval of 60s (TV=5s) is a limited as well?
That looks like a bug, thanks.

I haven't tested yet, but I think you can work around this by changing

hook_shoot.set(10000)
to
hook_shoot.set(10000+interval)
Don't forget what the H stands for.

*

Offline c_joerg

  • *****
  • 1251
hook_shoot.set(10000+interval)
Thanks, it helps for this condition…

I made another run with Interval of 60s and TV=30s. One run with ‘Disable Canon Dark Frame’ and one without. The different between each shoot was always 60s. I would expect, when Canon does Dark Frames, the different between each shoot would be a little bit higher than 60s.

Than I went to the Canon menu. The M3 has a menu to switch noise reduction on for TV > 1s. Default was auto. I set it to On.
After I set it on, I got always the hockutil timeout error. Independent if I run with ‘Disable Canon Dark Frame’ or without. Even with TV=20s I got the error.


M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

*

Offline reyalp

  • ******
  • 14125
I uploaded version 1.3. The main change is that you can now set it to start a specific clock time. I've found this works quite well for satellite passes. If the time is more than a minute in the past, it uses the next day, so you can schedule shots after midnight.

You can also specify zoom and focus distance (subject to the usual CHDK SD override caveats) so the camera can sit in playback mode until it's time to shoot.

The interval issue in comment #22 above is also fixed.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14125
One thing this script is useful for is taking multiple images for stacking. Attached sx710 single frame, and median of 60 frames sharpened with RL deconvolution

Bonus:
All the frames as video https://app.box.com/s/v82uw098vi0wwi1gpreiqibfnj6248xh
Don't forget what the H stands for.

fixedint.lua: Astrophotography oriented script for long exposure + CHDKPTP
« Reply #27 on: 19 / November / 2019, 19:53:59 »
Hi Reyalp,

  I presume that you are the developer of the fixedint.lua script for astrophotography.

   I have been playing with CHDK on my Canon G16 camera for about 2 years now and I am starting to get some nice results.  I've attached an image of the North America nebula I recently took, having stacked about 30 x 30 second exposures taken using CHDK PTP to operate the camera remotely.   The problem is I need to press the shoot button each time and also make sure the focus is set to infinity as the camera does not lock from shot to shot.

  The next sensible step seems to be to use your script to control the camera.  It works fine on the G16 and I can take a few test shots at the kitchen table.  BUT then it won't work on CHDK PTP.  If I set the script up and run it from "shoot" button in CHDK PTP, it just seems to ignore the script, or the camera behaves erratically.   To be sure it is a CHDK PTP problem, I tried the same steps on my Canon A720IS, with the same results.   Script works fine on the camera alone, but I can't run it from the live view window of CHDKPTP.

   Have you, or other users of CHDK PTP in this forum had similar experiences?  Are there any things I can do to make the script and CHDK PTP play nice together?  My eventual goal is to be able to set the camera and script up, press "shoot" and go away for a few minutes while it takes 10 or so 30-60 second exposures.  Then I can come back and repeat with a few dark frames, then take more exposures, etc.  But I can be staring up at the sky with binoculars while I do that, rather than at the screen, anticipating each exposure to finish.   

  Any help resolving this issue would be greatly appreciated!

  Dan

p.s.  and thanks for your great script - I may end up using it without PTP, but it will soon get cold out!

Ok, pardon my transgression!!  I normally do my research *before* I ask a question.   This time I found the answer after. 

I now know why I can't run scripts on CHDK PTP.  The gui is essentially running lua commands to operate the camera, not pressing the buttons directly. 

I then re-structure my original question.  Is there a batch version of the Fixed Exposure Intervalometer that can be run via CHDKPTP?  Is there perhaps a utility that can take a lua program and send it as command line commands through the interface instead?   

Or is there another camera/chdk interface that would be more applicable?   I have in fact tried PTPcam and PTPcamgui and one of them didn't work well on my G16, and the other didn't seem to work at all.  CHDKPTP is the best for overall control.

Thanks in advance,

 Dan

*

Offline reyalp

  • ******
  • 14125
Re: fixedint.lua: Astrophotography oriented script for long exposure + CHDKPTP
« Reply #29 on: 19 / November / 2019, 21:15:16 »
   I have been playing with CHDK on my Canon G16 camera for about 2 years now and I am starting to get some nice results.  I've attached an image of the North America nebula I recently took, having stacked about 30 x 30 second exposures taken using CHDK PTP to operate the camera remotely.
Nice shot :)

Quote
The problem is I need to press the shoot button each time and also make sure the focus is set to infinity as the camera does not lock from shot to shot.
An alternative approach would be to use the "rs" or "shoot" cli commands with multiple shots. Like
Code: [Select]
rs -tv=30 -cont=30 -sd=-1
This will shoot 30 exposures of 30 seconds each, in continuous mode with exposure and focus locked, saving each image directly over USB instead of the using the SD card.

sd=-1 should set focus to infinity, but if you want to manually adjust before hand, you can set the camera to MF mode and adjust using the GUI.

Note that rs doesn't work directly with canon raw, only CHDK DNG or jpeg, although if the you set the camera to Canon raw only, it should download those as if they were jpegs.

use help rs for details of the options. If you want to save images to the SD card, "shoot" takes similar options.

Quote
  The next sensible step seems to be to use your script to control the camera.  It works fine on the G16 and I can take a few test shots at the kitchen table.  BUT then it won't work on CHDK PTP.  If I set the script up and run it from "shoot" button in CHDK PTP, it just seems to ignore the script, or the camera behaves erratically.   To be sure it is a CHDK PTP problem, I tried the same steps on my Canon A720IS, with the same results.   Script works fine on the camera alone, but I can't run it from the live view window of CHDKPTP.
To run a script on the camera, you have to use the lua / . command like
Code: [Select]
.loadfile('A/CHDK/SCRIPTS/fixedint.lua')()
However, this will not work directly with fixedint, because the script menu options will not be set. To do that, you can make a glue script.

To make the glue script, take all the lines with # in front of them in header of fixedint, and set the values you want, removing or commenting out everything following the value, like

Code: [Select]
ui_shots=1 --"Shots (0=unlimited)"
ui_interval_s10=0 --"Interval Sec/10 (0=max)"
ui_use_raw_e=1 --"Use raw" {Default Yes No}
ui_disable_dfs=true --"Disable Canon Dark Frame"
ui_tv_e=3 --"Tv" {0 256 128 64 32 16 8 4 2 1 1/2 1/4 1/8 1/16 1/32 1/64}
ui_tv_s=0 --"Tv + sec" [0 2000]
ui_tv_s10000=0 --"Tv + sec/10000" [0 10000]
ui_start_delay=300 --"Start delay (ms)"
ui_start_hour=-1 --"Start hour (-1 off)" [-1 23]
ui_start_min=0 --"Start minute" [0 59]
ui_start_sec=0 --"Start second" [0 59]
ui_iso=0 --"ISO (by CHDK, 0=not set)"
ui_iso_mode_e=0 --"ISO (by ISO mode)" {No 80 100 200 400 800 1600}
ui_zoom_mode_t={} --1 "Zoom mode" {Off Pct Step} table
ui_zoom_mode_t.value="Off"
ui_zoom=0 --"Zoom value" [0 500]
ui_sd_mode_t={} --1 "Focus override mode" {Off MF AFL AF} table
ui_sd_mode_t.value="Off"
ui_sd=0 --"Focus dist (mm)" long
ui_use_cont=true --"Use cont. mode if set"
ui_display_mode_t={} --1 "Display" {On Off Blt_Off} table
ui_display_mode_t.value="On"
ui_shutdown_finish=false --"Shutdown on finish"
ui_shutdown_lowbat=true --"Shutdown on low battery"
ui_shutdown_lowspace=true --"Shutdown on low space"
ui_darks=false --"Make dark frames"
ui_log_mode={} --2 "Log mode" {None Append Replace} table
ui_log_mode.value="Append"
loadfile('A/CHDK/SCRIPTS/fixedint.lua')()
Note for values like shutter speed, you need to set the 0 based index so in the above value ui_tv_e=3 means 64 seconds. Table values like ui_log_mode also need special treatment, as shown.
If you saved that as fixedint_glue.lua in the chdkptp directory on your PC, you could then run it like
Code: [Select]
.<fixedint_glue.lua
This tells chdkptp to read fixedint_glua.lua, send it to the camera, and start it running. That in turn sets all the menu variables and then runs the fixedint.lua on the camera. To change settings, you'd need to edit the variables in the glue script.

An example for a different script (rawopint) is included in the extras directory lua/extras/rawopint_rs.lua
Note this can be used *with* rsint as described in the comment (so each shot downloads as it is taken instead of writing to the SD card), but can also be used standalone as described above.
« Last Edit: 19 / November / 2019, 21:18:48 by reyalp »
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal