Lunar Eclipse Script or Sequence?
-
Cutterpillow
- Posts: 9
- Joined: Sat Mar 08, 2025 2:00 am
Lunar Eclipse Script or Sequence?
I'm looking to try to automate a sequence that captures the upcoming Lunar Eclipse. I'd like to do a series of captures (300-500 frames) every minute or two so that I can stack the captures to create a time-lapse. I've been looking at the Advanced Sequence Editor and it looks really good. However, I'm not sure how I'd make sure that the exposure is set properly for each capture as the eclipse progresses? Is there a way to do some kind of auto-exposure before I start a capture that ensures the histogram isn't clipped? Is "Solar system auto set exposure/gain" what I'm looking for?
I've tried searching for any existing scripts or sequences for a lunar eclipse but I haven't been able to find anything. The best I could find was the SharpCap Eclipse Sequence Creator, but that's designed for a solar eclipse. Does anyone know of scripts or sequences designed for a lunar eclipse?
Any tips on doing a proper auto-exposure prior to starting each capture?
Cheers,
Dave
I've tried searching for any existing scripts or sequences for a lunar eclipse but I haven't been able to find anything. The best I could find was the SharpCap Eclipse Sequence Creator, but that's designed for a solar eclipse. Does anyone know of scripts or sequences designed for a lunar eclipse?
Any tips on doing a proper auto-exposure prior to starting each capture?
Cheers,
Dave
- admin
- Site Admin
- Posts: 17342
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Lunar Eclipse Script or Sequence?
Hi Dave,
I'm not aware of anything specifically for lunar eclipses so far, but who knows if other people out there are planning the same sort of thing that you are...
You are on the right track with using the advanced sequence editor, and the 'Solar system auto set exposure/gain' step should give you what you need to adjust the brightness of the image before each capture. That step will try to set the gain and exposure so that the peak pixel brightness in the image is somewhere in the region of about 80%, along with aiming to keep the FPS at or above the specified level (ie setting an FPS of 30 will mean that exposures above 33ms will be avoided if possible).
It's probably worth testing the autoexposure step out on the moon a few times in advance to see how it works with your setup - you can also test on terrestrial targets too.
Thinking about it, it might be worth trying using the solar mosaic generator, looking a the sequence it creates and seeing if that gives you any ideas.
cheers,
Robin
I'm not aware of anything specifically for lunar eclipses so far, but who knows if other people out there are planning the same sort of thing that you are...
You are on the right track with using the advanced sequence editor, and the 'Solar system auto set exposure/gain' step should give you what you need to adjust the brightness of the image before each capture. That step will try to set the gain and exposure so that the peak pixel brightness in the image is somewhere in the region of about 80%, along with aiming to keep the FPS at or above the specified level (ie setting an FPS of 30 will mean that exposures above 33ms will be avoided if possible).
It's probably worth testing the autoexposure step out on the moon a few times in advance to see how it works with your setup - you can also test on terrestrial targets too.
Thinking about it, it might be worth trying using the solar mosaic generator, looking a the sequence it creates and seeing if that gives you any ideas.
cheers,
Robin
Re: Lunar Eclipse Script or Sequence?
Hi Dave
I also had the same thought of doing a sequence of video shorts during the eclipse.
The. 'Solar system auto set exposure/gain' Function sounds promising.
Assuming we get some clear nights in next couple days ( Texas) I will experiment with this.
If I get something promising I will post here.
Please post here if you get something good for sharpcap.
I have a good ( hopefully foolproof) backup plan to shoot with my canon EosRa using the LetnC lunar eclipse camera control program.
This is from the same guy who created the solar eclipse capture program for canon cameras.
You can check it out on this YouTube
Preparing for the 2025 Total Lunar Eclipse
Take care
Steve
I also had the same thought of doing a sequence of video shorts during the eclipse.
The. 'Solar system auto set exposure/gain' Function sounds promising.
Assuming we get some clear nights in next couple days ( Texas) I will experiment with this.
If I get something promising I will post here.
Please post here if you get something good for sharpcap.
I have a good ( hopefully foolproof) backup plan to shoot with my canon EosRa using the LetnC lunar eclipse camera control program.
This is from the same guy who created the solar eclipse capture program for canon cameras.
You can check it out on this YouTube
Preparing for the 2025 Total Lunar Eclipse
Take care
Steve
Re: Lunar Eclipse Script or Sequence?
Hi All
OK this is my simplistic shot at a lunar eclipse capture sequence.
assumes already slewed to moon .
Too simple??
weather permitting , I may test tonight doing artificial eclipse.
Suggestions welcome.
SEQUENCE
DEF SUB "WAIT X MINS"
DELAY 480
#WAIT 10 MINS
END SUB
DEF SUB DoCapture
AUTOEXPOSE SOLARSYSTEM TARGET 30 FPS
#do I need a delay here for above function to finish?
CAPTURE 30 SECONDS LIVE FRAMES
#Add more capturing stuff here
END SUB
SET OUTPUT FORMAT TO "SER file (*.ser)"
TARGETNAME LUNAR
LOOP UNTIL LOCALTIME "5:00:00 AM"
#end of eclipse
GOSUB DoCapture
GOSUB "WAIT X MINS"
END LOOP
MOUNT PARK
END SEQUENCE
Oh
I also could not find any reference to "solar system auto set exposure/gain"
in the seq editor help file,
take care
steve
OK this is my simplistic shot at a lunar eclipse capture sequence.
assumes already slewed to moon .
Too simple??
weather permitting , I may test tonight doing artificial eclipse.
Suggestions welcome.
SEQUENCE
DEF SUB "WAIT X MINS"
DELAY 480
#WAIT 10 MINS
END SUB
DEF SUB DoCapture
AUTOEXPOSE SOLARSYSTEM TARGET 30 FPS
#do I need a delay here for above function to finish?
CAPTURE 30 SECONDS LIVE FRAMES
#Add more capturing stuff here
END SUB
SET OUTPUT FORMAT TO "SER file (*.ser)"
TARGETNAME LUNAR
LOOP UNTIL LOCALTIME "5:00:00 AM"
#end of eclipse
GOSUB DoCapture
GOSUB "WAIT X MINS"
END LOOP
MOUNT PARK
END SEQUENCE
Oh
I also could not find any reference to "solar system auto set exposure/gain"
in the seq editor help file,
take care
steve
-
Cutterpillow
- Posts: 9
- Joined: Sat Mar 08, 2025 2:00 am
Re: Lunar Eclipse Script or Sequence?
Thanks all for the tips. Glad to hear that the "Solar system auto set exposure/gain" should (hopefully) do the right thing. I started by building a test script that just does what I want it to do, but only loops 5 times:
Unfortunately I haven't been able to test even this simple test sequence as the weather has been cloudy/rainy (Seattle area). And the weather isn't looking very good for the eclipse either.
- Pad duration to 60.
- Do the auto-exposure/gain.
- Capture 400 frames.
Unfortunately I haven't been able to test even this simple test sequence as the weather has been cloudy/rainy (Seattle area). And the weather isn't looking very good for the eclipse either.
-
Cutterpillow
- Posts: 9
- Joined: Sat Mar 08, 2025 2:00 am
Re: Lunar Eclipse Script or Sequence?
So I did try testing my sequence just now. It’s cloudy, but the moon is at least visible through the clouds — should be a good auto-exposure test. However SharpCap froze very shortly after starting the sequence. It doesn’t ever seem to have gotten past the "Solar system auto set exposure/gain" step and everything in the UI was frozen. Nothing was saved to disk.
How long should the auto exposure step take?
I’ve attached the log file. I’ll try it again if I get a chance.
How long should the auto exposure step take?
I’ve attached the log file. I’ll try it again if I get a chance.
- Attachments
-
- Log_2025-03-10T19_31_45-10236.zip
- (94.38 KiB) Downloaded 115 times
-
Cutterpillow
- Posts: 9
- Joined: Sat Mar 08, 2025 2:00 am
Re: Lunar Eclipse Script or Sequence?
Second test resulted in the same behavior. It never gets past the auto-exposure step.
There’s tons of these messages in the log:
26,000+ frames before I killed it.
And occasionally:
Latest log attached.
There’s tons of these messages in the log:
Code: Select all
Debug 20:12:49.087166 #1 Sequencer : Info : 'Autoexposure : Frame 26001 at 03:12:49.0862466 evaluated as StillMeasuring, requested brightness change of 0.00% due to Accumulating measurements' while running step Solar system auto set exposure/gain in async void SharpCap.Base.AutoExposure.AutoExposureEngine.OnFrameReceived(GenericEventArgs<HistogramData> obj)
Debug 20:12:49.301577 #1 Sequencer : Info : 'Autoexposure : Frame 26011 at 03:12:49.3012578 evaluated as StillMeasuring, requested brightness change of 0.00% due to Accumulating measurements' while running step Solar system auto set exposure/gain in async void SharpCap.Base.AutoExposure.AutoExposureEngine.OnFrameReceived(GenericEventArgs<HistogramData> obj)
Debug 20:12:49.472681 #1 Sequencer : Info : 'Autoexposure : Frame 26018 at 03:12:49.4723239 evaluated as StillMeasuring, requested brightness change of 0.00% due to Accumulating measurements' while running step Solar system auto set exposure/gain in async void SharpCap.Base.AutoExposure.AutoExposureEngine.OnFrameReceived(GenericEventArgs<HistogramData> obj)
And occasionally:
Code: Select all
Debug 20:12:48.723026 #1 Sequencer : Info : 'Autoexposure : Frame 25984 at 03:12:48.7226533 evaluated as UnderExposed, requested brightness change of 200.00% due to 20 of 20 frames evaluated as underexposed' while running step Solar system auto set exposure/gain in async void SharpCap.Base.AutoExposure.AutoExposureEngine.OnFrameReceived(GenericEventArgs<HistogramData> obj)
Debug 20:12:48.909724 #1 Sequencer : Info : 'Autoexposure changed Exposure from 21.74ms to 21.74ms, aiming for a change of 1.00 and achieved 1.00 ' while running step Solar system auto set exposure/gain in double SharpCap.Base.AutoExposure.AdjustmentStrategyBase.ApplyAdjustmentTo(ICameraAdjustment adjustment, double relativeTarget)
- Attachments
-
- Log_2025-03-10T19_48_24-9460.zip
- (137 KiB) Downloaded 114 times
-
Cutterpillow
- Posts: 9
- Joined: Sat Mar 08, 2025 2:00 am
Re: Lunar Eclipse Script or Sequence?
I tried making just a very simple sequence using the Solar System Sequence Planner. Here it is:
But this too never gets past the auto-exposure step.
Code: Select all
SEQUENCE
DELAY 1
LIVE MODE
SET COLOUR SPACE TO RAW8
SET OUTPUT FORMAT TO "SER file (*.ser)"
TARGETNAME Moon
#Capture 200 Light frames
SEQUENCE
FRAMETYPE Light
AUTOEXPOSE SOLARSYSTEM TARGET 30 FPS
CAPTURE 200 LIVE FRAMES
END SEQUENCE
END SEQUENCE- admin
- Site Admin
- Posts: 17342
- Joined: Sat Feb 11, 2017 3:52 pm
- Location: Vale of the White Horse, UK
- Contact:
Re: Lunar Eclipse Script or Sequence?
Hi,
thanks for posting the log - it looks like the evaluation of the image is that it is underexposed and should be made brighter, however the exposure is already set to 21.74ms, which is the maximum compatible with the frame rate requested of 46fps. In that situation, the autoexposure *should* increase the gain, but doesn't seem to.
I wonder if the exposure of the camera is fractionally below the threshold, so the autoexposure tries to boost it right up to the threshold with a small increment, but because of rounding errors it ends up back below the threshold again and around it goes - I will make a tweak to the code to allow for that in the next update.
As a workaround, it might just work if you set a frame rate of 40fps, which will then calculate a max exposure of 25ms, which comes out exactly so might just avoid the same rounding errors.
cheers,
Robin
thanks for posting the log - it looks like the evaluation of the image is that it is underexposed and should be made brighter, however the exposure is already set to 21.74ms, which is the maximum compatible with the frame rate requested of 46fps. In that situation, the autoexposure *should* increase the gain, but doesn't seem to.
I wonder if the exposure of the camera is fractionally below the threshold, so the autoexposure tries to boost it right up to the threshold with a small increment, but because of rounding errors it ends up back below the threshold again and around it goes - I will make a tweak to the code to allow for that in the next update.
As a workaround, it might just work if you set a frame rate of 40fps, which will then calculate a max exposure of 25ms, which comes out exactly so might just avoid the same rounding errors.
cheers,
Robin
Re: Lunar Eclipse Script or Sequence?
THANKS ROBIN!
just did a test script with your new code for autoexpose.
this worked without locking up or having issues.
Since I was testing during the day I had to reduce my ROI so I could get a gain and exposure solution that would give a 80% histo.
here is my test script.
SEQUENCE
DEF SUB "WAIT X MINS"
DELAY 20
#WAIT x MINS
END SUB
DEF SUB DoCapture
AUTOEXPOSE SOLARSYSTEM TARGET 10 FPS
CAPTURE 30 SECONDS LIVE FRAMES
#Add more capturing stuff here
END SUB
SET OUTPUT FORMAT TO "SER file (*.ser)"
TARGETNAME LUNAR
LOOP 2 TIMES
GOSUB DoCapture
GOSUB "WAIT X MINS"
END LOOP
END SEQUENCE
I will try it out for real this evening since skies seem to be staying clear.
Take care
Steve
just did a test script with your new code for autoexpose.
this worked without locking up or having issues.
Since I was testing during the day I had to reduce my ROI so I could get a gain and exposure solution that would give a 80% histo.
here is my test script.
SEQUENCE
DEF SUB "WAIT X MINS"
DELAY 20
#WAIT x MINS
END SUB
DEF SUB DoCapture
AUTOEXPOSE SOLARSYSTEM TARGET 10 FPS
CAPTURE 30 SECONDS LIVE FRAMES
#Add more capturing stuff here
END SUB
SET OUTPUT FORMAT TO "SER file (*.ser)"
TARGETNAME LUNAR
LOOP 2 TIMES
GOSUB DoCapture
GOSUB "WAIT X MINS"
END LOOP
END SEQUENCE
I will try it out for real this evening since skies seem to be staying clear.
Take care
Steve