Ill-planned last minute rush to rewrite G9/SX40HS Eclipse script - Script Writing - CHDK Forum

Ill-planned last minute rush to rewrite G9/SX40HS Eclipse script

  • 6 Replies
  • 5239 Views
Advertisements
I've booked a trip from the UK to the US to view August 2017 Eclipse and suddenly decided to have another try at a CHDK script for shooting the Eclipse using a G9 and/or an SX40HS.

I've used the G9 before, back in 2010, but found that I had to add a couple of new bits of functionality into CHDK: a check to see whether a script is trying to press a key that doesn't exist on the particular camera (and generate an error) and, more importantly for Eclipses, a modification to bracketing during continuous shooting, so that the bracketing range would be repeated continuously until the shooting was stopped. Both of these were shared in this forum back in 2010 but AFAIK they weren't incorporated - the key check appears to have been added in a different form but so far I've not spotted anything that'll do the bracketing. Anyway, the old script did everything that was asked of it *EXCEPT* that it could not hold the focus on infinity, so I got a set of reasonable exposures but totally useless images :-(

For various reasons I'd put all this to one side, but the possibility of getting hold of another old camera - the SX40HS - made me wonder if CHDK was ported to it and then, how has CHDK progressed in seven years: is there something that can help holding the focus now? The answer appears to be "yes" - at least, there is more discussion of focus stacking/focus bracketing, which implies better script control over focus.

So, with not enough time left and as hard a deadline for coding as it is possible to have, why not dive right in?

I was a bit surprised at how few mentions I've found about using CHDK to photograph an eclipse, so I thought I'd try posting something (and actual useful details will come in following posts): if I've just missed finding the place where everyone else is discussing this sort of thing, maybe someone will point me in that direction, otherwise maybe there will be something useful for your attempts on August 21...

Re: Ill-planned last minute rush to rewrite G9/SX40HS Eclipse script
« Reply #1 on: 31 / July / 2017, 16:34:21 »
Overview of an Eclipse shooting script

As you'll know, an Eclipse has a number of distinct phases, each of which requires a different approach:

  • Approaching First Contact
  • Waiting for Second Contact
  • Approaching Second Contact: Diamond Ring, Bailey's Beads
  • Totality
  • Third Contact
  • Waiting for Fourth Contact
  • Approaching Fourth Contact
For (1), (2), (6) and (7) we will be shooting through a Solar Filter, with fixed exposures - the images will be literally black with some white in the middle (and maybe a few sunspots showing up). For (1) we want fixed-exposures but in rapid succession, to capture the point of First Contact. For (2) we want regular shots taken over a long period of time, to show the Moon sliding across the Sun. For (3) we want to go back to rapid shooting, to capture the best of the light through the Moon's mountains: we'll be taking the filter off. For (4) we want continuous shooting, repeatedly cycling through as wide a range of exposures as we can. (5) is the same as (3). (6) is the same as (2) and (7) is treated the same as (1), to capture the smallest possible sliver of Fourth Contact.

During all of the above, we want to have as little interaction as possible with the camera, so we can enjoy the spectacle - unless we've got a suitable motorised platform, about the only thing that we should need to do is manually tweak the camera's position to track the Sun, especially for the long phases.

So a half-way decent Eclipse script will be driven using a remote release connected to the USB port: start in Phase (0) just doing nothing. Flick the switch - jumps into Phase (1). Flick the switch - jumps into Phase (2). And so on. Other useful features include:

  • putting onto the display an indication of which Phase we are in (but keep the display off as much as possible, to save the battery).
  • naming and numbering the shots to include the Phase and basic exposure info

*

Offline reyalp

  • ******
  • 14118
