Lunar Eclipse Script or Sequence?

Discussions of using SharpCap for Solar or Lunar Imaging
stbkaiser
Posts: 218
Joined: Wed Aug 15, 2018 2:57 pm
Location: texas

Re: Lunar Eclipse Script or Sequence?

#11

Post by stbkaiser »

Hi Again
doing some more testing.
The function seems to be stuck with Exposure setting of 100ms (this never varies) and it only seems to try a gain of 40 and 100.
I must of hit a sweet spot earlier in the day.
I can watch the histo bounce back and forth from about 10% to max as gain is set to 40 and 100, no other values.
Any Ideas?
steve
User avatar
admin
Site Admin
Posts: 17589
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Lunar Eclipse Script or Sequence?

#12

Post by admin »

Hi Steve,

please try the very latest version from the downloads page that I updated yesterday - I was actually trying to fix a different issue, but had time to make a couple of changes to the autoexposure

1) Try not to get stuck with rounding errors trying to make minute changes to exposure - instead it should move on to changing gain once the FPS limit on exposure is reached

2) A fallback to stop the process if no valid result is found after 35 adjustments, which will at least stop it looping forever, although that will likely end up erroring out the sequence (but that can be handled with an ignore errors block).

cheers,

Robin
stbkaiser
Posts: 218
Joined: Wed Aug 15, 2018 2:57 pm
Location: texas

Re: Lunar Eclipse Script or Sequence?

#13

Post by stbkaiser »

HI Robin
I was using
SharpCapInstall-4.1.13193.0-64bit
It did drop out of the sequence when no solution was found.
But as mentioned, it only seemed to try fixed values for Gain ( 40 and 100) and speed (100).
I did make sure for the test that with manual settings I could get the fps required with a valid gain value.
Steve
Cutterpillow
Posts: 9
Joined: Sat Mar 08, 2025 2:00 am

Re: Lunar Eclipse Script or Sequence?

#14

Post by Cutterpillow »

Thanks for the update Robin! I’ll hopefully be able to do some testing tonight (last night was rainy). Preventing it from looping forever, even if it errors, will be much better to work with.

I probably wasn’t thinking about this correctly when I started playing with it — I was thinking that the FPS target should be set to what my camera is capable of. But it sounds more like it’s used to calculate the target exposure time, and then if that target is hit then the gain is adjusted from there? IOW, the camera’s actual FPS capabilities doesn’t matter, target FPS is just used to calculate the exposure time. How high does it try to set the gain?

So, for example, even though my camera (ZWO ASI585MC) is only capable of capturing at ~47 FPS at my target ROI, if I actually want very fast exposures — like 1ms to 5ms — I should set the FPS target to something like 200 FPS (i.e. 5ms). Is that correct?

For the future I wonder if it’d be possible to set a target range for FPS and gain? For example, set the target FPS range: 500 FPS to 20 FPS, target gain: 50 to 300. Where it would favor higher FPS and lower gain.

I might be able to do something like that in the Sequencer, at least for target FPS, by trying again with a new target FPS if the auto-exposure step fails — try high FPS targets, decrease on error & try again. Maybe a “Retry up to <Maximum Retry Count> times if there are any errors running these steps” block with a “Setup steps to run just before the sequence finishes, even if an error has occurred” that changes the target FPS sent to the auto-exposure step? But I’m not sure how or if that’s possible from the Sequencer as it doesn’t look like variables are available in the Sequencer. Maybe I’ll need to learn how to write scripts. ;-)

Anyway, I’m still not sure I’m understanding it all correctly. But I’ve got some ideas to try out tonight — the clock is ticking.

A question about guiding in the sequencer… Does the "Pause guiding if active and restart when this block finishes” block apply to Feature Tracking?
User avatar
admin
Site Admin
Posts: 17589
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Lunar Eclipse Script or Sequence?

#15

Post by admin »

Hi,

yes, you are on the right track with the target FPS - that indirectly sets the maximum exposure that will be used by the autexposure routine. It might be that actually having limits on the exposure/gain would be simpler, but at the time I wrote it, I was thinking that the primary goals are

* Good exposure - nothing overexposed (handled by the software)
* Fast enough imaging to freeze the seeing (handled by setting a target FPS)

Anyway, as it is now, it will raise the exposure first, then the gain if it needs a brighter image, and if it needs a dimmer image it will decrease gain first, then decrease exposure - this aims to hit the right exposure with the ability to hit the target FPS at the minimum gain compatible with those requirements. If you have a very faint target and give a low exposure limit via a high FPS then it will try to use high gains - there is a limit at a brightness increase of a factor of 300x over minimum gain - that's about gain 500 in ZWO units or 30000 in Altair units.

There are no variables available in the sequencer - that was a design decision to try to keep the complexity of the system under control, but in the end I might have to change that as people keep asking...

The pause guiding only deals with guiding via PHD2, not with feature tracking - the feature tracking can only be interacted with by the user interface, not by the sequencer or even scripting.

cheers,

Robin
stbkaiser
Posts: 218
Joined: Wed Aug 15, 2018 2:57 pm
Location: texas

Re: Lunar Eclipse Script or Sequence?

#16

Post by stbkaiser »

HI Robin
I believe success!!!!!!!!
Thanks You.
I was able to test autoexpose last night/this morning on full moon.
It works a lot better in the dark with real object.
Hard to get lighting right for daylight test it seems.
Here is the simple sequence I ran .
During the run I was able to trigger a new expose adjustment by placing a filter sheet in front of the scope.
worked great.
the sequence will be modified to run until 5am, end of eclipse

SEQUENCE
#quick test of autoexpose
DEF SUB "WAIT X MINS"
DELAY 10
#WAIT 10 sec
END SUB
DEF SUB DoCapture
AUTOEXPOSE SOLARSYSTEM TARGET 30 FPS
CAPTURE 30 SECONDS LIVE FRAMES
#Add more capturing stuff here
END SUB
SET OUTPUT FORMAT TO "SER file (*.ser)"
TARGETNAME LUNAR
LOOP UNTIL LOCALTIME "1:15:00 AM"
GOSUB DoCapture
GOSUB "WAIT X MINS"
END LOOP
END SEQUENCE


One thing I found
I was trying to use
STOP AT LOCALTIME "12:00:00 AM"
to end the sequence at the end of the eclipse , but it would only allow 1 run of my
gosub do capture
gosub wait x minutes
sequence.

Take care
Steve
Attachments
moon eclipse.scs
sample autoexpose for lunar eclipse
(472 Bytes) Downloaded 120 times
User avatar
admin
Site Admin
Posts: 17589
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Lunar Eclipse Script or Sequence?

#17

Post by admin »

Hi Steve,

glad you are making progress - sounds like you have a good chance for the eclipse - hope that the weather turns out clear :)

For the 'STOP AT' vs 'LOOP UNTIL' - the difference are:

STOP AT - runs the steps inside only once, but will cancel any remaining steps when the specified time arrives

LOOP UNTIL - runs the steps inside repeatedly, will keep running them until the specified time. Once the time arrives, it will not start another run of the steps inside, but does not try to immediately stop the current run either - it will wait until the interior steps are finished before proceeding.

If you want to use STOP AT, you would do something like

Code: Select all

STOP AT <TIME>
LOOP 10000 TIMES
# stuff you want to do
END LOOP
END STOP AT
That way, the loop inside the stop at takes care of the repetition and the stop at takes care of ending at the right time

cheers,

Robin
stbkaiser
Posts: 218
Joined: Wed Aug 15, 2018 2:57 pm
Location: texas

Re: Lunar Eclipse Script or Sequence?

#18

Post by stbkaiser »

Ahh
Thanks Robin for the clarification on that.
Operator misunderstanding.
the " Loop until local time " should work just fine for me.
Again thanks for you efforts on this function and all the work on SC.
Take care
Steve
stbkaiser
Posts: 218
Joined: Wed Aug 15, 2018 2:57 pm
Location: texas

Re: Lunar Eclipse Script or Sequence?

#19

Post by stbkaiser »

HI Robin
well , your AUTOEXPOSE software worked great last night/this morning.
The weather was not so great but your software fought the clouds pretty well.
Thanks for your software features.
I can see I have a lot to learn yet.
Take care
steve
User avatar
admin
Site Admin
Posts: 17589
Joined: Sat Feb 11, 2017 3:52 pm
Location: Vale of the White Horse, UK
Contact:

Re: Lunar Eclipse Script or Sequence?

#20

Post by admin »

Hi Steve,

good to hear that the software behaved as it should, even if the weather didn't - do feel free to share a few images when you have the time (we had enough cloud combined with the very low altitude here just before moonset to make it a no show)

cheers,

Robin
Post Reply