Re: Ill-planned last minute rush to rewrite G9/SX40HS Eclipse script
« Reply #2 on: 31 / July / 2017, 17:39:24 »
Anyway, the old script did everything that was asked of it *EXCEPT* that it could not hold the focus on infinity, so I got a set of reasonable exposures but totally useless images :-(
Both of the cameras mentioned have manual focus in the Canon firmware. CHDK focus overrides have improved sine 2010, but if it still doesn't work, doing it using the regular firmware should be straightforward and relatively foolproof.

No matter what, I'd advise doing several full up test runs in advance so you can be sure you have the whole process dialed. Checklists are also a good way to make sure you don't miss something in the excitement of the real thing.

Quote
but the possibility of getting hold of another old camera - the SX40HS - made me wonder if CHDK was ported
The SX40 is supported.

FWIW, there was another request for an eclipse related script here: https://chdk.setepontos.com/index.php?topic=13127.0

Don't forget what the H stands for.

*

Offline topshot

  • *
  • 26
  • S100
Re: Ill-planned last minute rush to rewrite G9/SX40HS Eclipse script
« Reply #3 on: 09 / August / 2017, 12:17:16 »
I was a bit surprised at how few mentions I've found about using CHDK to photograph an eclipse, so I thought I'd try posting something (and actual useful details will come in following posts): if I've just missed finding the place where everyone else is discussing this sort of thing, maybe someone will point me in that direction, otherwise maybe there will be something useful for your attempts on August 21...

I thought the lack of posts on eclipses was odd as well. How are you coming on your script? I had just planned to use the basic intervalometer script I had used for sunset/rise years ago, YASS, except for totality. I saw there was an improved version now. I only intend to do landscape shots since none of my cameras have a long zoom so the sun will appear fairly small in the frame, similar to http://total-solar-eclipse.net/


Re: Ill-planned last minute rush to rewrite G9/SX40HS Eclipse script
« Reply #4 on: 16 / August / 2017, 23:09:05 »
So, here is my almost-but-not-quite complete eclipse script (work on it continues...) Actually, it is a few small mods to CHDK and a Lua script, which relies on those mods...

The files here started from the main CHDK repository trunk as it stood at Subversion revision 4899 - so these files can just be dropped into a working copy at that revision: sorry, too rushed to do patch files or the like! Current activity in CHDK has tended to be away from these areas so I don't expect to see much conflict in the short term...

CHDK :

Has had added a new option for bracketing during continuous shooting, to reset back to the initial settings after k shots and then just keep cycling around. On its own this makes for a good approach to Totality.

It has also had a all of the bracketing exposed to Lua, along with a call to set the USB remote handling into a sane state at the start of a script.

A suffix has been added to the version number, just to identify this as non-standard (until these mods get merged into the mainstream, hint). Oh, and I've not edited out the marker comments //##SG that were put in as a temporary aid to remind me where the changes are. As I said, bit of a rush.

Lua script

The script eclipse.lua is meant to be used with a USB remote control. You start it running before First Contact then, as the time approaches, you push then release the remote (I use a toggle switch for a positive action without looking): this starts the intro phase, taking the same exposure at regular intervals.

As Second Contact nears, bringing Bailey's Beads, toggle the USB remote again and the script does continuous shots with a bit of exposure control. Another toggle at Second Contact and you get ramping during Totality. Then another chance at the Beads/Diamond Ring and finally the slow exit.

The screen is kept off as much as possible, to save the battery.

This is a G9-specific script, as I couldn't see how to, e.g., change into continuous mode without just pressing the buttons as you would manually; if you know your camera well changing that should be reasonably easy (or if I've missed a generic mechanism provided to a script by CHDK!)

WHAT THIS DOES NOT YET DO is:

  - fix the white balance (do that manually before running the script)

  - force the camera to stay focussed on infinity

The last of these is a MAJOR HOLE but I won't have another chance to upload any more complete version of this before the action begins :-(

Even if you ignore the Lua script as being too unfinished, the bracketing control added to the core CHDK is well worth using during Totality.

Re: Ill-planned last minute rush to rewrite G9/SX40HS Eclipse script
« Reply #5 on: 16 / August / 2017, 23:43:50 »
  - force the camera to stay focussed on infinity
The last of these is a MAJOR HOLE but I won't have another chance to upload any more complete version of this before the action begins :-(
Links>
set_mf( 1 )
set_focus( 60000 )
Ported :   A1200    SD940   G10    Powershot N    G16

Re: Ill-planned last minute rush to rewrite G9/SX40HS Eclipse script
« Reply #6 on: 17 / August / 2017, 09:10:16 »
Thanks waterwingz.

As I _have_ been able to get one last chance to log in here, I've attached what is going to have to be the final form of this script. Just the Lua code has changed, adding in the focus setting (um, in a rather long-winded way 'cos I didn't spot waterwingz's message until I'd got that far, nicking pretty much the entirety of one of the manual focus tests so I could experiment!) - and also locking the aperture to known value.

What I forgot to mention is that this script also creates text files alongside the images which make a note of which images are supposed to belong to which phase (it can be hard to remember otherwise) and also list out the exposure settings used (in APEX96 values, just to be confusing).

Good luck to everyone pointing a camera upwards on Monday!

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal